I am referring to running hardware-independent components of your code on PC, such as a class that handles some data in your arduino, and calculate, export strings or make decisions with the data. This could be as easy as interpreting serial data and assign values to variables or making actions. In my case, I have a schedule class that handles schedule items. An instance of a schedule could have a few items such as MTWHh 2pm-2:50pm, feed college students with hard science. I would want to use this class to generate output that can be rendered into a menu on an LCD. Testing this code involves uploading, finding problems, going back and uploading... There is no debugger on arduino IDE so in case there's a problem, I'm down to serial.println() :(
What I have been exploring today was to compile and run this class, which is hardware independent, on Dev C++ for windows. I have got some success to run this class and use printf (oh yeah!) to output to console to see if the class generates the right menu. And I'm using a debugger. It's nice.
I even mocked up PROGMEM related typedefs, functions, etc to run PROGMEM definitions and functions (not fully tested) on PC.
With the windows console_buffer_status_info stuff I found on the net, I'm thinking about making a LiquidCrystal class to output directly to the console. This will be very nice for everyone interested in developing user interface with an LCD. The input can be taken from keyboard with a modified version of my phi_interfaces, treating the keyboard as a serial keypad. Then my entire phi_prompt Text based user interface library can be run and debugged on PC.
Is this something anyone is interested in? I read the last 10 pages and all I found, remotely related to this thread, were arduino simulators. This is not a simulator, rather a "trans-planter" of some sort instead.
I had to hack up an Arduino.h and fake a bunch of strXXX_P functions for PROGMEM access.
Maybe next step is to mock up serial and LiquidCrystal and then I can directly port my phi_interfaces library to use PC keyboard as input buttons. Now I am really starting to appreciate my own work a bit more than cursing bugs all day, since I can debug with a real debugger instead of chasing my own tail in the arduino memory. With the windows protection, I even caught a few array out of bound stuff that I didn't catch in arduino IDE, since there's no segment protection in arduino SRAM :)