cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS build fails on STM32MP157F-DK2 (Cortex-M4) via STM32CubeIDE

ggarg118
Associate II

Hi,

During the integration of FreeRTOS using STM32CubeMX on the STM32MP157F-DK2 platform, the initial compilation fails. In my experience with other ST microcontrollers, the initial build after adding FreeRTOS generally completes successfully without requiring manual intervention. However, this behavior is not consistent with the STM32MP157F-DK2.

The build process reports missing files such as cmsis_os2.h, freertos_mpool.h and freertos_os2.h. Even after manually adding these files, additional compilation errors continue to arise, indicating deeper integration issues.

I would appreciate any suggestions or insights into what might be going wrong in this process.

Software Version:

STM32CubeIDE ==> 1.18.0

STM32CubeMX ==> 6.14.0

Here are few screenshots suggesting the same.

1 ACCEPTED SOLUTION

Accepted Solutions
shivam203
ST Employee

Hi @ggarg118 ,

There is a version compatibility issue between CUBEMX's FreeRTOS version (v10.2.1) and STM32Cube_FW_MP1_V1.7.0's FreeRTOS version (v10.6.2).

I have verified the same issue in version 6.13.0, but I have not checked version 6.14.1.

You can approach the solution in the following ways:

  1. Switch to an older repository version:

    • Change the repository for STM32MP157F-DK2 to STM32Cube_FW_MP1_V1.6.0.
    • The generated code compiles without any errors in this version.
  2. Manually update missing files:

    • Manually add the missing files to your project. For reference, check the application located at:
      STM32Cube_FW_MP1_V1.7.0\Projects\STM32MP157C-DK2\Applications\FreeRTOS\FreeRTOS_ThreadCreation.
    • This application uses FreeRTOS version v10.6.2. Compare your project with this example and update the necessary changes.

Note: While the code compiles without errors using these methods, I cannot guarantee that the application will run correctly. However, I have verified that the compilation process completes successfully.


Let me know if you need any help.

View solution in original post

4 REPLIES 4
shivam203
ST Employee

Hi @ggarg118 ,

There is a version compatibility issue between CUBEMX's FreeRTOS version (v10.2.1) and STM32Cube_FW_MP1_V1.7.0's FreeRTOS version (v10.6.2).

I have verified the same issue in version 6.13.0, but I have not checked version 6.14.1.

You can approach the solution in the following ways:

  1. Switch to an older repository version:

    • Change the repository for STM32MP157F-DK2 to STM32Cube_FW_MP1_V1.6.0.
    • The generated code compiles without any errors in this version.
  2. Manually update missing files:

    • Manually add the missing files to your project. For reference, check the application located at:
      STM32Cube_FW_MP1_V1.7.0\Projects\STM32MP157C-DK2\Applications\FreeRTOS\FreeRTOS_ThreadCreation.
    • This application uses FreeRTOS version v10.6.2. Compare your project with this example and update the necessary changes.

Note: While the code compiles without errors using these methods, I cannot guarantee that the application will run correctly. However, I have verified that the compilation process completes successfully.


Let me know if you need any help.

Hi @shivam203 

Is that going to be fixed in new release of STM32Cube_FW_MP1_vxxx package ?

 

Hi @Dub Bartolec ,

As far as I know, the latest release happened in Jan 2025. I have no information regarding the new release as of now.

Hi @shivam203 

It wasn't fixed in 1.7.0 so maybe in next release.

Also while here perhaps we should ask if Patch_CubeMP1 is still required ?

DubBartolec_0-1750320840609.png

This patch was released back in 2019.
Do we still need it in 2025 ?

Regards

Dub