2024-12-28 01:24 PM - last edited on 2024-12-31 01:00 AM by Amel NASRI
@Saket_Om This solved the privileged calls but Im hitting the next obstacle with `undefined reference to `MPU_xTaskCreate'`.
Im creating a task using `xTaskCreate` which gets redefined at https://github.com/STMicroelectronics/x-cube-freertos/blob/b0f4a6681bd37b483076db2e8171239db9dacbb1/Middlewares/Third_Party/FreeRTOS/Source/include/mpu_wrappers.h#L100.
From what I gather, this `MPU_xTaskCreate` is defined at https://github.com/STMicroelectronics/x-cube-freertos/blob/b0f4a6681bd37b483076db2e8171239db9dacbb1/Middlewares/Third_Party/FreeRTOS/Source/include/mpu_prototypes.h
I have added the `include` folder into my GCC compiler path so not sure why it would not be able to find the `MPU_xTaskCreate`?
2024-12-30 12:51 AM
Hello @milanvdm
Is this flag "configUSE_MPU_WRAPPERS_V1" is set to 1 on your project?
Compiler cannot find "MPU_xTaskCreate" if this flag is not set to 1.
#if ( configUSE_MPU_WRAPPERS_V1 == 1 )
BaseType_t MPU_xTaskCreate( TaskFunction_t pxTaskCode,
const char * const pcName,
const uint16_t usStackDepth,
void * const pvParameters,
UBaseType_t uxPriority,
TaskHandle_t * const pxCreatedTask ) FREERTOS_SYSTEM_CALL;
2024-12-30 01:28 AM
@Saket_Om Yes, I use https://github.com/STMicroelectronics/x-cube-freertos/blob/main/Projects/NUCLEO-N657X0-Q/Applications/FreeRTOS_MPU/Inc/FreeRTOSConfig.h in my project.
You can find my dummy project at https://github.com/milanvdm/edge-anpr-stm32 if that helps.
2024-12-30 01:54 AM
This is the follow-up of the issue in the link below:
Re: STM32N6 FreeRTOS linker issue for MPU - STMicroelectronics Community