Go Down

Topic: converting hex code to assembly (Read 3 times) previous topic - next topic


I'm interesting in converting the Hex code which is produced when I compile a program into assembly, I've heared that you need some kind of disassembly for the exact microcontroller that is being programmed. in my arduino i have atmega168. anyone knows where i can find a disassembly program for this chip?



If you are looking to view the assembler produced by the arduino compiler, see this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1207951658


I think i got a problem:

C:\Documents and Settings\Dragonuv\Desktop\arduino-0010\hardware\tools\avr\bin>avr-objdump.exe -S c:\Blink.hex > test.txt
avr-objdump.exe: Can't disassemble for architecture UNKNOWN!

Why does this happen ?
Will the output file be seen as cpp? Can I make it be seen as assembly?

Thanks :)


Apr 25, 2009, 01:12 pm Last Edit: Apr 25, 2009, 01:13 pm by mem Reason: 1
Its the .elf file that you dump, not the hex file. The elf file contains lots of information that avr-objdump uses to mix assembly with the C source code.


Works great, thanks.

But it still leads me to the question: what does the .hex file include?

Go Up