cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157F-DISCO FreeRTOS issue, freertos_mpool.h & newlib-freertos.h

SemK
Associate II

Hello all,

I'm new with STM32MP157F-Disco board. So maybe i do something wrong, but i cant find a solution. I use  CubeIDE_1.18.0 with packages STM32Cube_FW_MP1_V1.7.0. When i start a new project with the board selector,  STM32MP157FAC1. Then it will make a new project and you can build that project. When i add FreeRTOS for CM4 and change the Timmer to TIMX and the SYS to that timer and i build the project, it says ;fatal error: freertos_mpool.h: No such file or directory.

Why does it not include the: freertos_mpool.h ? Because it is in the STM32Cube_FW_MP1_V1.7.0 in the correct location, but CubeIDE does not copy it to the project for some reason.

Also when i change in FreeRTOS ->advanced settings -> USE_NEWLIB_REENTRANT to  Enable. It says it can't find newlib-freertos.h: instead of reent.h is this a bug, does any one ells has this problem.

I have the same problem on different computers(Windows and  linux).

I hope someone can help me with this problem.

I you need screenshots i can add them.

Best regards,

Sem



4 REPLIES 4
wincak
Associate II

Hello Sem,

have you figured it out? I seem to have a similar problem, with STM32MP157FAAx and CubeIDE 1.18.1. A new, empty project with default config works - CM4 project compiles OK.

If I only enable FreeRTOS (with CMSIS_V2) including changing the time base to TIM1 and enabling Newlib-reentrant, compilation fails with newlib-freertos.h not found.

Disabling Newlib-reentrant and ignoring the IDE warning results in
... Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c:30:10: fatal error: freertos_mpool.h: No such file or directory

I found two ways of resolving this problem:
1) Do not copy files from the package, reference the package instead. This option can be selected when creating a project:

wincak_0-1746455344025.png

2) Manually copy the missing files and add include paths as necessary. Unfortunately running "Generate code" will overwrite all manual changes.

 

I've tried option 2 and after fixing some problems like conflicting SysTick_Handler definitions got the code to at least compile.

SemK
Associate II

Hey Wincak,

Sorry for my late response and thank you for the feedback !
I have not figured it out, and will try to use one of your options. to make it work.
I will let you know if i find a better solution.

Best regards,

Sem 

shivam203
ST Employee

Hi @SemK , @wincak 

 

Please refer to the this post:

Solved: Re: FreeRTOS build fails on STM32MP157F-DK2 (Corte... - STMicroelectronics Community.

I have given the answer there.

CubeMX might update the FreeRTOS version in the future release.


                                                                                                                                                                                       

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
SemK
Associate II

Hey @shivam203 


Thank's for the reply.

Best regards,

Sem.