Showing results for 
Search instead for 
Did you mean: 

SBSFU 2image 2active dualcore Error during swap process.

Associate III

I am implementing sbsfu on stm32h745 chipset.
Ported 2images from stm32h753 sbsfu examples.
Among slots 1 and 2, slot 1 is intended to be used by cm7 and slot 2 by cm4.
Although cm7 is operating normally, I created a separate cm4 package, created an sfb file, and confirmed that the cm4 firmware was installed in dwl_slot2. However, the firmware needs to be moved to active slot 2, but I have no idea how to do it. How to solve this?


__ICFEDIT_SWAP_start__           = 0x08100000;
__ICFEDIT_SWAP_end__             = 0x0811FFFF;

/* Active slot #1 in Sector 1 to 7 of Bank1; 7 x 128 kbytes */
__ICFEDIT_SLOT_Active_1_start__  = 0x08020000;
__ICFEDIT_SLOT_Active_1_end__    = 0x0809FFFF;
__ICFEDIT_SLOT_Active_1_header__ = __ICFEDIT_SLOT_Active_1_start__;

/* Dwl slot #1 in sector 1 to 7 of Bank2 : 7 * 128 kbytes */
__ICFEDIT_SLOT_Dwl_1_start__     = 0x08120000;
__ICFEDIT_SLOT_Dwl_1_end__       = 0x0819FFFF;

__ICFEDIT_SLOT_Active_2_start__  = 0x080A0000;
__ICFEDIT_SLOT_Active_2_end__    = 0x080BFFFF;
__ICFEDIT_SLOT_Active_2_header__ = __ICFEDIT_SLOT_Active_2_start__;

__ICFEDIT_SLOT_Dwl_2_start__     = 0x081A0000;
__ICFEDIT_SLOT_Dwl_2_end__       = 0x081BFFFF;
#define SFU_NB_MAX_ACTIVE_IMAGE 2U                        /*!< 1 active image managed */
#define SFU_NB_MAX_DWL_AREA     2U                        /*!< 1 dwl area managed */
#define MASTER_SLOT             SLOT_ACTIVE_1             /*!< SLOT_ACTIVE_1 identified as master slot */
Jocelyn RICARD
ST Employee

Hello @yolominwoo;,

the SBSFU should recognize the firmware in download slot 2 as a "slot 2" firmware.

For this, you need to provide this slot number in the postbuild command the generates the sfb file. This is the parameter that is just before the version number.

You can see the result in the header of SFB file : First 4 bytes should be SFU2 instead of SFU1

Please not that it is possible to create only one download slot for the 2 firmwares. In that case, you will be able to update one by one and not both at the same time.

Best regards


I'm get a Error message.


prepareimage.exe enc -k ../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/OEM_KEY_COMPANY2_key_AES_CBC.bin -i ../../../2_Images_SECoreBin/STM32CubeIDE/../Binary/iv.bin ../UserApp.bin ..//../Binary/UserApp.sfu : failed


Jocelyn RICARD
ST Employee

Hello @yolominwoo 

the error tells you what is the issue: you need to have other set of keys to encrypt and sign the image.

Keys are located in SECoreBin\Binary

Best regards


I finally made SFU2 Image but cm4 can't boot...

CORE_CM7 Active0x080200000x0803FFFF
CORE_CM7 Active0x080400000x0805FFFF
CORE_CM7 Active0x080600000x0807FFFF
CORE_CM7 Active0x080800000x0809FFFF
CORE_CM7 Dwl0x080A00000x080BFFFF
CORE_CM7 Dwl0x080C00000x080DFFFF
CORE_CM7 Dwl0x080E00000x080FFFFF
CORE_CM7 Dwl0x081000000x0811FFFF
CORE_CM4 Active0x081800000x0819FFFF
CORE_CM4 Dwl0x081A00000x081BFFFF

I'm setting like this so I can Download in 0x081A0000 for cm4 firmware but can't Active.