All AVR boards can be flashed using avrdude. Many boards have a bootloader installed which allows flashing via the USB port, but some boards will required hardware such as a USBasp or other In-System-Programmer (ISP).
You will need to know how to configure avrdude to flash your board before you can flash it with the Firmware Updater plugin. If you do not know what settings you need you maybe able to find out from a user community or forums for your printer/board.
To flash an ATmega-based board the tool avrdude
needs to be installed on the OctoPrint host.
sudo apt-get update
sudo apt-get install avrdude
Information about the package needed can be found here Ubuntu avrdude package
sudo add-apt-repository ppa:pmjdebruijn/avrdude-release
sudo apt-get update
sudo apt-get install avrdude
The minimum settings needed are:
- AVR MCU Type
- Path to avrdude
- AVR Programmer Type
Typical MCU/programmer combinations are:
AVR MCU | Programmer | Example Board |
---|---|---|
Atmega1284p | arduino | Anet A series, most Creality boards, Ender, etc. |
Atmega2560 | wiring | Creality CR-10 Max, RAMPS, Prusa MK3 (RAMbo), etc. |
Atmega644p | arduino | Sanguinololu, Melzi |
Atmega32u4 | avr109 | Prusa MMU, Prusa CW1 |
To locate avrdude
on most Linux variants (including OctoPi):
- Connect via SSH and run the following:
which avrdude
- The output should be similar to:
pi@octopi:~ $ which avrdude /usr/bin/avrdude pi@octopi:~ $
- Add the full path to avrdude in the plugin settings.
Option | Description |
---|---|
avrdude Baud Rate | Speed for communication with the board. 'Default' is strongly recommended. |
avrdude config file | Can be used to override the default config file with a custom one. |
Disable write verification | Speed up flashing by not verifying the write operation. Not recommended! |
Command line | Customize the avrdude command line, e.g. to specify an MCU or programmer which is not listed. |
Disabling bootloader warning | Disables a warning which is shown the hex filename has 'bootloader' in it. |
The Atmega-based mainboard in the Ender 3 (and probably other devices) is supplied without a bootloader. The first time you want to upgrade its firmware you have to use extra programming hardware (a USBasp) to install a bootloader. Alternately you can use the "USB ISP" programmer which they include with their BL-Touch Add-on Kit, which comes with a pinout card.
Original firmware files for Prusa MMU and CW1 have special in the begining of the file:
For MMU these are:
1 ;device = mm-control
2
and for CW1:
1 ;device = cw1
2
The Firmware Updater plugin will automatically detect these headers and handle the files accordingly.
To flash the MMU you need to create an additional profile with different settings:
Setting | Selection |
---|---|
Flash Method | avrdude |
AVR MCU | ATmega32u4 |
AVR Programmer | avr109 |