getting past 128k code limit?

Asking here because ArduPilot is close to 128k.

 

I'm getting linker errors with a modified ArduPilot because code has gone past 128k

 

how do I get link flags passed by the IDE?

 

I'm not sure if it will work, but supposedly..

 

edit: Ok I did some more digging, and there is a modified Arduino IDE hanging around where you can pass extra flags in preferences.txt to the linker, for pretty much the same reason:

If you push past 128k code then you can't get working projects without building outside the stock IDE eg with Make or eclipse.

 

found fix:

 

 

Download a modified version 22 IDE, discussed here http://aeroquad.com/showthread.php?2061-ArduinoIDE-with-external-AVR-toolchain-and-compiler-options.  from here http://www.mostlysoftware.com/files/ArduinoIDE/

 

and add new linker options to preferences.txt as per the readme

 

avr-link.options=-Os -Wl,--relax,--gc-sections

 

and voila. you can build code past the 128k level on the mega hardware without linker "internal error" messages.

 

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

Join diydrones

Email me when people reply –

Replies

  • Moderator
    Not sure if this is relevant, or maybe you already know but there is a atmega2560 version or ardupilot mega with more memory, I think the last version of the code for atmega1280 will be v2.3, from then on all future code will require apm2560, unless you want to hack the code to disable features so it will fit onto the older APM. Hope that helps
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…