Skip to main content
kurta999
Senior
March 4, 2019
Question

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

  • March 4, 2019
  • 3 replies
  • 877 views

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
March 4, 2019

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
March 4, 2019

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

kurta999
kurta999Author
Senior
October 3, 2019

Any news please?