Here is a few tools to help:
-
Type 'windows+r' to open run dialog.
-
Type 'shell:sendto' and hit enter.
-
in that folder create a text file called what ever you want.
add a line to the text file:
D:\arduino-1.5.2\hardware\tools\avr\bin\avr-nm.exe -n -S %1 >nm_out.txt
replace the highlighted part with your version of the arduino IDE
Save the file, then rename it from '.txt' to '.bat'
This file I called 'avr_sram.bat'
Do the same process for this line:
D:\arduino-1.5.2\hardware\tools\avr\bin\avr-objdump.exe -S %1 > %1%.txt
This file I called 'avr_asm.bat'
compile your program with verbose mode on.
The last sketch I compiled had output that looked like this:
D:\arduino-1.5.2\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom C:\Users\Chris\AppData\Local\Temp\build2298627670476152015.tmp/CrackAttack.cpp.hex
Binary sketch size: 22,338 bytes (of a 258,048 byte maximum) - 8% used
copy the folder path to the hex file, the highlighted portion. And open in explorer.
Find XXX.elf where XXX is your sketch name.
Right click on it and sendto either one of the files you just created.
The sram file produces nm_out.txt
and the asm file produes XXX.txt...
I used the sram version for the test above, it displays the memory layout of the program.
the asm file produces the asm listing of the compiled app. You can see how your code is optimised and see things like the PROGMEM data.
EDIT: changed control+r to windows+r to open run dialog.