Go Down

Topic: 1.0: Multiple pins_arduino.h breaks using makefiles & other IDEs (Read 2248 times) previous topic - next topic

JRobert

Specifically, it seems Arduino 1.0 contains "special knowledge" about using boards.txt to then select the correct variant-folder when trying to include "pins_arduino.h".    This technique is completely non-standard and it breaks the ability to use other IDE's such as Eclipse to build Arduino projects. 

#define-ing the variant and using that macro within a single arduino-wide pins_include.h is the usual way to do things like this, and would fix / prevent the above problem.

kiwidude

I found this problem too with eclipse. While having a single include file that loads the correct pins_arduino.h depnding on a defined macro would be a little easier, the current topology doesn't prevent you from using eclipse. You still have to change/configure for the board you want to compile for, but instead of defining another macro (symbol in eclipse), add another include directory.

Under C/C++ Build -> Settings, for both C and C++ compilers go into the directories setting and add the directory under the variants/ directory of the Arduino IDE files that matches your board. ^C and ^V to copy/paste directories in the eclipse list.

If you turn on "individual settings for build configurations" in preferences -> AVR you can define several different boards for the same project.

Go Up