Hello, I am working on the NUCLEO-L552ZE board powered by Cortex M33 STM32L55 MCU. I am just trying to debug the Secure World using the Keil. When I start the debug mode, it seems the Secure mode is disabled by default, and the TZEN bit is zero. The debug view is like an Armv7-m MCUs, and I cannot see Partitioned Secure/Non-Secure Cortex Register Windows in the Keil Debug View.
I saw an option called "Models Armv8-m Debugger" in the Debug List, when I debug using this option, I can see partitioned Secure/Non-Secure register windows, and I can see a label in the Keil Status bar like "CPU: Secure"; that is why I try to see. Just, this option did not work for me, anyone can succeed for this mode?The board has an onboard ST-Link debugger which does not need an external programmer, so I selected ST-Link in the Keil Debug Window.
I am wondering is it about the onboard STLink, it may have a limitation.
If I create a project using STM32CubeIDE, it asks to enable TrustZone but I don't see this option for Keil. So, how Keil enables TrustZone?
Please feel free to guide on any option that allows debugging Secure World.
Thank you in advance.Murat
I have found my answer. The TZEN bit is disabled by default, so for STM32 MCUs, we need to set the TZEN bit using STMCube Programmer first, then we can use Secure Debug Mode in Keil.It would be nice if Keil provided an interface to set required registers for Secure World Debugging.