Skip to content

OctoPrint/OctoPrint-FirmwareUpdater

Repository files navigation

OctoPrint Firmware Updater Plugin

The Firmware Updater plugin can be used to flash pre-compiled firmware images to your printer from a local file or URL.

Firmware Updater

Documentation Index

  1. Supported Boards
  2. Plugin Installation
  3. Plugin Configuration
  4. Flashing Firmware
  5. Advanced Options
    1. Customizing the Command Lines
    2. Pre and Post Flash Settings
    3. Plugin Options
  6. Troubleshooting
  7. Donations

Supported Boards

The plugin supports a variety of boards, based on the MCU (processor) they have:

Description Examples Flash Method
Atmel ATmega 8-bit MCUs RAMPS, Sanguinololu, Melzi, Anet, Creality, Ender, Prusa MK3, Prusa MMU, Prusa CW1 many others avrdude
Atmel AT90USB 8-bit MCUs Printrboard dfuprog
NXP LPC176x 32-bit MCUs MKS SBASE, SKR v1.1, v1.3, v1.4, v1.4 Turbo etc. lpc176x or marlinbft
Atmel SAM 32-bit MCUs Arduino DUE, etc. bossac
STM32 32-bit MCUs (via SD card) SKR Pro v1.1, SKR Mini E3 v2, etc. lpc176x or marlinbft
STM32 32-bit MCUs (ST Bootloader) FYSETC Cheetah stm32flash
STM32 32-bit MCUs (DFU Mode) MKS Rumba 32 dfu-util
OpenBLT Bootloader Any board with the OpenBLT bootloader lpc176x or bootcommander

Please open a Github issue if you would like a new board or MCU to be supported. If it's a new type of board which requires hardware testing please consider making a donation to help fund the costs.

Plugin Installation

Install via the bundled Plugin Manager or manually using this URL: https://github.com/OctoPrint/OctoPrint-FirmwareUpdater/archive/master.zip

Using OctoPrint's Software Update plugin you can choose one of three Release Channels to follow:

Release Channel Description
Stable (Recommended) Updated least frequently, features are stable
Release Candidate Updated when new features are ready for testing
Development Updated frequently, may be unstable, used for beta-testing new features

If you report a bug or request a new feature you will probalby be asked to test development or RC builds.

Plugin Configuration

The appropriate flashing tool for the board type needs to be selected. See the table in the supported boards section to choose the appropriate method.

Note: If your board is updated by copying a file named firmware.bin to the SD card and resetting the board, you should use the lpc176x method. This applies to SKR Pro v1.1 or SKR Mini E3 v2 boards and probably others.

Board-Specific Configuration

Plugin settings vary depending on the flashing tool and are documented on the page for each flash method. Follow the instructions on the appropriate page to install and configure any necessary tools:

Flashing Firmware

Once the plugin is configured, flashing firmware is a simple operation:

  1. Select the COM port to communicate with the board
  2. Select a firmware file, either located on the filesystem or via a URL
  3. Click the appropriate Flash from button
  4. Wait for the firmware update to complete

Advanced Options

Customizing the Command Lines

The command lines for avrdude, bossac, and dfu-programmer can be customized by editing the string in the advanced settings for the flash method. Text in braces ({}) will be substituted for preconfigured values if present.

String Description
{avrdude} Full path to the avrdude executable1
{bossac} Full path to the bossac executable2
{dfuprogrammer} Full path to the dfu-programmer executable3
{mcu} MCU type4
{programmer} Avrdude programmer1
{port} COM port the printer is connected to
{conffile} Full path to the avrdude configuration file1
{baudrate} Serial port speed1
{disableverify} Switch to disable write verification
{firmware} Path to the uploaded firmware file
  1. avrdude flash method only
  2. bossac flash method only
  3. dfu-programmer flash method only
  4. avrdude and dfu-programmer flash methods

Command Line Defaults

Command lines can be returned to the default by clicking the Reset button.

Avrdude

{avrdude} -v -q -p {mcu} -c {programmer} -P {port} -D -C {conffile} -b {baudrate} {disableverify} -U flash:w:{firmware}:i

Bossac

{bossac} -i -p {port} -U true -e -w {disableverify} -b {firmware} -R

Dfu-programmer

Erase: {bossac} -i -p {port} -U true -e -w {disableverify} -b {firmware} -R Flash:

Pre and Post-flash Settings

The flash sequence is:

  1. Execute the pre-flash system command(s) on the host
  2. Send the pre-flash gcode commands(s) to the printer
  3. Pause for the pre-flash gcode delay
  4. Disconnect the printer
  5. Execute the firmware update
  6. Pause for the post-flash delay
  7. Execute the post-flash system command(s) on the host
  8. Reconnect the printer
  9. Send the post-flash gcode command(s) to the printer
Option Description
Pre-flash System Command Specify a system command or script to run on the host prior to flashing. Multiple commands can be separated with a semicolon.
Pre-flash Gcode Specify gcode commands to run on the printer prior to flashing. Multiple commands can be separated with a semicolon. Commands are only run if the printer is connected when flashing is initiated
Pre-flash Gcode Delay Delay after sending pre-flash gcode. Allows time for code to complete before initiating flash.
Post-flash Delay This setting can be used to insert a delay of up to 180s after the firmware has been uploaded. This can be useful if the board takes some time to restart. A delay of 20-30s is usually enough.
Post-flash System Command Specify a system command or script to run on the host after flashing. Multiple commands can be separated with a semicolon.
Post-flash Gcode You can use the post-flash gcode settings to run gcode commands after a successful firmware flash. The post-flash code will run more or less immediately if the printer was connected before the flash started (so reconnects automatically when the flash finishes), or whenever the printer is manually reconnected after the firmware is flashed.

Plugin Options

Option Description
Enable Navbar Icon Enables an icon in the OctoPrint Navbar which can be used to quickly access the Firmware Updater.
Remember URL The last URL will be remembered when using 'Flash from URL.

Troubleshooting

Log messages can be found in the OctoPrint log octoprint.log and the Firmware Updater's console log plugin_firmwareupdater_console.log.

Both log files can be downloaded from OctoPrint's logging interface, found under 'Logging' in the settings page.

If you have trouble using the plugin please check these logs for any error messages. If you need help, please include both logs when reporting a problem.

Donations

Donations to help with the cost of test hardware are gratefully received using any of the methods below.

Currency Link
Bitcoin 1GjUmcjnAxCr9jFPUtVrr6gPQz8FhYddZz
Bitcoin Cash bitcoincash:qzqys6mv9rgg7dxx0m4jzgqjezu9sryk2vmdexcr56
Ethereum 0xA1788874E851b425F65FF5bcB6180b0d9F50fB6d
USD https://www.paypal.com/