Hi everyone,
I have to confess that I'm a RPi guy and I'm completely new to Arduino and working through examples\tutorials with my Uno which is great but...
My work has a flight simulator which uses 11 Arduino Leonardos with expansion boards to control physical switches and LEDs to interface with the sim software.
Once in a while one of the Arduinos doesn't get detected\work properly and so far rebooting the system has fixed it. But I know that one of these days we won't be so lucky.
I've done a bunch of searches and reading and I seem to be going around in circles, I'm not finding any recent answers (not within the last couple years) so...
Is there a simple way to read and save the firmware from the Arduino Leonardo (in hex or assembler) to have it as a backup ready to load to a new board? I've tried a few different approaches and not being successful with getting the Leo to reset and respond with avrdude properly...
I find it strange that after this many years of the Arduino being around, there's no menu option in the IDE to backup the firmware... At least no clear documentation on how to do it.
Any help would be greatly appreciated.
Edit:
I tried the following command with Avrdude:
avrdude -p m32u4 -c arduino -P COM7 -b 115200 -U flash:r:flash_file.hex
I've tried the above with replacing -c arduino with -c avr109 and -c avr910 but always got error messages, not responding, etc. Many people say that is because the Leo needs to be reset by software instead of pushing the reset button on the board. We're told to open the COM port at 1200 and then close it and that should launch the bootloader which would then let you run the avrdude command...
Can someone tell me what command to type to get the Leo to be able to respond to the above avrdude command?
Doing searches as shown that a lot of arduino users, going back as far as 2010, have been wishing for a simple feature to allow them to read/retrieve/backup the hex file from a pre-programmed arduino, not to edit it but to be able to burn it to a different board for various reasons. So please don't tell me the IDE is for developers and that you will always have your original code. Hard drives and thumb drives can fail for various reasons...