cancel
Showing results for 
Search instead for 
Did you mean: 

OpenBootLoader Advice / Best Practice

DenzilDexter
Associate

Hello Forum,
I would appreciate some advice regarding bootloaders. Apologies in advance as this is mostly new to me. I have been researching the pre-programmed ST System Bootloader and OpenBootLoader (OBL) to try and figure out whether they are appropriate for firmware update in our product. Our product will most likely contain multiple STM32U5 MCUs connected together on a CAN bus. Firmware update will be performed from a Windows PC either connected to the same CAN bus or via USB to the 'main' MCU. The main 'MCU' is likely to have a 64MB filesystem available to it.

Assuming we decide to use the ST SystemBootloader then these questions come to mind:

  • I guess the general approach is - get the MCU running the SystemBootLoader, Update the firmware, Re-boot to new firmware.
  • What's the usual way to get the system to boot to the SystemBootLoader? I have read that this is possible using 'boot option bytes' but what set's them? In AN2606 it talks about how to activate the Bootloader on 
    Page 31: Bootloader Activation and for the STM32U585 - it's Pattern 12 - How is this pattern applied and when?
  • I cannot see a way to verify the image on the target. The bootloader simply receives data over whichever bus is activated and writes it to flash. If I wanted/needed to validate the image on the target (e.g. via a digital signature) then I guess that would exclude the use of the SystemBootloader.
  • What's the recommneded way of updating each MCU's firmware? I see the SystemBootloader can only cope with 1 CAN node so I'm unsure of what to do to update all of them. I can obviously devise a scheme to do something proprietary but I was hoping to avoid that if there's a standardised approach.

Assuming we decide to use the OpenBootloader at the start of flash and the application at an offset from that like this:

----------------------
      (ROM)
SystemBootloader --|
----------------------   <-| Jump (option byte settings)
     (Flash)
OpenBootLoader --| On Go Command
---------------------- <-| Jump
     (Flash)
   Application
----------------------

The SystemBootloader loads runs OpenBootloader. This, so far as I can tell by looking at the code, will sit forever waiting for the GO command which is not want we want if an application has already been programmed. How should we approach this? It seems to me that there needs to be a mechanism to tell OpenBootLoader to just jump to the application but I'm 0% sure of this as I have no experience. What would be the right way?

Any advice much appreciated.
/P

0 REPLIES 0