Skip to main content
Visitor II
June 4, 2021
Solved

Custom "thick" bootloader to boot identical application binary from either address A or B?

  • June 4, 2021
  • 13 replies
  • 4139 views

Hello. I have run into a problem in a MCU project I have. I'll explain the situation.

We have a STM32F072RB -based product where we are implementing firmware update functionality. There would be 3 binaries in the MCU:

  1. Custom "thick" bootloader selecting application binary 1 or application binary 2 and jumping to run it
  2. Application binary 1 beginning at address A
  3. Application binary 2 beginning at address B

Our initial plan was to build different application binaries with explicitly different locations, but my customer is kind of wishing to use only one application binary. Therefore binary 1 would have exactly the same contents as binary 2.

Some experts say the way my customer wants the functionality is almost impossible to make. What do you say?

If anyone has any pointers what to google, what documents to read, etc, I'm all ears.

(My current, possibly stupid, idea is to make the single application binary to contain some kind of functionality to determine where it is run from and if it is run from binary 2 beginning from address B, then maybe perform some kind of elegant function/resource remapping so that when the image 2 runs, it does not use image 1 addresses for stuff, but locations in image 2 address space. Is this totally dumb?)

    This topic has been closed for replies.

    13 replies

    Super User
    September 13, 2021

    > It seems that about 99% of the information of this on various forums and other places is inaccurate, misleading, lacking or wrong.

    The very definition of Internet.

    JW

    Code257Author
    Visitor II
    January 15, 2022

    Still here. Finally writing the article. Stay tuned.