Skip to main content
Visitor II
September 16, 2021
Question

About library of built-in bootloader

  • September 16, 2021
  • 2 replies
  • 827 views

Hi,

There are host and slave MCU, both are ST MCU.

Slave MCU does not have wifi/ble for OTA upgrade. I would like to use host MCU to download slave MCU image and then use built-in bootloader to upgrade slave MCU.

I can find the communication protocol document of how to use built-in bootloader.

I would like to ask if ST has released any library of built-in bootloader for host? Or I just need to follow the protocol document to write my own library (host)?

    This topic has been closed for replies.

    2 replies

    Super User
    September 16, 2021

    > I can find the communication protocol document of how to use built-in bootloader.

    The general bootloader info is in AN2606.

    https://www.st.com/resource/en/application_note/cd00167594-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

    Specific documents exist for each protocol. For example for UART:

    https://www.st.com/resource/en/application_note/cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

    > I would like to ask if ST has released any library of built-in bootloader for host?

    ST doesn't publish a library to interface with the bootloader as far as I know.

    Graduate II
    September 16, 2021

    There used to be a tool called Flash Loader Demonstrator, open source things like stm32flash, and I wrote my own years ago just following the protocol docs.

    The Arduino MKR WAN 1300 boards use a Murata LoRa modules using an STM32L072, they push in a firmware update using the UART pins and BOOT0/NRST. The Atmel/Microchip processor has 1 or 2MB of space to facilitate this. There is also a pass-thru example

    https://github.com/arduino-libraries/MKRWAN/tree/master/examples/MKRWANFWUpdate_standalone

    https://store-usa.arduino.cc/products/arduino-mkr-wan-1300-lora-connectivity

    If you don't like the ST protocol, something with better flow control like X-MODEM is an option. ST has posted there own IAP examples using Y-MODEM, and I've seen a couple of radio firmware boot-loaders implement that.