2022-08-10 02:44 PM
Hi,
I am trying to modify the SBSFU example provided with STM32CubeU5 to run my own application. I generated the code with STM32CubeMX for IAR by enabling TrustZone and leaving the default values set by STM32CubeMX. I wrote my code, deleted all the files in the SBSFU_Appli folder, copied the files generated by STM32CubeMX inside SBSFU_Appli and configured the IAR project to use the prebuild_s.cmd, prebuild_ns.cmd and postbuild.bat scripts. I have replaced the stm32u585xx_flash_ns.icf and stm32u585xx_flash_s.icf files generated by STM32CubeMX with the stm32u585xx_flash_ns.icf stm32u585xx_flash_s.icf files provided with SBSFU from STM32CubeU5. In the main.c file of the secure project I included the region_defs.h file and defined #define VTOR_TABLE_NS_START_ADDR NS_CODE_START. I can compile the code and generate the binaries, and the SBSFU_UPDATE.bat script for loading the binaries finishes correctly. When I start the microcontroller, SBSFU is executed but it stops right after printing in the console "Jumping to the first image slot" and my application does not start.
Do any other changes need to be made to run the application correctly? Am I skipping any steps?
Thanks
2022-08-10 04:32 PM
Hello Domenico,
Have you debugged the project to check in which zone the CPU is ?
You can check the file ~//Projects/B-U585I-IOT02A/Applications/SBSFU/readme.html section showing how to change SBSFU configuration, it should help you.
"9. Configuration
It is possible to change SBSFU configuration. When changing configuration, all the projects must be cleaned then fully rebuild."
I can give you also the following pointers that can help:
STM32Trust - STMicroelectronics
UM2851 :Getting started with STM32CubeU5 TF-M applications
UM2262 Getting started with the X-CUBE-SBSFU STM32Cube Expansion Package
Best regards,
Younes
2022-08-14 11:12 PM
Hello @Younes LAHBIB ,
To load the application to run I use the `regression.bat` and `SBSFU_UPDATE.bat` scripts from the SBSFU example. I have not figured out how to connect debugging as at startup SBSFU is run which starts the user application. The code I wrote is loaded with the SBSFU_UPDATE.bat script only SBSFU stops at "Jumping to the first image slot", it is as if the user application is not started or is not in the "right place." I loaded my application with TrustZone enabled and without SBSFU and it runs correctly.
Thank you
2022-08-17 04:36 PM
Hi Domenico,
I'm in vacation this week, next week I work on it.
BR,
Younes
2022-08-18 03:58 AM
Hi @Younes LAHBIB,
Thanks for the answer.
I created a project with TrustZone enabled that flashes a LED and writes to the console. I modified only the NonSecure part of SBSFU_Appli by copying the files generated with STM32CubeMX and was able to execute the code correctly.
I created a project with TrustZone enabled and ThreadX (AzureRTOS) where a thread flashes an LED on the board. I performed the same file edit/import procedure described earlier but the code does not execute. SBSFU crashes to "Jumping to the first image slot".
Thanks
2023-05-25 12:24 AM
Hi Domenico,
I am experiencing a quite similar issue right now. Did you manage to resolve your problem by any chance ? How ?
Thanks in advance,
Thomas
2023-05-25 01:42 AM
Hello Younes,
I'm experiencing something really similar, have you found any ideas since Domenico issue ?
Thanks,
Thomas
2023-07-10 02:10 PM
Hello Tesa,
I am facing the same issue of "Jumping to the first image slot"
if you have any idea do kindly suggest us
Thanks
Hiren