Skip to main content
Associate II
December 28, 2024
Question

STM32N6 FreeRTOS: undefined reference to `MPU_xTaskCreate'` error

  • December 28, 2024
  • 3 replies
  • 2521 views

@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

Technical Moderator
December 30, 2024

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;
 

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
milanvdmAuthor
Associate II
December 30, 2024
Technical Moderator
December 30, 2024

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

Solved: Re: STM32N6 FreeRTOS linker issue for MPU - STMicroelectronics Community

 

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
milanvdmAuthor
Associate II
January 7, 2025

@Saket_Om Were you able to reproduce this issue or do you need more information?

Technical Moderator
January 7, 2025

Hello @milanvdm 

The issue is under investigation. We will get back to you as soon as possible.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
Technical Moderator
January 22, 2025

Hello @milanvdm 

The version with STM32CubeIDE of this project will be integrated in the next release.  

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om