LPC55S69-EVK solid TF-M + non-secure FreeRTOS example search

Is there any SOLID example how to run non-secure FreeRTOS together with TF-M firmware on the LPC55S69-EVK board?

I’ve tried different ways, but attempts to run the scheduler still fail.
I’m trying to run a simple task which do simple printf to the console and wait 1000ms.

We have this example but it does not use TFM - FreeRTOS/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso at main · FreeRTOS/FreeRTOS · GitHub. Here is the page describing how to use this example - ARM Cortex-M33 (ARMv8-M) Demo for NXP LPCXpresso55S69 Development Board - FreeRTOS.

I’ve tried it. Didn’t help with TF-M.

The question which part is responsible for VTOR setup and shoud VTOR points to S vectors or NS vectors?

There are 2 VTOR registers -

  1. VTOR_S - It points to S vectors. It can only be set from the secure code.
  2. VTOR_NS - It points to NS vectors. It can be set from the secure code or non-secure code.

Solution:
FreeRTOSConfig.h changes:

  1. add extern uint32_t SystemCoreClock; into the file
  2. make sure configSYSTICK_CLOCK_HZ is NOT defined
  3. set configENABLE_TRUSTZONE to 0
  4. set configRUN_FREERTOS_SECURE_ONLY to 0
  5. set configENABLE_MPU to 0

main.c changes

  1. call SystemCoreClockUpdate() before vTaskStartScheduler call

project changes:

  1. add the following port into the project
    ${FREERTOS_SRC_PATH}/portable/GCC/ARM_CM33_NTZ/non_secure

Thank you for sharing your solution!