Skip to main content
ray
Associate III
October 14, 2013
Question

How to use bootloader to upgrade bootloader in STM32?

  • October 14, 2013
  • 4 replies
  • 713 views
Posted on October 14, 2013 at 10:11

I designed a bootloader and erase it to sector 0. It can erase other bin into other sectors using IAP. But how to  upgrade itself to sector 0? Does anyone give me an idea?

Thanks.
    This topic has been closed for replies.

    4 replies

    Tesla DeLorean
    Guru
    October 14, 2013
    Posted on October 14, 2013 at 13:30

    Copy the updating code to RAM, and run it from there.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    ray
    rayAuthor
    Associate III
    October 16, 2013
    Posted on October 16, 2013 at 06:58

    Hi clive1,

    How to copy a function(include upgrading code) to a RAM address? Is it possible?

    If not, I need to create another upgrading project and include the binary code of this project into bootloader?

    ray
    rayAuthor
    Associate III
    October 16, 2013
    Posted on October 16, 2013 at 07:02

    Hi Clive1,

    How to copy a functon which includes updrading code to a RAM address? Is it possible? If not, do I need to create another upgrading project and include the binary code of this project into bootloader?

    Tesla DeLorean
    Guru
    October 16, 2013
    Posted on October 16, 2013 at 15:44

    Coding a whole other applet is one approach, if your current code is address agnostic you could use that too. I, personally, wrote a small block of assembler code which I can copy anywhere in memory, and has a clearly understood call tree. This would be more challenging in C, and using external/library subroutines.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..