cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H753I secure boot SBSFU_UserApp.bin loops trying to start UserApp

chuan_lee
Associate II

Porting NUCLEO-H753ZI/Applications/1_Image to STM32H753.

This is running on STM32H753I-EVAL2 board.

The bootload can be done in 2 steps (download SBSFU.bin, then download UserApp.bin) or in 1 step (download SBSFU_UserApp.bin). The behavior is the same: bootload starts, detects userapp, tries to jump to userapp at 0x08020400. Then the system restarts...

= [SBOOT] SFU_BOOT_CheckApplySecurityProtections

= [SBOOT] System Security Check successfully passed. Starting...

==========================================

=       (C) COPYRIGHT 2017 STMicroelectronics          =

=       Secure Boot and Secure Firmware Update       =

==========================================

= [SBOOT] SECURE ENGINE INITIALIZATION SUCCESSFUL

= [SBOOT] STATE: CHECK STATUS ON RESET

     INFO: Last execution status before Reboot was: Verifying Fw Image status.

     INFO: Last execution detected error was: No error. Success.

= [SBOOT] STATE: CHECK NEW FIRMWARE TO DOWNLOAD

= [SBOOT] STATE: CHECK USER FW STATUS

     A valid FW is installed in the active slot - version: 1

= [SBOOT] SFU_BOOT_SM_VerifyUserFwSignature: VERIFY USER FW SIGNATURE

= [SBOOT] SFU_BOOT_SM_ExecuteUserFw: EXECUTE USER FIRMWARE

= [FWIMG] SFU_IMG_LaunchActiveImg: slot_0=x08020000 offset=x400

= [SBOOT] SFU_BOOT_CheckApplySecurityProtections

= [SBOOT] System Security Check successfully passed. Starting...

---------------------

SECBOOT_CRYPTO_SCHEME is SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256

So the user app is not encrypted.

I have checked and rechecked system_stm32h7xx.c and linker scripts. Watchdog is not enabled. So I don't know what is causing the reset.

Thank you for the helps.

1 ACCEPTED SOLUTION

Accepted Solutions
alister
Lead

The TRACE output of SFU_BOOT_ManageResetSources is missing and might help.

Then try these steps

  1. Check the app executes ok stand-alone under a debug. If you don't know, this is how you'd execute it mostly during development.
  2. Prepare a debug image of the app, or at least add symbols to its build.
  3. Download the app image again and let the SBSFU install and execute it.
  4. Load the SBSFU under debug, put a breakpoint in SFU_BOOT_SM_ExecuteUserFw and step into the launch.
  5. Load the app's symbols and continue debugging...

View solution in original post

1 REPLY 1
alister
Lead

The TRACE output of SFU_BOOT_ManageResetSources is missing and might help.

Then try these steps

  1. Check the app executes ok stand-alone under a debug. If you don't know, this is how you'd execute it mostly during development.
  2. Prepare a debug image of the app, or at least add symbols to its build.
  3. Download the app image again and let the SBSFU install and execute it.
  4. Load the SBSFU under debug, put a breakpoint in SFU_BOOT_SM_ExecuteUserFw and step into the launch.
  5. Load the app's symbols and continue debugging...