Bootloader in bank A: Self-Update - anything special? (LPC4357)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by mysepp on Wed Dec 02 15:15:43 MST 2015

I have a bootloader which is stored in bank A. The bootloader shall be able to update itself.
I collect my new bootloader in RAM. When everything is transmitted to RAM
and verified to be correct by a checksum, I replace the existing bootloader.

Theoretically it seems to be working, I get no errors when using IAP commands.
Addressses where I store the bootloader and which I take data from RAM, used length paramers
seem to be correct.
Nevertheless it seems (at least part of it) is the old bootloader???

Is there something special to pay attention? Perhaps are some flash areas remapped during start-up,
which I must un-remap first or put the sector to the mapped address?

I think to remember that such a thing was used in old LPC176x (or was it even earlier with LPC21xx?),
where vector table was replaced (or replaceable) by RAM...

Or is there perhaps some example of a bootloader which can replace itself?

BTW: Is it correct to call "activate flash bank" (of bank A) every time or is it only needed once,
when bootloader is installed the first time?

Many thanks!

Best regards,