We have a secondary bootloader, put in Flash Bank1 IFR0 region (0x0100_8000 to 0x100FFFF). The BOOT_SRC within CMPA is set to 2 for transferring control to Secondary Bootloader from BOOTROM on Power-Up. It works correctly. We can transfer the control to Main Application residing at address 0x0000_0000.
We would like to have DUAL Main Application setup and not quite sure how exactly it works. We would like to store a Second copy Main Application at 0x0008_0000. Essentially, first one is at 0x0000_0000, can grow up to 0x0007_FFFF and second one is at 0x0008_0000 which can grow up to 0x000F_FFFF, occupying 512 KB each.
We understood about the Flash Remap feature. which is programming FLASH_REMAP_SIZE from CMPA to kind of partition the on chip flash. We also understood that the selection of the image will be decided by BOOTROM code.
In our case the, the boot process also have our secondary bootloader as mentioned above and it is the one which always executes after BOOTROM. The question is how to use the Dual Main Application (on On-chip Flash and REMAP feature) with Secondary Bootloader (on Bank1Ifr0).