2025-03-21 11:04 AM
Hi, I'm following the steps on the reference manual to perform in-application programming by first writing the new firmware to bank 2 and then swapping the banks after doing some checks.
After completing the steps and performing a software reset, the new firmware was updated. However, after closing the st-link debugger and reopening it, the debugging session immediately closes. I'm trying to figure out why.
I have written the new firmware starting at address 0x0810 0000 according to the following:
I was wondering whether I need to offset by a couple sectors from the 0x810 0000 start address before flashing new firmware. Please let me know I'm mistaken, thanks.
2025-03-21 7:05 PM
Well if you have common code at 0x0800000 and 0x08100000 you can at least fork() between the two regions with the bank switch. Perhaps a couple of KB for a loader/recovery method.
You need to link the image for the address it's going to physically execute, not necessarily where you have it parked before it's swapped around.