Arduino : get the complete generated code by Arduino IDE

The Arduino IDE is a great platform to write, compile and download Arduino development code.

Is there a way that I can see what the Assembly level code that exactly gets generated by IDE (the assembly / low level code) - I wish to debug what Arduino register level programming / setting is happeneing - so that I can directly interfacxe with the board using U-boot and my assembly program.

Thanks in advance.

From command line you can do:

<arduino>\hardware\tools\avr\bin\avr-objdump -S "path\to\code.elf" > assembler.lst

Don't forget that you can also look at the arduino core and library source code (none of which is in assembler.)

UECIDE includes an option to automatically save the assembly output (.lss file) into the sketch folder when you build - much more convenient than hunting for it and converting it yourself.

In windows you can make your own shortcut.
Open Explorer type 'shell:sendto' in that folder create a .bat file with the below text, fix the path to your IDE.

D:\arduino-1.5.2\hardware\tools\avr\bin\avr-objdump.exe -S %1 > %1%.txt

Then once compiled the IDE will give you the temp compile path ( with verbose option on ), in that folder right click on XXX.elf and choose 'Send To->yourbat.bat'

it will generate XXX.elf.txt.

The same for RAM usage can be done using this in a bat file:

D:\arduino-1.5.2\hardware\tools\avr\bin\avr-nm.exe -n -S %1 >nm_out.txt

Outputs nm_out.txt ( use also on XXX.elf )

No need to construct command lines out of file paths once setup.