ArduinoCommunityLogo.png?width=200

ArduPilot using Arduino 1.0.5 and avr-gcc 4.8.1

I've merged the ardupilot code with the latest Arduino 1.0.5-r2 code (git version which is well on the way to 1.0.6), plus the avr-gcc 4.8.1 from the Arduino 1.5.x development branch.

Net result is the "latest" Arduino version, with ardupilot extensions and a compiler that reduces the flash size of ardupilot by about 20% or so.  Benchmarks indicate that 4.8.1 produces code that runs about 1.5-8x faster than the old compiler too, depending on the amount of I/O that's being done.  I haven't done any extensive benchmarking yet of ardupilot under the new compiler, but this should give more headroom for the kinds of features I'd like to add to the platform.

I'm actually working with ardupilot-mpng for the HK multiwii/megapirate AIO board, so I've added a board for that in the ardupilot menu in Arduino too.

I'm working on OSX, so I haven't updated the compiler for Linux/Windows, but it should be pretty easy to do that by modifying build/build.xml and downloading the 4.8.1 compiler toolchain for your platform from http://downloads.arduino.cc/avr-toolchain-${file_arch}-gcc-4.8.1.zip where ${file_arch} is your platform.

My github fork is at https://github.com/hughescr/Arduino on the "develop" branch

You can download a pre-built (by me) OSX Arduino.app here:

https://www.dropbox.com/s/g1jvk8r8gln7v2m/ardupilot-mpng-gcc-4.8.1-1.0.5-r2-121-g080b774-macosx.zip

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Craig Hughes, thank you for your build! I just install it on OS X and it's work as expected :).

  • Ah, I totally didn't see that page, because I don't use Windows, and http://dev.ardupilot.com/wiki/building-the-code-on-mac/ has 4.3.2  Should be easy to modify the build.xml to do the same thing to generate an identical Arduino IDE for windows using the same 1.0.5 and the same avr-gcc with the same patches that arduino upstream also builds for windows, which is at http://downloads.arduino.cc/avr-toolchain-win-gcc-4.8.1.zip

    I'd make the changes myself but wouldn't able to actually build/test.

  • Developer

    This is interesting work but to be clear, we're already using gcc ver 4.8.1 in the centralised builder that produces the executables that appear in the Mission Planner.  The hacked arduino ide that is documented on the wiki is 4.7.x so I'm afraid we've already reaped the benefits of the more up-to-date compilers.  Without those benefits we wouldn't be able to fit the current code onto the APM1 and APM2.

    So the work above is likely a cleaner approach to getting the 4.8.1 compiler available to people using the arduino ide (i..e cleaner than installing the separate MVH package we currently recommend) but it won't solve the flash and cpu limits that we've hit on the AVR.

  • sweet keen to see this merged

This reply was deleted.