I'm finally getting around to soldering headers on my ardupilot-mega board (1280 version) and trying to get it up and talking. I downloaded the arduino-1.0.1 environment for linux 64-bit and got that up and running. I connected my FTDI cable and the board looks like it powered up. My linux system detects the cable is attached and creates /dev/ttyUSB0 as it should. I fetched the git code from code.google.com.
Now I'm trying to compile with the arduino IDE and I have a quick question (hopefully). Right out of the gate I get:
ArduPlane.cpp:1841:28: error: Mavlink_compat.h: No such file or directory
It would be nice if everything compiled clean out of the box, but I realize this is git code and it's a moving target so I won't complain too much about that. :-) But my question is, what are developers doing to get around this? This is a file out of the GCS module. Are people copying this file over to the ArduPlane directory? Is there a way to extend the search path in the arduino ide? Are there other gotcha's I need to watch out for? Has anyone created a list of work arounds?
On my system I also have newer avr tools (gcc/g++ etc) installed due to another project I'm working on. When I do the cmake compile it picks up these newer version of the avr compilers instead of what the arduino ide provides. Ideally that shouldn't be a big deal, but the newer version is apparently pickier and dies with:
Building CXX object CMakeFiles/mega2560_FastSerial.dir/home/curt/Projects/UAS/Arduino/ardupilot-mega/libraries/FastSerial/vprintf.cpp.obj
/home/curt/Projects/UAS/Arduino/ardupilot-mega/libraries/FastSerial/vprintf.cpp: In member function 'void BetterStream::_vprintf(unsigned char, const char*, va_list)':
/home/curt/Projects/UAS/Arduino/ardupilot-mega/libraries/FastSerial/vprintf.cpp:258:118: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
/home/curt/Projects/UAS/Arduino/ardupilot-mega/libraries/FastSerial/vprintf.cpp:260:126: error: variable '__c' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
make[2]: *** [CMakeFiles/mega2560_FastSerial.dir/home/curt/Projects/UAS/Arduino/ardupilot-mega/libraries/FastSerial/vprintf.cpp.obj] Error 1
make[1]: *** [CMakeFiles/mega2560_FastSerial.dir/all] Error 2
make: *** [all] Error 2
That's diving into some tangled web of defines so I'm not sure the best work around here, but just a heads up for ardupilot developers if they are reading this that some newer version of the arduino tools will probably die here too when they get around to upgrading their version of avr. The version of gcc provided with arduino-1.0.1 is 4.3.2 and the version I have installed separately is 4.6.1.
Thanks,
Curt.
Replies
Have you followed the instructions here?
The first things that come to mind are to a) ensure that you're using the right version of Arduino (there's an arduplane-specific version mentioned in the link above), and b) check that the arduplane folder and the libraries folder are in the folder that you're using for your arduino "sketches".
Hope that helps.