LPC55S16 Trustzone "hello_world_s" example not running

Showing results for 
Search instead for 
Did you mean: 

LPC55S16 Trustzone "hello_world_s" example not running

Contributor I


I am currently trying to get acquainted to Trustzone for Cortex-M33 on a LPCXpresso55S16 Board (LPC55S16 microcontroller). I actually thought that I managed to get a more or less good grasp on the theory and wanted to start working on implementations with the help of practical examples.

When I loaded up the Trustzone version of the "Hello Word"-Example provided by NXP especially for this specific microcontroller inside the MCUXpresso IDE and tried to run it, I get a hard fault error. I did not change any settings at all and strictly followed the instructions:

1) I built the secure project "hello_world_s" before the nonsecure version "hello_world_ns".

2) I then choose "Program Flash Action using SEGGER J-Link probes" for the nonsecure version

3) I started debugging using "Debug using SEGGER J-Link probes", which naturally starts the debugging process.

The moment the project tries to jump from the secure to the nonsecure domain, i get a "Precise Data Bus Error".

I tried to verify that everything was set up correctly with regards to the security settings: The nonsecure project begins at address 0x00010000. This is also - correctly - the argument given to the function TZM_JumpToNormalWorld(NON_SECURE_STATE). In the memory attribution map inside MCUXpresso, I was also able to verify that the Resulting security level of that area is "NS", for non-secure Code. So this also fits (which is actually to be expected, because I did not change anything also completely deleted and reinstalled the example project several times, just to be sure).

As an attachment I am providing some screenshots showcasing the problem.

Would be nice, if you could help me to get (finally really) started with Trustzone.

Thanks in advance, Jerome


Labels (1)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport


The two examples "hello_world_s" and "hello_world_ns" are SDK examples, I suppose they are fully tested, there is not problem.

I copy the part from readme.txt in the project:


TrustZone application compilation
As first compile secure project since CMSE library is needed for compilation of non-secure project.
After successful compilation of secure project, compile non-secure project.

TrustZone application debugging
- Download both output file into device memory
- Start execution of secure project since secure project is going to be executed after device RESET.

If IDE (Keil MDK, IAR) allows to manage download both output files as single download, the secure project is configured to download both secure and non-secure output files so debugging can be fully managed from secure project.


So you are required to download only the "hello_world_s", it is okay, the "hello_world_ns" will be downloaded automatically.

Hope it can help you


XiangJun Rong

0 Kudos