.pde preprocessor

I was looking how to make a wizzard to turn a .pde file into a .cpp files that can be debuged using a debugger. In such a way that you don’t see a (lot of) difference with the original .pde file.

I ascertained that you use the following to turn a .pde into a .cpp:

#include “Wprogram.h”

← prototypes

Sketch code

contents of main.cxx

And all prototypes of all the functions are extracted automatically and put between #include “WProgram.h” and “Sketch code”.

Did I forget something?

For debugging I would also like to change main.cxx in a seperate .o file. And put all prototypes in WProgram.h (only for debugging).

So you just get:

#include “WProgram.h”

sketch code

And #include “WProgram.h” can be treated as white space by the sketch developper.

Or should that be:

code from main.cxx


As i notice that #include <WProgram.h> is already in main.cpp

Never mind the .elf that is generated by the arduino IDE is good enough.

You have to shift-click on verify and then in the log of the screen see where arduino has put the elf file, eg.


And load that in insight.

Which is very interesting in itself, because if you then go and look at the files, you can see all files that are part of your arduino project.

This might give you some more tips : http://code.google.com/p/arduino/wiki/BuildProcess Eberhard

Thank you very much