Go Down

Topic: Assemler results, where? (Read 3606 times) previous topic - next topic


I can not find the results that the compiler outputs.
...starting to worry I might be blind  :o


You can use the avr-objdump utility with the -S option (I think) on a .hex file to disassemble your sketch. Using it on a .elf file will let you see your C++ inline with the assembly. Can't recall that option off the top of my head.


Apr 12, 2008, 08:58 am Last Edit: Apr 12, 2008, 09:48 am by mem Reason: 1
The option to dump source intermixed with  with  disassembly is -S

A useful tip for conveniently generating dump files is to create a batch file that invokes avr-objdump.exe and sends the output to a text file in the sketch directory. Here is a batch file that will do this, you need to rename the path to match the location of avr-dump.exe on your machine

Code: [Select]

rem: this batch will send avr-objdump output of the elf file given as the parameter to a file in that directory with .txt appended
rem: change the path below so its correct for the location of objdump.exe on your machine
C:\Arduino\arduino-0011\hardware\tools\avr\bin\avr-objdump.exe -S %1 > %1%.txt

If you are using windows, save the batch to a file called avr-objdump.bat in the sendto directory. (tip: from the start menu,  click run and type sendto into the text box and click ok)

If the batch is in the sentdo directory then you can right click on an elf file in a sketch applet directory and the batch will create a dump file in that directory with the extension .txt

I hope you find that as useful as I have.



I tried and it works, but generates an empty txt file.
any suggestion?


It generates an empty file by me also.
Try this, it works:

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131