3D Printer Firmware Backup & Restore

Install avrdude

$ sudo apt-get install avrdude
$ avrdude
Usage: avrdude [options]
Options:
 -p <partno> Required. Specify AVR device.
 -b <baudrate> Override RS-232 baud rate.
 -B <bitclock> Specify JTAG/STK500v2 bit clock period (us).
 -C <config-file> Specify location of configuration file.
 -c <programmer> Specify programmer type.
 -D Disable auto erase for flash memory
 -i <delay> ISP Clock Delay [in microseconds]
 -P <port> Specify connection port.
 -F Override invalid signature check.
 -e Perform a chip erase.
 -O Perform RC oscillator calibration (see AVR053). 
 -U <memtype>:r|w|v:<filename>[:format]
 Memory operation specification.
 Multiple -U options are allowed, each request
 is performed in the order specified.
 -n Do not write anything to the device.
 -V Do not verify.
 -u Disable safemode, default when running from a script.
 -s Silent safemode operation, will not ask you if
 fuses should be changed back.
 -t Enter terminal mode.
 -E <exitspec>[,<exitspec>] List programmer exit specifications.
 -x <extended_param> Pass <extended_param> to programmer.
 -y Count # erase cycles in EEPROM.
 -Y <number> Initialize erase cycle # in EEPROM.
 -v Verbose output. -v -v for more.
 -q Quell progress output. -q -q for less.
 -l logfile Use logfile rather than stderr for diagnostics.
 -? Display this usage.

avrdude version 6.0.1, URL: <http://savannah.nongnu.org/projects/avrdude/>

Power UP

Power up your 3D printer and connect PC with USB line.

Backup Firmware

$ avrdude -p atmega2560 -P /dev/ttyUSB0 -c stk500v2 -b115200 -F -U flash:r:factory_firmware.hex:i 

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801
avrdude: reading flash memory:

Reading | ################################################## | 100% 29.13s

avrdude: writing output file "factory_firmware.hex"

avrdude: safemode: Fuses OK (H:00, E:00, L:00)

avrdude done.  Thank you.

RESTORE Firmware

$ avrdude -p atmega2560 -P /dev/ttyUSB0 -c stk500v2 -b115200 -F -D -U flash:w:factory_firmware.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e9801
avrdude: reading input file "factory_firmware.hex"
avrdude: writing flash (262106 bytes):

Writing | ################################################## | 100% 38.41s

avrdude: 262106 bytes of flash written
avrdude: verifying flash memory against factory_firmware.hex:
avrdude: load data flash data from input file factory_firmware.hex:
avrdude: input file factory_firmware.hex contains 262106 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 29.22s

avrdude: verifying ...
avrdude: 262106 bytes of flash verified

avrdude: safemode: Fuses OK (H:00, E:00, L:00)

avrdude done.  Thank you.


XYZ AXIS LOCATION

PRUSA I3 Firmware 
factory_firmware.hex