1
\$\begingroup\$

I am new to the STM32 world. I know that all STM32 MCUs come with an internal bootloader. Is it possible to replace it with custom boatloader?

\$\endgroup\$
6
\$\begingroup\$

No, it is baked into the chip at manufacture time.

You can however write your own bootloader which you store in the microcontroller's flash and will be executed at power on or reset. There are a number of boot pins which determine where the processor starts executing code from when it's powered on or reset.

\$\endgroup\$
  • \$\begingroup\$ Does this 'baked bootloader' can use any of the interface from UART, serial or USB? Is it same across all the STM32 F0 to F7 families? \$\endgroup\$ – scico111 Feb 6 at 3:45
  • \$\begingroup\$ And if i want to flash my custom bootloaded into a MCU, especially STM32F407, then how would i do that.. will it be a single .hex file that has my custom bootloaded as well as my application code OR is it possible to flash (and re-flash ) the bootloader .hex file separately while flash (and update) the app code separately? \$\endgroup\$ – scico111 Feb 6 at 3:54
  • 2
    \$\begingroup\$ Which interface it uses depends on the processor, you need to check in the manual. To flash you would use an st link or jtag programmer. You can create a single binary with your bootloader and application, or flash them separately. \$\endgroup\$ – Colin Feb 6 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.