Hello,
I want to load multiple applications onto my NUCLEO-F429ZI. This is for a production product.
The program at 0x08000000 will be a bootloader that decides whether to run the application in partition A or B. These are as follows:
Partition A will be the backup application that is field tested and guaranteed to work.
Partition B will be the beta application
The bootloader should run the program in partition B. If it faults, it will switch to partition A (I still have to figure out how to do this - for another day). To be clear, I am trying to figure out how to place the three separate applications (bootloader/A/B) at once. I have looked around for a solution, but these do not directly answer my question:
www.keil.com/.../ stackoverflow.com/.../running-multiple-applications-in-stm32-flash electronics.stackexchange.com/.../stm32f091-jump-to-bootloader-from-application
** I think I just answered my own question. It is unlikely you can place three applications at once, I will just flash the board three times and change the IROM1 value in settings.
Thank you
My suggested strategy of changing the IROM1 location is wrong. It just places the application at the new location and leaves 0x08000000 empty. The search continues...
You should stop and reconsider the way you plan to get this work. In order to get this done, you need a separate project per program type (bootloader, application A and B). Each must have a unique linker script, determining a unique entry point and vector table. Do not fiddle with IROM1 - use a linker script instead! In addition to that, you will need a variable/RAM location, defined in the bootloader, indicating whether application B failed - such a variable must not be initialized to 0 upon startup of the bootloader (look up ZI and UNINIT elements in linker scripts).
Thank you Tamir, very helpful. I do not have much experience with linker scripts, but I will take the time to learn and report back.
Another import point of interest: In the bootloader, before jumping to application, disable the interrupts and clear the pending ones. In the application initialization procedure, remap the vector table - then enable the interrupts.
View all questions in Keil forum