Go Down

Topic: Atmega disassembler for OS X (Read 1 time) previous topic - next topic

EmilyJane

Does anyone have a favorite Atmega disassembler that runs under OS X?. I can boot into Windows if I have to so if there is a particularly good (free) one for Windows, I might be interested. I have the object code out of the AAG weather station that I would like to disassemble, just for grins.

johnwasser

What format is the object code?  .o?  .hex?

The Arduino distribution includes avr-objdump and avr-readelf which can read and disassemble various object formats.

In a terminal window, try:  /Applications/Arduino22.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objdump -h (yourfile)
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

EmilyJane


What format is the object code?  .o?  .hex?

The Arduino distribution includes avr-objdump and avr-readelf which can read and disassemble various object formats.

In a terminal window, try:  /Applications/Arduino22.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objdump -h (yourfile)


I saved in .hex. I'll give that a try! Thanks!

EmilyJane



What format is the object code?  .o?  .hex?

The Arduino distribution includes avr-objdump and avr-readelf which can read and disassemble various object formats.

In a terminal window, try:  /Applications/Arduino22.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-objdump -h (yourfile)


I saved in .hex. I'll give that a try! Thanks!


That pointed me in the right direction. The right switches are: avr-objdump -j .sec1 -d -m avr flash.hex

EmilyJane

Well, I disassembled the factory object code from the weather station. I have no previous experience with looking at disassembled C code for the Atmel processors if this was indeed originally written in C, but it looks pretty straightforward. They used the Y-register as a stack frame pointer for local variable storage and the UART receive routine is interrupt driven. It's an interesting experiment taking apart their code, but I don't think I'm going to spend much more time on it. There aren't any real mysteries about how to use the existing hardware.

Go Up