Motherboard Forums


Reply
Thread Tools Display Modes

Prototyping and simulating embedded software on Windows

 
 
sales@quantum-leaps.com
Guest
Posts: n/a
 
      07-28-2012, 02:54 PM
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.
 
Reply With Quote
 
 
 
 
linnix
Guest
Posts: n/a
 
      07-28-2012, 04:57 PM
On Jul 28, 7:54*am, (E-Mail Removed) 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,


I don't know why you would want to use Win32 API, rather than MFC.
Dealing with plugins are much easier with MFC. For example, you can
build an active-x (or whatever they are calling it now) to simulate a
segmented LCD, then include it as an MFC class. Unless you want to
avoid C++ completely, MFC is much easier than Win32 API.


 
Reply With Quote
 
 
 
 
sales@quantum-leaps.com
Guest
Posts: n/a
 
      07-28-2012, 06:11 PM
OK, regardless, do you perhaps know of specific example MFC code for a rendering a graphic LCD with an efficient, pixel-level interface? Or perhaps a class that would render a button with user-defined look for the "depressed" and "released" states?
 
Reply With Quote
 
linnix
Guest
Posts: n/a
 
      07-28-2012, 06:17 PM
On Jul 28, 11:11*am, (E-Mail Removed) wrote:
> OK, regardless, do you perhaps know of specific example MFC code for a rendering a graphic LCD with an efficient, pixel-level interface?


I only did segmented LCD active-X. Graphic LCD is more segments
(pixels) with different interfaces.

> Or perhaps a class that would render a button with user-defined look for the "depressed" and "released" states?


Can do it with a simple active-x control. MFC will build the class.
 
Reply With Quote
 
sales@quantum-leaps.com
Guest
Posts: n/a
 
      07-28-2012, 06:17 PM
Also, I think that MFC is not supported in the free Visual C++ Express edition. But perhaps I'm wrong. Do you happen to know?
 
Reply With Quote
 
linnix
Guest
Posts: n/a
 
      07-28-2012, 06:27 PM
On Jul 28, 11:17*am, (E-Mail Removed) wrote:
> Also, I think that MFC is not supported in the free Visual C++ Express edition. But perhaps I'm wrong. Do you happen to know?


That i don't know. I am still using VC 5.0 to compile programs on
Window 7. It still works.
 
Reply With Quote
 
sales@quantum-leaps.com
Guest
Posts: n/a
 
      07-28-2012, 06:31 PM
On Saturday, July 28, 2012 2:17:42 PM UTC-4, linnix wrote:
> I only did segmented LCD active-X. Graphic LCD is more segments
> (pixels) with different interfaces.


Even a very small graphic LCD has thousands of pixels, which is order of magnitude more than most complex segmented LCDs. I simply don't think that the segmented-LCD approach (a bitmap for each segment) would scale to graphicLCDs, especially if you'd like to have grayscale or even very rudimentary color.

I also look for specific code examples. I already know that "it can be done". Internet is full of such claims, but it does not help me.
 
Reply With Quote
 
linnix
Guest
Posts: n/a
 
      07-28-2012, 06:39 PM
On Jul 28, 11:31*am, (E-Mail Removed) wrote:
> On Saturday, July 28, 2012 2:17:42 PM UTC-4, linnix wrote:


> Also, I think that MFC is not supported in the free Visual C++ Express edition. But perhaps I'm wrong. Do you happen to know?


Actually, my customer compiles my MFC source with VC++ 2008 an d 2010
without problem. So, MFC is supported.

> > I only did segmented LCD active-X. *Graphic LCD is more segments
> > (pixels) with different interfaces.

>
> Even a very small graphic LCD has thousands of pixels, which is order of magnitude more than most complex segmented LCDs. I simply don't think that the segmented-LCD approach (a bitmap for each segment) would scale to graphic LCDs, especially if you'd like to have grayscale or even very rudimentary color.


So, you need a big buffer in the active-x control and display it in
the window. What's the problem?

>
> I also look for specific code examples. I already know that "it can be done". Internet is full of such claims, but it does not help me.


Yes, but i only work when i get pay, or at least promised to get pay.
 
Reply With Quote
 
Dave Nadler
Guest
Posts: n/a
 
      07-28-2012, 08:07 PM
I've used wxWidgets to simulate a graphics LCD
and UI controls, and added additional windows
for debugging assistance (logging, simulation
commands to simulate driving UI, command save
and replay, regression test and demo support,
etc).

wxWidgets works on Windoze and Linux, and builds
with free version of VC++. Much easier than messing
with MFC or ActiveX (of which I've done too much).

Example:
http://www.nadler.com/sn10/ILEC_SN10B_Demo32_237x4.exe

This code is pretty specific to the device; not
at all a generic toolkit....

Hope that helps,
Best Regards, Dave
 
Reply With Quote
 
David Brown
Guest
Posts: n/a
 
      07-29-2012, 09:49 AM
On 28/07/12 16:54, (E-Mail Removed) 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simulating Microblaze Core + C Code + VHDL defined peripherical Xabier Iturbe Embedded 0 11-23-2006 08:15 AM
OpenWatcom for embedded prototyping? Yeeeaaaahhhhhh! tarascio@gmail.com Embedded 3 05-25-2005 07:33 PM
Simulating SPI with AVR Studio Bugmaster Embedded 5 03-14-2005 10:26 AM
simulating a cooperative scheduler Mastupristi Embedded 3 02-04-2004 10:15 PM
Sending Infrared Signals (simulating remote controls) Gaines Hardware 0 07-15-2003 04:19 AM


All times are GMT. The time now is 05:33 AM.


Welcome!
Welcome to Motherboard Point
 

Advertisment