Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to read arduino flash memory

Tags:

arduino

Imagine i'have lost my source code. Is there a way to dump an arduino flash memory ? What i want to do is to get an hex file on my PC that represent byte per byte the arduino flash memory (including bootloader)

I have 3 arduino types:

  • Arduino UNO (rev3)
  • Arduino MEGA
  • Leonardo Ethernet

Thanks

like image 559
Bob5421 Avatar asked Nov 15 '25 16:11

Bob5421


1 Answers

avrdude can do that for you. The specifics will depend on which arduino you have, but something like:

avrdude -p m328p -P usb -c usbtiny -U flash:r:flash.bin:r

will get you the contents of the flash memory.

Here's a site with more info:

http://www.evilmadscientist.com/2011/avr-basics-reading-and-writing-flash-contents/

like image 120
Jeff Loughlin Avatar answered Nov 17 '25 09:11

Jeff Loughlin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!