cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6 FreeRTOS: undefined reference to `MPU_xTaskCreate'` error

milanvdm
Associate II

@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`?

 

milanvdm_0-1735483477673.png

 

3 REPLIES 3
Saket_Om
ST Employee

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;
 

 

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar
milanvdm
Associate II

This is the follow-up of the issue in the link below:

Re: STM32N6 FreeRTOS linker issue for MPU - STMicroelectronics Community

If your question is answered, please close this topic by clicking "Accept as Solution".

Thanks
Omar