how to generate an asm program listing

johnwasser:
I don't think there is a way to change the avr-gcc switches without the java source code and re-building at least one of the .jar files in the IDE.

The AVRgcc tools that come with Arduino include two programs for dis-assembling binaries. Read about avr-objdup and avr-readelf.

You can learn to use the avr-gcc directly. That way you can provide it with any command-line switches you want. The easiest way is to turn on verbose logging for the build and look at the command lines that Arduino generates.

In addition, if you are invoking avr-gcc directory, there are the following options:

  • -save-temps -- when compiling, leave .ii and .s files around (.ii is the C++ source after the preprocessor, .s is the assembler file)
  • -Wa,-al -- tell the assembler to generate a listing file to standard output