Go Down

Topic: convert pde to cpp (Read 4120 times) previous topic - next topic


Hi everyone,

I want to convert the pde file to cpp and then under visual studio made some things, and then using avr-gcc and avrdude upload this software to arduino.

thanks for answers

best regards


The pde file IS C++ code. The IDE adds some code to it, such as a main function that calls init(), setup() (your function), loop() (your function), and generates function prototypes for your other functions, if any. It adds some header file include statements.

Adding these additional things yourself isn't difficult.

Have you figured out how you are going to make Visual Studio invoke avr-gcc?
The art of getting good answers lies in asking good questions.


i have makefiles that I use to build things  .  The makefile takes the PDE and applies the requisite things to make a CPP file.. you could easily modify the makefile to just use the sketch.cpp file and not go through the conversion.

It also does the upload.
One thing to note, to make things work with multiple boards, (Mac paths) I make unique copies of the libraries in /Applications/Arduino.app/contents/Resources/Java/Hardware and select those using the MCU variable defined in the Makefile.

PM me with your email and I will send the makefile


to convert .pde to .cpp:

1) add "#include WProgram.h" at the top.
2) add any needed function prototypes for forward references.

That's it.  The rest of the magic is including the correct include directories, core files,  and libraries in the compile commands.  Hold down the shift key while doing "verify" to get verbose output of what goes on during the sketch compile.

And see http://arduino.cc/en/Hacking/BuildProcess

Go Up