On 28/07/12 16:54,
wrote:
> I am looking for tools and techniques for prototyping (virtual
> prototyping), simulation, and testing of deeply embedded C code on
> desktop Windows, including building realistic embedded front panels
> consisting of buttons, LEDs, and LCD displays (both segmented and
> graphic).
>
> I'm specifically interested in a possibly low-level approach, using
> pure C code and raw Win32 API rather than MFC, .NET/C#, vxWidgets or
> Qt. I'd also like to use free development tools, such as Visual C++
> Express with Platform SDK and ResEdit for editing resources.
>
> I'm looking for code examples to render graphic LCDs (from monochrome
> to 24-bit color) with efficient pixel-level interface, multi-segment
> LCDs, and owner-drawn buttons that respond both to "depressed" and
> "released" events.
I can understand you want to use low-level tools to get faster code,
especially for your simulated LCD displays. But that doesn't mean you
have to rule out toolkits of different sorts.
I would recommend you use some sort of gui / widget toolkit to get the
basic gui in place. For things like buttons, LEDs and general graphics,
you won't be able to make anything better/faster yourself (within a sane
level of development effort). For your LCD, you just need some sort of
simple widget (an image display widget, for example). Use an off-screen
raw bitmap as your "simulation", and regularly copy it onto the widget.
It will work more than fast enough, especially if you have the gui
running in a different thread from the simulation thread(s).
wxWidgets is a good toolkit, but you need C++ rather than C (or
something else entirely - such as using Python to quickly and easily
make the gui, while keeping the simulation part in fast C). GTK is
probably the most powerful C-based gui/widget toolkit.
Consider also using mingw (gcc for windows) rather than limited free
versions of commercial tools. An IDE like Codeblocks will easily let
you work with both compilers, so you can see what works best for you.