SBSFU port from F413ZH to F429ZI - Additional code detected beyond FW
I am trying to port SBSFU to my target MPU which is F429ZI. I am currently using NUCLEO-F429ZI board for testing and used Discovery-F413ZH example as starting point.
To do so, I replaced BSP functions with NUCLEO pin mapping (changed USART6>USART3, USER_KEY and LEDs) easily, but the more critical part are changes in "mapping_sbsfu.ld" and "mapping_fwimg.ld". As the target MPU has more flash I left "mapping_fwimg.ld" unchanged and for "mapping_sbsfu.ld" I just changed the following:
/* SBSFU RAM1 region */
__ICFEDIT_SB_region_RAM_start__ = __ICFEDIT_SE_region_RAM_end__ + 0x1;
__ICFEDIT_SB_region_RAM_end__ = 0x200200EF; //original value for F413ZH 0x2003FFEF
/* Shared RAM for Image State Handling */
__ICFEDIT_SB_FWIMG_STATE_region_RAM_start__ = __ICFEDIT_SB_region_RAM_end__ + 1;
__ICFEDIT_SB_FWIMG_STATE_region_RAM_end__ = 0x200200FF; //original value for F413ZH 0x2003FFFF
Now I can run the SBSFU and program UserApp for the first time, however any attempt to update UserApp fails.
If I use "Download a new Fw Image" from user app I get
================ New Fw Download =========================
-- Send Firmware
-- -- Erasing download area ...
-- !!Operation failed!!
And if I use USER_Key at boot-time to force SBSFU to download state, I get
= [SBOOT] STATE: CHECK USER FW STATUS
New Fw to be installed from slot SLOT_DWL_1
= [SBOOT] STATE: INSTALL NEW USER FIRMWARE
Additional code detected beyond FW
= [SBOOT] STATE: HANDLE CRITICAL FAILURE
= [SBOOT] STATE: REBOOT STATE MACHINE
========= End of Execution ==========
I think it is duo to miss-configuration to RAM address but I can't find the root.
