Skip to main content
ZKRAC.1
Associate III
April 7, 2022
Solved

Using Trusted Firmware-M on STM32U5 / STM32L5, building my own non-secure application and interact with TFM.

  • April 7, 2022
  • 2 replies
  • 3002 views

Hello,

I want to use the security features included in the TFM in my application, I have followed UM2851, now,I have a better understanding for TFM and I succeed to implement it in STM32U585, to go further I want ot implement my own non-secure application and to interact and use secure services via PSA APIs, I have searched all the web for that, but I didn't find a hint.

Any explanation or a hint, please !

Thank you.

Regards,

ZK.

Best answer by Fred

Hi @ZKRAC.1​ ,

as I am not a TF-M expert, I asked my apprentice Jean to study this topic and we can propose this archive with a small tutorial that looks correct to me.

Please feel free to let us know if it is helpful or not, my apprentice will be happy to get some feedback about his work.

Thanks & Regards,

Fred (& Jean)

2 replies

Jocelyn RICARD
ST Employee
April 7, 2022

Hello @ZKRAC.1​ ,

I'm not sure to catch your concern.

The Cube Firmware U5 contains a complete TFM setup with non secure application example as well as PSA API usage.

What are you missing exactly ?

Best regards

Jocelyn

ZKRAC.1
ZKRAC.1Author
Associate III
April 8, 2022

Hi @Jocelyn RICARD​ ,

Thank you for your answer, I'm using the complete TFM from the Cube Firmware U5, what I don't understand is how to use the non-secure applications and PSA APIs, I just started with TFM, I have read the UM2851, and how I can integrate my own non-secure application.

Thank you.

Regards,

ZK.

Fred
ST Employee
April 9, 2022

Hi,

I see your point.

As indicated by Jocelyn the idea is to study the example we provide.

Nevertheless, I understand this might not be so easy.

Please bare with us for maybe one more week and we will come back in this thread with a step by step approach to add some code in the non-secure application and have this code calling existing secure services via the PSA APIs.

Associate II
February 12, 2025

Hi everyone,

I know this thread might be closed, but I wanted to ask how I can integrate TF-M into my existing STM32TrustZone-enabled project. Can TF-M be added as a library or software pack? The example provided by ST does not include an .ioc file, which makes it unclear how to configure GTZC (Global TrustZone Controller) or integrate additional software packs like X-CUBE-SUBG2 into the project.

I have already gone through the official ST document: UM2671 - Getting Started with STM32CubeL5 TF-M Application and have a basic understanding of TF-M and TrustZone. However, I’m unsure of the correct approach to import TF-M into an existing STM32CubeIDE project while maintaining TrustZone configurations.

If anyone could guide me on how to proceed with this integration, I’d be really grateful! I am currently working with the STM32L562E-DK and just starting out with TrustZone and TF-M.

Thanks in advance!