This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to place FreeRTOS in secure memory and the user tasks in non-secure memory?

I am porting FreeRTOS with TrustZone on LPC5500, I put FreeRTOS in secure memory, and created several user tasks in non-secure memory, as shown below:

But so far, I have not successfully switched from a secure task to a non-secure task.

How to switch from a secure task to a non-secure task?

Parents
  • Assumed that

    - Non-secure task use PSP_NS (pointing to return stack for the Non-secure task)

    - At the beginning of the Non-secure task, FPCA was 0 (no floating point context at start)

    You can return from Secure handler to Non-secure thread with a EXC_RETURN code of 0xFFFFFFBD.

    However, with the guidance from PSA & Trusted Firmware team, the plan for FreeRTOS port is to have the OS running in Non-secure world, and OS helper APIs in Secure world to help context switching.

    regards,

    Joseph

Reply
  • Assumed that

    - Non-secure task use PSP_NS (pointing to return stack for the Non-secure task)

    - At the beginning of the Non-secure task, FPCA was 0 (no floating point context at start)

    You can return from Secure handler to Non-secure thread with a EXC_RETURN code of 0xFFFFFFBD.

    However, with the guidance from PSA & Trusted Firmware team, the plan for FreeRTOS port is to have the OS running in Non-secure world, and OS helper APIs in Secure world to help context switching.

    regards,

    Joseph

Children