cancel
Showing results for 
Search instead for 
Did you mean: 

SBSFU port from F413ZH to F429ZI - Additional code detected beyond FW

AliT
Associate II

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.

3 REPLIES 3
kaur
Associate III

Hi AliT, 

Were you able to resolve this issue? 

I am facing the same problem with P-NucleoWB55 target.
Here is a trace from my execution logs.

======================================================================
= (C) COPYRIGHT 2017 STMicroelectronics =
= =
= Secure Boot and Secure Firmware Update =
======================================================================


= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL
= [SBOOT] STATE: CHECK STATUS ON RESET
. INFO: A Reboot has been triggered by a Hardware reset!
= [SBOOT] STATE: CHECK USER FW STATUS
. SLOT_ACTIVE_1 state = 1
= [SBOOT] STATE: INSTALL NEW USER FIRMWARE
= [SBOOT] RuntimeProtections: 0

.Additional code detected beyond FW
. Installation procedure cannot be finalized!
. FW installation failed!
= [SBOOT] STATE: HANDLE CRITICAL FAILURE
= [SBOOT] STATE: REBOOT STATE MACHINE
========= End of Execution ==========

hw310404
Associate III

Don't know about RAM settings, but based on the info you gave, probably something to do with flash erase operation. Have a look at my old post and hopefully that can give you some help.
Solved: Re: SBSFU 2.6.2 firmware swapping issue - STMicroelectronics Community

Jocelyn RICARD
ST Employee

Hello @AliT ,

I also think issue is related to the flash driver that needs to be updated.

On STM32F413 you have one bank flash whereas on STM32F429 you have dual bank organization. So, you need to update the flash driver to fit with this new flash organization.

Best regards

Jocelyn