cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeMX still generates heap_x.c files for FreeFRTOS when static allocation is used

kurta999
Senior

This result in compilation error since dynamic allocation is disabled and only static is used.

For admins: If .ioc file needed, please write me a PM and I'll send it. This is something which I wouldn't want to put here as public.

Atollic console:

"Description Resource Path Location Type

'configTOTAL_HEAP_SIZE' undeclared here (not in a function) heap_2.c /IWWT_M2_Processing_Fw/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang line 67 C/C++ Problem

#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0 heap_2.c /IWWT_M2_Processing_Fw/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang line 50 C/C++ Problem

"

3 REPLIES 3
Noppe.Jack
Senior

Hi. I ran into the same thing. I use SW4STM, and if you right-click on the heap_x.c file, and go to Resource Configuration->Exclude From Build, it survives future CubeMX ‘Generate Source Code’ activities. I hope this helps.

kurta999
Senior

Yes, I know it. It might be handy for somebody, I forgot to mention it. But it's still a bug.

kurta999
Senior

Any news please?