Created
November 27, 2020 17:25
-
-
Save catskull/f4c15da32993fb14922a95336b5f1903 to your computer and use it in GitHub Desktop.
Flash an AVR/Arduino from a backup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ true ] ; do | |
avrdude -V -p m32u4 -c usbtiny -U flash:w:backup_flash.bin | |
# avrdude -p m32u4 -c usbtiny -U eeprom:w:backup_eeprom.bin | |
avrdude -p m32u4 -c usbtiny -U hfuse:w:backup_hfuse.bin | |
avrdude -p m32u4 -c usbtiny -U lfuse:w:backup_lfuse.bin | |
avrdude -p m32u4 -c usbtiny -U efuse:w:backup_efuse.bin | |
say "flashing complete" | |
echo "Press any key to continue" | |
while [ true ] ; do | |
read -t 3 -n 1 | |
if [ $? = 0 ] ; then | |
break | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment