How to Debug TrustZone Project on MCUXpresso IDE

Showing results for 
Search instead for 
Did you mean: 

How to Debug TrustZone Project on MCUXpresso IDE

No ratings

How to Debug TrustZone Project on MCUXpresso IDE

This document introduces how to debug TrustZone project on MCUXpresso IDE.


Use the latest version of MCUXpresso IDE v10.3.1.

Project is from SDK_2.5.0_LPCXpresso55S69.

Board is LPCXpresso55s69, use the LinkServer debug probe(on board debugger).


Every TrustZone based application consists of two independent parts - secure part/project and non-secure part/project. The secure project is stored in SDK_2.5.0_LPCXpresso55S69\boards\lpcxpresso55s69\trustzone_examples\<application_name>\ cm33_core0 \<application_name>_s directory. The non-secure project is stored in SDK_2.5.0_LPCXpresso55S69\boards\lpcxpresso55s69\ trustzone_examples\<application_name>\ cm33_core0 \<application_name>_ns directory. The secure projects always contains TrustZone configuration and it is executed after device RESET. The secure project usually ends by jump to non-secure application/project.

In this document, we use “hello_world” as example, this project contains both “hello_world_s” and “hello_world_ns” projects. Unlike Keil or IAR IDE, MCUXpresso IDE can’t debug jump directly from secure project to no-secure project, so we need add the no-secure executable file to secure project debug configuration manually(For this version of MCUXpresso IDE v10.3.1, we need do this step, while for  the later new versions, maybe they support jump directly from secure project to no-secure project ).

Steps outline:

  1. Import “hello_world_s” and “hello_world_ns” project.
  2. Build “hello_world_s” and “hello_world_ns”, without any error.
  3. Erase flash.
  4. Program no-secure project “hello_world_ns ”.
  5. Kill active debug.
  6. Add the location of file “lpcxpresso55s69_hello_world_ns.axf” to Debugger commands of “hello_world_s” project, and download “hello_world_s” project.
  7. After finish download, it stop at “hello_world_s” project, set a breakpoint at hello_world_ns project:
  8. Debug project

Detailed steps please refer to DOC in attachment.

Hope it helps,



Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎04-10-2019 03:29 AM
Updated by: