Problems modifying SBSFU to support large application firmware image on dual bank device.
Hello,
I am adapting the X-CUBE-SBSFU (version 2.5.0) for use in our product which uses the STM32L486RE device and I am using external flash memory to receive the downloaded firmware image. I used the sample project '2_Images_ExtFlash' for the B-L475E-IOT01A board as a starting point and I have been able to get everything up and running on my target hardware. I can bootload a small user application similar to the one used in the sample. However, I have run into some problems because the real application image that I will be installing is larger than a single bank of the MCU internal flash space.
I have configured the bootloader to use one active slot in internal flash and have placed the header of the active image immediately after the SBSFU code (__ICFEDIT_SB_region_ROM_end__). The active image is allocated the remainder of the internal flash with the exception of the last sector that I need to keep reserved for storing application non-volatile data. At this point I have resorted to disabling firewall protection as well as the parts of SFU_IMG_InitImageHandling() that check that the firewall NVData section overlaps the code section, and that the on the firmware headers are under firewall protection.
I understand that for devices with dual-bank flash (such as the STM32L486RE) there are firewall overlap constraints to ensure secrets are protected if the banks are swapped. What is the best way to adapt the SBSFU to work with a large application image size (> single bank)? I would like to provide as much security as possible.
Thank you.
