Go Down

Topic: Compiling in Eclipse makes Blink huge (Read 1 time) previous topic - next topic



I'm really frustrated with basic nature of the Arduino IDE so I'm trying to move to Eclipse.  I've got Blink built and deployed using Eclipse, but I notice that AVRDude reports 16,488 bytes (versus a 1018 bytes in the Arduino IDE).

I must have some compilation setting(s) wrong, but I've played with them all and haven't been able to reduce the size.

Any suggestions?

Mitch Christensen


Check for " -ffunction-sections -fdata-sections " in the compile options, and "--gc-sections" in the link options.  Arduino has become very dependent on these (which cause unreferenced functions and data to be omitted in the link phase) if you want reasonably sized sketches.

Do a verbose compile in the IDE, and make sure you know what ALL the switches provided to the compiler/etc actually do, before omitting them from other IDEs' configs...


Have  you compiled the Arduino as a library? and used the link functionality to include the code?
If you put the Arduino code directly in your project, all global variables defined in the Arduino code (used or not) will be in the final upload.

See this message on how my plugin sets it up in eclipse http://arduino.cc/forum/index.php/topic,70547.msg589022.html#msg589022

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up