dark1st
(Alexey)
March 26, 2024, 8:24am
1
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.
aggarg
(Gaurav Aggarwal)
March 26, 2024, 11:40am
2
dark1st
(Alexey)
March 26, 2024, 2:19pm
3
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?
aggarg
(Gaurav Aggarwal)
March 26, 2024, 4:00pm
4
There are 2 VTOR registers -
VTOR_S - It points to S vectors. It can only be set from the secure code.
VTOR_NS - It points to NS vectors. It can be set from the secure code or non-secure code.
dark1st
(Alexey)
March 29, 2024, 7:05am
5
Solution:
FreeRTOSConfig.h changes:
add extern uint32_t SystemCoreClock; into the file
make sure configSYSTICK_CLOCK_HZ is NOT defined
set configENABLE_TRUSTZONE to 0
set configRUN_FREERTOS_SECURE_ONLY to 0
set configENABLE_MPU to 0
main.c changes
call SystemCoreClockUpdate() before vTaskStartScheduler call
project changes:
add the following port into the project
${FREERTOS_SRC_PATH}/portable/GCC/ARM_CM33_NTZ /non_secure
aggarg
(Gaurav Aggarwal)
March 29, 2024, 7:22am
6
Thank you for sharing your solution!