2023-10-13 05:45 AM - edited 2023-10-13 05:47 AM
Hello all,
I am using the SBSFU v2.6.2 on STM32H753 - (2 slots based) for a few months now, and am trying to enable the Firmware Rollback feature right now. During this attempt, I had enabled ENABLE_IMAGE_STATE_HANDLING as required in SE, SBSFU and UserApp projects and then built all of them. I see in the SFU header region of the User App binary that gets generated finally and find that the parameter FwImageState is filled with FWIMG_STATE_VALID whereas I expected FWIMG_STATE_NEW. (Please refer screenshot below)
Due to this, I am failing to update to Self-Test state at SFU_IMG_UpdateImageState(), while launching from Active slot, as well as during the Firmware installation process at FirmwareToInstall(), as it fails to recognize the new image.
At SFU_IMG_UpdateImageState()
At FirmwareToInstall()
I use the following command in the postbuild.sh that generates the header:
command=$cmd" "$prepareimage" header -m "$magic" -k "$ecckey" -p 1 -r 44 -v "$version" -f "$bin" -t "$sign" -o "$offset" "$headerbin
I wanted to know how to generate a firmware image with FWIMG_STATE_NEW state in the SFU header.
Also, how is this usually done professionally?
2023-10-31 08:20 AM
Hello @Sreedhar ,
I'began the investigation on this issue and i'm able to reproduce the same the same header configuration. Can you give more details on the SBSFU configuration related to the encryption method and the files on which you have enabled ENABLE_IMAGE_STATE_HANDLING .
regards,
Hichem
2023-11-28 05:19 AM
I got this, which is not what I expected, but it's not breaking the installation. You should go back to the default project as delivered in the ST X-Cube package and try from there, doing small steps.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.