cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5/B-U585I-IOT02A define my own secure function with TF-M

Domenico
Associate III

Hello,

I am using the X-AZURE-CUBE example that integrates Azure RTOS with TF-M. I would like to define a function in the secure part to be called from the non-secure part. Following the SBSFU example I created a .c file in /Secure/Src, defined the .h file in Secure_nsclib and the function in the .c file has is defined with CMSE_NS_ENTRY. When I call this function from the non-secure part the microcontroller resets.

Thanks

1 REPLY 1
Domenico
Associate III

Hi,

I defined a new secure service in the TFM_APP_ROT partition of the X-AZURE-CUBE example and I was able to call it correctly from the non-secure partition.

I defined a new secure partition, following the TF-M Adding Secure Partition guide, the files in the X-AZURE-CUBE example and updated the prebuild_secure.s script only when I try to run the code the device reboots continuously.

Checking the tfm_common_s.icf file, I noticed that the code for the secure partition I defined is missing. In the comments it says that the tfm_common_s.icf file is an autogenerated file, how is the tfm_common_s.icf file generated?

Thank you