[Tip] Flashing firmware without Cura

For those of us who don’t use Cura (or the Arduino IDE), there is another way to flash firmware on LulzBot printers: the AVRDUDE command-line utility. If you’ve never used AVRDUDE to flash your RAMBo, read on to learn how.

First of course, install AVRDUDE however you install software for your OS. For Debian-based GNU/Linux distributions, you can simply run the following command in a terminal ("$" being the prompt):

$ sudo apt-get install avrdude

Disconnect any control software (Pronterface, etc.) you may have connected to your printer’s serial device. Run AVRDUDE without performing any operations to check that everything is working so far (in this and all the following commands, replace “/dev/ttyACM0” with your serial device if it differs):

$ avrdude -c wiring -P /dev/ttyACM0 -p ATmega2560

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 (probably m2560)

avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF)

avrdude done.  Thank you.

Before writing new firmware, you should record your printer’s Z offset and your tool head’s E steps/mm (as well as any other settings you may have changed). I’d recommend also backing up your running firmware and boot loader:

$ avrdude -c wiring -P /dev/ttyACM0 -p ATmega2560 -U flash:r:Marlin.hex:i

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading flash memory:

Reading | ################################################## | 100% 32.64s

avrdude: writing output file "Marlin.hex"

avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF)

avrdude done.  Thank you.

Or you can just verify either the firmware or boot loader. Figure out what firmware version you’re running and download the binary (technically either an Intel hexadecimal object file or a raw binary) if you don’t have a copy already. Alternatively, you can just verify the STK500v2 boot loader. Example of verifying the firmware:

$ avrdude -c wiring -P /dev/ttyACM0 -p ATmega2560 -U flash:v:Marlin_TAZ6_SingleExtruder_1.1.9.28_193d1f804.hex:a

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: verifying flash memory against Marlin_TAZ6_SingleExtruder_1.1.9.28_193d1f804.hex:
avrdude: load data flash data from input file Marlin_TAZ6_SingleExtruder_1.1.9.28_193d1f804.hex:
avrdude: input file Marlin_TAZ6_SingleExtruder_1.1.9.28_193d1f804.hex auto detected as Intel Hex
avrdude: input file Marlin_TAZ6_SingleExtruder_1.1.9.28_193d1f804.hex contains 158612 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 19.70s

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

avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF)

avrdude done.  Thank you.

If everything is OK so far, you can now write a firmware file to the flash. As always, make sure you flash the correct firmware for your printer and tool head, or else you could damage your printer!

$ avrdude -c wiring -P /dev/ttyACM0 -p ATmega2560 -D -U flash:w:Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex:a

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex"
avrdude: input file Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex auto detected as Intel Hex
avrdude: writing flash (170940 bytes):

Writing | ################################################## | 100% 27.16s

avrdude: 170940 bytes of flash written
avrdude: verifying flash memory against Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex:
avrdude: load data flash data from input file Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex:
avrdude: input file Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex auto detected as Intel Hex
avrdude: input file Marlin_TAZ6_SingleExtruder_2.0.0.144_aded3b617.hex contains 170940 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 21.27s

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

avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF)

avrdude done.  Thank you.

Restore your Z offset and E steps/mm, and you’re done!