cancel
Showing results for 
Search instead for 
Did you mean: 

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

SemK
Associate

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



1 REPLY 1
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.