I have been asked to create a graphical programming IDE for embedded 8-bit and 32-bit microcontrollers. It needs to be as easy as using LabVIEW, but I don't need features like debugging or simulating (at least for now). Basically the application needs to allow the user to configure logic gates, while/for loops, case statements, comparisons, flow control, etc. Once the program is finished it should generate the C code, compile and write the program on the connected microcontroller. Right now were are targeting Atmel and Freescale processors and will be using DIO, analog IO for current sensing, CAN bus, PWM, and probably some more that I'm missing.
I realize that this is a HUGE undertaking that will take a very long time to develop, but it's software that my company wants to provide customers when they buy our hardware. To back up a bit and give you a little background information, our company builds IO modules that work on CAN bus or standalone. Today, the only way to program the microcontoller on our PCB is to use the IDE from Atmel (AVR Studio) or Freescale (CodeWarrior). The problem is that the customer does not always have the know-how to program in C. So... enter the graphical IDE. LabVIEW is too expensive for the customer, so we're stuck with creating our own.
So my question is: what is a good way to create this IDE? I am planning on developing this in C#/WPF, but I'm wondering how hard it will be to convert the logic that the user created into C code that can be compiled by the Atmel/Freescale compiler. Or perhaps there is a better method out there? Has anyone done anything like this?
We had quite a similar problem. Our goal was to create a graphical modeling tool that would generate C or C++ code from UML state machines. One would think that such tools should be very common, but it turns out that they don't support state nesting very well and don't generate production-quality code tight enough for embedded microcontrollers.
After comparing several options, such as integration with existing graphical tools, we settled on developing the whole thing in Qt (qt.nokia.com). In the hindsight, we are very happy with that choice, because we can control every aspect of the tool.
The Qt framework provides a lot of infrastructure, such as the 2D graphical scene and graphical items that users can manipulate with the mouse. You have XML support to store your model on disk. And you have a scripting engine, if you need to expose some scripting interface. One thing that helped us immensely to get started with Qt was the book "C++ GUI Programming with Qt 4 (2nd Edition)".
Anyway, the tool we have created is free to download and free to use (http://www.state-machine.com/qm), so you can play with it and see how it works.