Go Down

Topic: Displaying generated code (Read 793 times) previous topic - next topic

juliangall

Is there any way of showing the assembler code generated from compiling a sketch. A list of assembler commands against each C++ line would be really nice  :). I know some compilers do this but is there any way to make the Arduino compiler do it? I would like to work out where the memory is going and get an idea for what's efficient and what's not.

Thanks,

Julian

mem

There is a utility called avr-objdump.exe in  the hardware\tools\avr\bin
directory that will dump a listing of the compiled output (an elf file) showing the C source intermixed with the assembler code. You can also view  a map of the memory allocation.

The following will dump the output of a compiled sketch called mySketch.pde:
avr-objdump -S mySketch.elf

the elf file is in the applet  subdirectory below the location of the sketch source code

juliangall

That's fantastic. Just what I was looking for.

Thanks,
Julian

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!

Arduino
via Egeo 16
Torino, 10131
Italy