Firmware:How to Upgrade Firmware using Octoprint

From Unoffical Tevo Tornado Wiki

Pre-Requisites[edit | edit source]

  1. Octoprint server Version : 1.3.6 or later (Tested, other older versions may work).
  2. Octoprint server PLUGIN "Firmware Updater" Version: 1.0.0
  3. Arduino IDE Version: 1.8.5 or later (Tested, You may need newer versions depending on the requirements of the firmware that you are compiling and loading).


Install/Setup OctoPrint Firmware Plugin[edit | edit source]

For "Firmware Updater 1.0.0":

  1. First we need to SSH console to the OctoPrint server. Connect and run the following commands to update and install the package "avrdude". This is a tool to let your pi program the printer board with firmware. The following 3 commands update the list of packages/patches, install updates, then install avrdude:
       sudo apt-get update
       sudo apt-get upgrade
       sudo apt-get install avrdude

This should complete successfully, but may take a long time if your Pi is behind on patches. After installing, your OctoPrint may ask to reboot or restart. If prompted, Reboot/restart and re-establish serial connection.

  1. On your OctoPrint Web interface, under OctoPrint Settings Click on Plugin Manager, then click on "Get More" to search for the plugin.
  2. In the search window type in "Firmware Updater". Select the package by Gina Häußge and Ben Lye, based on work by Nicanor Romero Venier.
  3. After installing, your OctoPrint may ask to reboot or restart. If prompted, Reboot/restart and re-establish serial connection.
  4. On your OctoPrint Web interface, under OctoPrint Settings Click on the "Firmware Updater" and select the wrench configuration icon.
  5. In 1.0.0:

Your Basic settings for Tevo Tornado should look like:

    • Flash method: avrdude (Amtel AVR Family)
    • AVR MCU: ATmega2560
    • Path to Avrdude: /usr/bin/avrdude
    • AVR Programmer Type: wiring

Your Advanced Settings should look like:

    • avrdude Baud Rate: Default
    • Path to avrdude config file:
    • Disable write verification:
    • Disable Boot Loader warning:

Your Post-flash Settings should be:

    • Enable post-flash gcode: X
    • Post-flash gcode: M502;M500

Save these settings when done.

Compiling a Firmware using Arduino IDE[edit | edit source]

The Octoprint Firmware plugin can upload a firmware.hex file to your Tevo. To produce a firmware hex file we need a firmware fileset, to edit the configuration options, Verify it, then export the compiled binary.

  1. Open the Arduino IDE on your PC.
  2. Download and extract a firmware file. You can get them from the Tornado Owners Facebook page Files Section, TH3D site, GitHub, or other sources.
  3. In the Arduino IDE select "File"->"Open", and search for the .ino file in the root of the firmware. This file is typically named Tevo.ino, or Tornado.ino, or TH3DUF.ino (etc..). Once you open the .ino file you should get a number of tabs at the top. You typically only need to find and edit the "Configuration.h" file. Click on that file and edit any settings that you need for your configuration. It is best to read the instructions that come with your firmware.zip file and any readme's that it came with. They often tell you if anything else is required.
  4. Next we need to set our Board Type. Under "Tools"->"Board" select "Arduino/Genuino Mega or Mega 2560".
  5. Next we need to set our Processor Type. Under "Tools"->"Processor" select "ATMega 2560(Mega 2560)".
  6. Once you have your Configuration.h and any other files edited, click on Save.
  7. If you dont already have the U8glib . Check under "Sketch"-> "Include Library" for U8glib. If you have it skip to the next step. If it is missing:
   Go to "Sketch"-->"Include Library"-->"Manage Libraries".  and type U8Glib in the search box.  The one you want is typically all the way at the bottom, "U8glib by Oliver, A library for monochrome TFTs and OLEDs".  Select that and install it. 
  1. Now we can "Verify" click the blue check mark button to try compiling the firmware project. If your install of the Arduino IDE is complete, and compatible with the firmware, this should complete with no errors. This may take a long time on a slow PC. Check the black box for the status. Any pink/red messages probably indicate a problem..
  2. If the above step completed your sketch is compiled. Now we need to produce a hex file for the plugin to upload. Click on "Sketch"-> "Export Compiled Binary". This should create one or two .hex files in the same folder as the .ino file. If your file was named Tornado.ino, your .hex files will most likely be named: Tornado.ino.with_bootloader.mega.hex <-(do not use this one), and Tornado.ino.mega.hex <-(Use this one).

Uploading a Firmware.hex using Octoprint Firmware Plugin[edit | edit source]

All the hard work is done. Once you have a working .hex file and the plugin is installed and configured, you are ready to flash your printer.

  1. On your Octoprint Web interface, under Octoprint Settings Click on the "Firmware Updater". Carefully read the instructions there.
  2. Use the ... from file: Browse button to select your .hex file. AGAIN REMINDER, this should be the NON-BOOTLOADER version of the hex file.
  3. Click on "Flash from File", and follow the prompts.

That should result in a clean firmware update. If this fails you may have bad settings in your Configure.h that are incompatible with your board, a bad .hex file, or a firmware bundle that isnt good. Check with where you got the firmware for help.