MichaelMeissner
Senior Member+
If the Arduino IDE leaves the objects around, you can use the -save-temps option that leaves a .ii and .s file in the directory the build was done, but it still does the compile (.ii is the output after the pre-processing has been done, .s is the assembler input file). Using teensy 3.0 build 1.12 you can use -save-temps=obj (-save-temps has a problem if you have the same name being compiled in different subdirectories, while -save-temps=obj leaves the .ii/.s files in the output directory, and not the current directory, but honestly most of the Arduino/teensy stuff I've seen does not do things like use -j<n> with several builds each with different -o <dir>/<file>.o at the same time). Unfortunately, if you are using the AVR compiler, you probably can't use -save-temps=obj, at least until the Arduino folk decide to upgrade compilers.For what it's worth, you can *add* compiler options, by editing hardware/teensy/boards.txt & restarting Arduino, to add (e.g.)
teensy3.build.cppoption2=-O3
teensy3.build.cppoption3=-ffunctions-section
etc, (just increment the number for each option you add). For example I've found it useful to dump an assembler output instead of actually compiling, by
teensy3.build.cppoption<N>=-S
Last edited: