Skip to main content
FMass.1
Associate III
September 19, 2023
Question

Official STM32 Bootloader

  • September 19, 2023
  • 11 replies
  • 49324 views

Hi, I need to update the firmware of my MCU from the UART. I mean without physically touching the BOOT pin, but only via serial commands (classic FW update of a product).

I'm not an expert, but I tried searching on the internet and I saw that for these things it is necessary to write a bootloader. It doesn't seem impossible, but for a non-expert it's not exactly simple.

What I wanted to ask is, I think this is a very common need among users, has STM created anything official to support this feature? Is there something already given and official that I can use without necessarily writing my own custom bootloader? Maybe even supported directly in CubeMX.

I've seen that there are dozens of amateur/community bootloaders available, but not knowing how to write it, I can't even evaluate whether it's done well or whether it's suitable for my application, which is why I'm looking for an official STM solution.

11 replies

Pavel A.
Super User
September 19, 2023

The ST OpenBootloader behaves like the built-in STM32 bootloader. You can start from it and modify to your product. Also you can convince someone else to make a perfect bootloader for you.

TDK
Super User
September 19, 2023
"If you feel a post has answered your question, please click ""Accept as Solution""."
Graduate
August 2, 2024

Hello @FMass.1 
   Rajat here, May I know which controller are you using?
I have developed Custom boot loader for STM32L452 and I have also demonstrated the Firmware updates, Erase Flash Memory, and Read, and Write protection.
Let me know if you need help
you can connect with me on LinkedIn https://in.linkedin.com/in/metharajat5
or email metharajat5@gmail.com

I have attached a tera term log for the same.

MM..1
Chief III
December 3, 2024

Primary write your app right way to activate some bootl method. And read AN2606

Visitor II
June 14, 2025

Hey, ST Community, For the STM32L452, I have created a custom boot loader and demonstrated read-write protection, firmware updates, and flash memory erasure.


Tell me if you need assistance.

December 16, 2025

STM already provides an official solution through the built-in system bootloader that comes preloaded on most STM32 devices, which supports UART firmware updates without needing to toggle the BOOT pin physically, as long as your application can jump to it via software. This approach is documented by STM and is generally safer than relying on third-party bootloaders, especially for production products. While CubeMX doesn’t generate this flow automatically, STM’s AN2606 and related app notes explain how to invoke the system bootloader from user code, making it a practical and officially supported path without writing a full custom bootloader from scratch...

Visitor II
December 4, 2025

@patriciasamue It’s understandable why you’d look for an official, ready-made STM solution, because implementing a UART-based firmware update without hardware interaction is a very common requirement. STM does provide the built-in system bootloader, but it generally requires the BOOT pins to be set, and they don’t offer an official fully software-triggered UART. For remote updates, most developers end up using a custom bootloader tailored to their product’s workflow, which is why so many community versions exist. If you need something reliable without having to design one from scratch, the best approach is to review STM’s AN2606 and AN3155 documentation and build a minimal custom layer around the system bootloader.

December 16, 2025

STM already provides an official solution through the built-in system bootloader that comes preloaded on most STM32 devices, which supports UART firmware updates without needing to toggle the BOOT pin physically, as long as your application can jump to it via software. This approach is documented by STM and is generally safer than relying on third-party bootloaders, especially for production products. While CubeMX doesn’t generate this flow automatically, STMs AN2606 and related app notes explain how to invoke the system bootloader from user code, making it a practical and officially supported path without writing a full custom bootloader from scratch.

Best Regards!

February 3, 2026

Hello, ST Community I have developed a unique boot loader for the STM32L452 and shown how to upgrade the firmware, erase the flash memory, and provide bstation read-write protection.


If you need help, let me know.

February 4, 2026

Hello, ST Community I have developed a unique boot loader for the STM32L452 and shown how to upgrade the firmware, erase the flash memory, and provide read-write protection...

February 6, 2026

Actually, STMicroelectronics already provides an official solution for this that doesn't require you to write a single line of custom bootloader code. Every STM32 comes with a System Memory Bootloader pre-programmed at the factory. While this is typically activated by the physical BOOT pins, you can trigger it entirely through software by performing a "jump to system memory" from your main application code. This effectively hands over control to the official ST bootloader, which then listens for firmware updates over UART. To implement this, you simply need to de-initialize your peripherals, disable interrupts, and set the program counter to the System Memory start address (which varies by chip, so check AN2606). For the PC/Host side, you can use the official STM32CubeProgrammer to send the new firmware via UART using the standard protocol defined in AN3155. If you later find you need even more customization (like custom decryption or a specific protocol), ST also provides the Open Bootloader middleware component, which is a source-code version of their bootloader that you can integrate directly via CubeMX...