Go Down

Topic: .pde preprocessor (Read 964 times) previous topic - next topic


Jul 25, 2010, 06:47 pm Last Edit: Jul 25, 2010, 06:52 pm by imre Reason: 1
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.



Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131