Skip to main content
kurta999
Senior
Mar 4, 2019 9:10 AM UTC
Question

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

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

"

This topic has been closed for replies.

3 replies

Noppe.Jack
Senior
Mar 4, 2019 4:28 PM UTC

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
kurta999Author
Senior
Mar 4, 2019 4:37 PM UTC

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

kurta999
kurta999Author
Senior
Oct 3, 2019 7:23 AM UTC

Any news please?