Pages: 1 [2]   Go Down
Author Topic: New Arduino IDE with an external AVR toolchain and compiler/linker options  (Read 4420 times)
0 Members and 1 Guest are viewing this topic.
Smithfield, Rhode Island
Offline Offline
God Member
*****
Karma: 3
Posts: 843
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way to specify the compiler and/or linker options int eh preferences file, or some other easily modified file?


Found it int eh .java file:

In the preferences.txt file, add:

avr-gcc.options = -O2
avr-g++.options = -O2
avr-link.options = -O2

Where -O2 is your preferred options

Oh! Like the big note at the top of the preferences.txt file says, be sure to modify the correct file! You need to modify the local copy. Where the local copy is depends on your operating system but its not hard to find.

« Last Edit: May 17, 2011, 02:28:12 am by skyjumper » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way to specify the compiler and/or linker options int eh preferences file, or some other easily modified file?

It's all covered in the "readme.txt" file in the same place as you obtained the IDE.

If you are looking to save memory space these optimizations go a lot further to conserve ram than the standard IDE:

-g -Os -Wall -ffunction-sections -fdata-sections -funsigned-char -mcall-prologues -Wl,--relax,--gc-sections -funsigned-bitfields -fpack-struct -fno-inline-small-functions -fno-split-wide-types

Good linker options:
-Os -Wl,--relax,--gc-sections

Logged

Seattle, WA
Offline Offline
God Member
*****
Karma: 11
Posts: 673
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not surprised to see a few warnings. And if they appeared more often the library developers would be motivated to fix the problems they report, minor though they may be.

By the way, the latest github Arduino source has a lot less warnings, including many of the ones fixed in earlier posts on this thread.  Plus I just submitted a patch that clear up all of the warnings I run into, so hopefully soon it will be silent.  Yay!
Logged


Pages: 1 [2]   Go Up
Jump to: