Pages: [1]   Go Down
Author Topic: Compiling in Eclipse makes Blink huge  (Read 1024 times)
0 Members and 1 Guest are viewing this topic.
SF Bay Area, CA USA
Offline Offline
Newbie
*
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,

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?

TIA,
Mitch Christensen
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 135
Posts: 6782
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1923
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Jantje
Logged

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 -

Pages: [1]   Go Up
Jump to: