Is the “new Arduino IDE” the stock one from arduino.cc/ ? If so, you need to replace it with the compiler that is adapted to compile the Ardupilot projects. As TCIII mentioned before, it can be downloaded at http://ardupilot.com/downloads/?did=45
Hi Mohrad,
You need avr gcc version 4.7.2 or later. The earlier versions produce code that is too large for the board.
I’m not sure where you get 4.7.2 avr gcc for MacOS though - if you find it can you post a link?
Cheers, Tridge
I just wiped and loaded the AP patched version of Arduino just to make sure I had the right one and I am still getting compile size errors. Does this mean Arduino is still using the Apple compiler? and if so, how do I force it to use gcc 4.7.2?
[quote=“Mohrad”]
I just wiped and loaded the AP patched version of Arduino just to make sure I had the right one and I am still getting compile size errors. Does this mean Arduino is still using the Apple compiler? and if so, how do I force it to use gcc 4.7.2?[/quote]
That is quite tricky unfortunately. I think that on MacOS you will find it easier to build using the commandline. Try “make configure” followed by “make apm2” in the ArduPlane directory.
Cheers, Tridge
i’m also experience with Arduino build sketch too large error. i’m on windows 7 32bit, with ArduPilot-Arduino-1.0.3-windows. i can do make with cygwin but when upload to apm2, avrdude say address is out of range.
Hi Vincent,
For building on windows you can follow this guide, which shows you how to install a newer compiler version that gives smaller binaries.
We really are running out of space on the APM2
Cheers, Tridge
[quote=“tridge”]Hi Mohrad,
You need avr gcc version 4.7.2 or later. The earlier versions produce code that is too large for the board.
I’m not sure where you get 4.7.2 avr gcc for MacOS though - if you find it can you post a link?
Cheers, Tridge[/quote]
Same problem. Moving my (minor) modifications from 2.73 to 2.78 resulted in the code being too large using the standard “APM Arduino” compilers from the Eclipse IDE - even the standard 2.78 was too big. My solution was to download the Crosspack AVR toolchain (using avr-gcc version 4.8.1) for MacOS from http://www.obdev.at/products/crosspack/index.html
and copy the tools installed in /usr/local/CrossPack-AVR to Arduino.app/Contents/Resources/Java/hardware/tools/avr
This resulted in an ArduPlane.hex file almost 100K smaller, which uploads to APM2.6 and works fine