M2354: Fix potential issues in TF-M
Fix the following issues in TF-M to avoid emergence in the future: 1. Enable initial stack not located in SRAM bank0 On reset, only SRAM bank0 is enabled. And SRAM bank1/2 will be enabled in immediately following SystemInit(). When initial stack is located in SRAM bank1/2, we will meet trouble because SystemInit() itself needs to use initial stack. To conquer the dilemma, we add preceding code in front of original Systeminit(), which is responsible for enabling SRAM bank1/2 and guarantees no using initial stack. 2. Fix sector maps of internal/external (SDH) Flash are incompatible, caused by TF-M's MCUboot port. This is done by adapting external (SDH) Flash sector size to internal Flash's. 3. Enlarge firmware upgrade scratch size. There are two advantages: (1) Get around MCUboot limit which requires scratch size not smaller than image trailer size (2) Improve wear leveling for the scratch area |
---|
|
targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/bl2.bin |
---|
Not supported
|
targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/partition/flash_layout.h |
---|
targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/tfm_s.axf |
---|
Not supported
|
targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/tfm_s.bin |
---|
Not supported
|