cancel
Showing results for 
Search instead for 
Did you mean: 

Issue Integrating FreeRTOS with Secure Manager on STM32H5

Musa2
Visitor

Hello,

I am new to the STM32 development environment and real-time programming. I have the STM32H573I-DK development board and have followed the workshop provided by ST, available on the wiki:

https://wiki.stmicroelectronics.cn/stm32mcu/wiki/Security:How_to_start_with_STM32CubeMX_Secure_Manager_on_STM32H57

I am using STM32Cube_H5_V1.4.0. However, the default RTC clock configuration does not work. During RTC initialization, I am forced to configure it with the LSE source, otherwise, the program gets stuck when executing the SystemClock_Config() function.

rtc.png

After this modification, the program eventually works, and timestamps are correctly displayed on the serial terminal. However, I need to integrate FreeRTOS into the non-secure part of my application. When I add the X-CUBE-FREERTOS package (version 1.3.0), generate, and compile the project, I encounter the following errors:

Freertos_error.png

 

 

Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1047: undefined reference to `SecureContext_LoadContext'
Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1058: undefined reference to `SecureContext_FreeContext'
/Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1067: undefined reference to `SecureInit_DePrioritizeNSExceptions'
Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/port.c:1070: undefined reference to `SecureContext_Init'
Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c:423: undefined reference to `SecureContext_SaveContext'
Secure_manager/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM33/non_secure/portasm.c:423: undefined reference to `SecureContext_LoadContext'

 

 

I have checked this response on the ST community:

https://community.st.com/t5/stm32cubemx-mcus/facing-issue-in-project-creation-through-stm32cube-ide/td-p/54415, but it does not apply to my case since this is not a fully secure application. Only the Secure Manager is used.

Here are the software versions I am using:

  • STM32CubeIDE : 1.17.0
  • STM32CubeMX : 6.13.0
  • STM32CubeProgrammer : 2.18.0
  • X-CUBE-FREERTOS : 1.3.0
  • STM32Cube_H5 : 1.4.0

My question is: How can I use the Secure Manager with a non-secure FreeRTOS application?

Additional note: When I remove the FreeRTOS package and attempt to debug, I frequently encounter a debugging-related error every other time :

erreor.png

Thank you in advance for your help.

 

 

0 REPLIES 0