How to integrate our application in SBSFU based solution in stm32u585
Hello supportTeam,
Part No: STM32U585ZIT
Environment: STMIDE
Details: TFM / SBSFU
We used the ST-provided SBSFU solution for firmware upgrade purpose.
As per our needs, SBSFU/TFM-Boot and SBSFU/TFM-Loader successfully jump to own created application[ThredX OS based].
Below are the steps I used when integrating my own application with SBSFU.
1. Create Project Name: Application [Enable TrustZone with Thread-X OS In STM32U585ZIT6Q controller]
2. Copy the SBSFU_Appli\STM32CubeIDE\NonSecure\STM32U585AIIX_FLASH.ld and Added in own application non secure folder[output.ld - added prebuild file in secure project properties]
3. Copy the SBSFU_Appli\STM32CubeIDE\Secure\STM32U585AIIX_FLASH.ld and Added in own application secure folder[output.ld - added prebuild file in non-secure project properties]
4. Copy SBSFU_Appli\STM32CubeIDE\Postbuild.sh and Added in own application project repository
5. Update NS address in own application secure-> main.c "#define VTOR_TABLE_NS_START_ADDR NS_CODE_START."
6. Copy SBSFU_Appli\STM32CubeIDE\NonSecure\Application\User\startup_stm32u5xx.c and Added in Own Application repository
7. Copy SBSFU_Appli\STM32CubeIDE\Secure\Application\User\startup_stm32u5xx.c and Added in Own Application repository
8. Successful compile code
9. Generate sign with encrypted .bin file in Binary folder
10. Upload encrypted sign .bin through SBSFU_Loader
11. Reset Trigger
12. We are getting below log after reset
Outcome:
LOG:
[INF] signature OK
[INF] Bootloader chain load address offset: 0x1a000
[INF] Jumping to the first image slot.
Result: My own thread X OS-based Application does not work after upgrading firmware through SBSFU_boot and SBSFU_loader.
Observation: Using CubeMX, I generated Bare metal code[own application] through cubeMX and integrated with SBSFU. Therefore, it is able to jump from SBSFU_boot to Application [Without OS], however,
the same operation I performed with a ThreadX OS-based application didn't work.
Please review the above step I have performed for own application[Thread X based application] integration purposes and let me know if I missed anything.
I have attached Own project .IOC File and SBSFU linker folder in this mail.
Thanks
Hiren Rameshbhai Thumar
