Go Down

Topic: New Arduino IDE with an external AVR toolchain and compiler/linker options (Read 4 times) previous topic - next topic

skyjumper


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.


ccpetersen


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


maniacbug


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!

Go Up