This method applies to the FYSETC Cheetah and other STM32-based boards which are updated using stm32flash.
Note: STM32-based boards which can be updated from the SD card (e.g., SKR Pro v1.1, SKR Mini E3 v2) should use the lpc176x flash method. This method described on this page is only for boards which are updated using stm32flash.
To flash an STM32-based board using stm32flash, the tool needs to be installed on the OctoPrint host.
sudo apt-get update
sudo apt-get install stm32flash
Brew is used to install stm32flash on macOS.
brew install stm32flash
Use the command which stm32flash
to check the installation and find the full path to the executable
pi@octopi:~ $ which stm32flash
/usr/bin/stm32flash
You can install a Windows binary from https://sourceforge.net/projects/stm32flash/ however the plugin hasn't been tested on that platform.
The only required setting is the path to the stm32flash binary.
Option | Description |
---|---|
Verify while writing | By default write verification is done during the write process; uncheck this box to disable it. It is strongly recommended to keep it enabled. |
BOOT0 and Reset pins | When using ST serial bootloader the boards needs to enter bootloader mode by setting the MCU BOOT0 to HIGH and then setting MCU RESET to LOW. Such MCU inputs are generally connected to RTS/DTR signals of the USB-UART transceiver. For example, FYSETC Cheetah uses RTS to set BOOT0, and DTR to reset. Please set STM32Flash BOOT0/Reset according to your board. |
Start Execution Address | Unlike other MCUs, STM32s will remain in bootloader mode after resetting DTR line and realeasing UART. The bootloader needs an explicit command to jump at a given flash address. Set the Execution address according to your board. |
Reset after flashing | When setting Execution address the reset option is ignored by stm32flash. Setting Reset instead of Execution address will actually send an Execute @ 0x00000000 , which is where the bootloader is located. You will then need to power cycle your board to execute firmware. Enabling this option is not recommended. |