cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO_IOToggle_TrustZone example using STM32 TrustZone

stst9187
Associate III

Hi everyone,

I’m currently experimenting with the GPIO_IOToggle_TrustZone example using STM32 TrustZone.

When I build and flash both the Secure and NonSecure firmware, everything works correctly: the LED toggles as expected, so the interaction between Secure and NonSecure worlds seems fine.

However, I’m running into an issue with debugging:

  • I can successfully debug the Secure project
  • but I cannot seem to debug the NonSecure project

I am using STM32CubeIDE and I would like to understand how to properly configure the environment to be able to debug the NonSecure application as well.

Specifically:

  • Do I need a separate debug configuration for the NonSecure project?
  • Is it required to start debugging the Secure project first and then attach to NonSecure?
  • Or is there a specific STM32CubeIDE / ST-LINK / TrustZone debug configuration that I am missing?

Any guidance on the correct way to set up STM32CubeIDE for debugging the NonSecure project would be really appreciated.

Thanks in advance!

1 REPLY 1
Jocelyn RICARD
ST Employee

Hello @stst9187 ,

To debug both Secure and non secure applications, you just need to have a setup, based for instance on secure application on which you add non secure application in startup tab of debug configuration.

Just click on Add ... button, select non secure project and OK.

If you leave everything by default, the debugger will flash both applications, load symbols of both applications and stop in the main of the secure.

Best regards

Jocelyn