Pages: [1]   Go Down
Author Topic: 1.0: Multiple pins_arduino.h breaks using makefiles & other IDEs  (Read 2214 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: