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
Karma: 0
Posts: 44
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

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

Offline Offline
Edison Member
Karma: 68
Posts: 1923
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
 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,70547.msg589022.html#msg589022


Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie -,77.0.html -

Pages: [1]   Go Up
Jump to: