sim- / tgy

tgy -- Open Source Firmware for ATmega-based Brushless ESCs
http://0x.ca/tgy/
688 stars 387 forks source link

How to backup? #113

Closed Arise closed 7 years ago

Arise commented 8 years ago

I've tried to backup the content of my Afro Mini 20A ESC Opto with this command:

avrdude.exe -c arduinousblinker -i 10 -p m8 -P \\.\com7 -b19200 -F -U flash:r:flash_dump.hex:i

however the resulted file is 20K in size and looks like:

:200000001FC66FC01895189509946BC048C0189550C018951895F3C0189518951895189524
:20002000189580C01895697A40744042405B0290FFFF7F0000B99FB68A9409F4E5E29FBE16
:2000400018959FB68A949FBE189520FD929A21FDC29A22FDC19A20FD939A21FD949A22FD84
:20006000959AE7E3832C24BC1895A89518958F12E8CFA89511FDE9CFE0916500852C20FD62

When I looked in the compiled list, I see that al hex files there are like 9-11K in size and looks like:


:020000020000FC
:100000002CC661C01895189509945DC03AC0189522
:1000100042C018951895E5C018951895189518952B
:10002000189572C01895697A40744042405B0290FE

Why my dump is twice as big and starts with :20 while the hex files are like :01??? Is that ok? Should I worry?

This file: afro_nfet.hex should be compatible with Afro Mini 20A ESC Opto, right?

Thanks!

sim- commented 7 years ago

Hello! There are a couple of versions of the Intel HEX format. avrdude and avra output slightly different versions. You can use a tool such as objdump to convert between formats. I use "objdump -Iihex input.hex -Oihex output.hex".