Thanks and thanks for supporting the project.
Quote:the first is to be able to run code that doesn't reference target hardware at all: loads of code could be tested by loading up some start values and letting it run without ever going near the board
Yes, this has and is being considered as we speak. There is are couple of simulators out there already. One question is could we speak with the authors and discuss integration.
Interestingly we recently added support for wincyg. This has been used by the diydrones Arduino project to provide "Software In The Loop", the diyd Arduino project compiles the SITL version using cygwin and runs the resulting windows program instead of uploading to an arduino board. You can read about this in the wiki (see APM)
The question is what can be done easily and quickly so that we have something to experiment with.
If you have time, maybe you can take a look at how the SITL.ino source in the APM project re-defines the Arduino core to imitate the Arduino. If you find it is relatively easy to use this source to make a SITL build of your own project then maybe it will be easy for the add-in to replicate your work in a standard way.
The .net microframework emulator is another tool I would like to explore. It defines a good interface for a sim and it would be interesting to see if we can use some of the microsoft tools for our Arduino projects. At worst maybe look at the interfaces it provides and also how various emulator hardware might be defined using custom xml definition files.
Quote:Second mode would be if the arduino board could run a monitor program that executed primitive functions like reading/writing ports on command from the PC. The debugger on the PC runs the user code, intercepts any arduino or hardware function calls, relays them to the monitor, gets the results back and hands them over to the user code. Obviously any critical timings would be all over the place, but you would have the advantage of debugging your code executing on the PC.
If I read this right, this is how the Arduino Firmata system works and has long been a consideration for an alternative debug mode within VS/Atmel.
Sorry for the quick brain dump, dev is pretty busy for a few weeks with the final Arduino 1.5x changes. However it is a great topic and if anything I have said sparks a fuse then please continue this discussion here.
Thanks