Skip to main content
Shilpashree Madhu
Associate III
February 17, 2022
Question

I am trying to write a Bootloader on STM32L4R5ZI MCU that gets data through the UART.

  • February 17, 2022
  • 3 replies
  • 1888 views

My question is I need to send the Application's binary file with CRC using Teraterm/Docklight.. so in the Bootloader project, I need to receive the Hex file of the application and verify the CRC of it, if it matches then it should be written to flash area.. how do I do?

This topic has been closed for replies.

3 replies

KnarfB
Super User
February 17, 2022

Search for existing bootloader projects for STM32, there are plenty of them like OpenBLT.

hth

KnarfB

Shilpashree Madhu
Associate III
February 17, 2022

Yeah, I saw some openbootloader projects but they are all difficult to understand, I want simple bootloader configuration for flashing application bin file using STM32 Cube Programmer how can i do it, please help me...

KnarfB
Super User
February 17, 2022

STM32 MCUs have a "system memory boot" mode which is a built-in bootloader. STM32CubeProgrammer can talk to it. Just set the boot pins accordingly (see reference manual), connect chip to STM32CubeProgrammer via UART (see system memory boot app. note to find the correct pins), reset the chip. There is no need to write own code here. There are also tutorials on how to jump to system memory boot loader your from application code (without setting boot pins)

hth

KnarfB

Shilpashree Madhu
Associate III
February 17, 2022

Thank you..

MM..1
Chief III
February 17, 2022

System bootloader will work for you fine only when USART is on pins from AN2606 for your MCU.

Otherwise you need change schematics or use own bootloader.

Your idea with load and check one CRC work only if your fw size is less as RAM... Normal bootloader use blocks and crc on every block usw.