TrustZone Project For Cortex-m85 (AN555 FPGA MPS3 Board)

Dear altruist,

As Keil does not provide any example TrustZone project Cortex-m85 (AN555 FPGA MPS3 Board), I am trying to convert an m33 example project to m85, I followed the guidelines here. Note that the partition.h file is not generated by KEIL even after selecting "CMSIS: CORE and Device: Startup" in the Manage Runtime Environment. The project files can located in the GitHub repository.

Without TZ_SAU_Setup  and partition file for SAU: The Secure project executes correctly and the jump to the nonsecure reset handler works as shown in the figure below:

When I debug the mode changes to nonsecure mode but the first instruction results in a Hard fault exception, as shown in the figure below:

The MSP value during the jump to non-secure Reset_Handler: 0x2107FFF8

With TZ_SAU_Setup  and partition file for SAU:

I manually added the partition_SSE310.h file and called the TZ_SAU_Setup function from SystemInit, and then the following code (in the secure state) accessing the NS stack pointer results in a hard fault:

uint32_t NonSecure_StackPointer = (*((uint32_t *)(NONSECURE_START + 0u))); 

 where 
#define NONSECURE_START (0x01020000u)

I have highlighted my linker script, memory map, and the important C files in the GitHub repository, Please take a look.

Can you please help me identify the issue and guide me towards a solution? 

It could be some misconfiguration of TrustZone drivers such as Partion<device>.h files and SAU setup files. Will ARM release those drivers for SAU, TrustZone, MPC, etc. for the AN555 image?

Thanks for your time.