In MHC’s FreeRTOS configuration options, if you check “Enable static memory allocation” and UNcheck “Enable dynamic memory allocation”, MHC will blithely add “…/portable/MenMang/heap_[n].c” to the build (where [n] is whatever is selected for Memory Management Type). This causes an error at load time:
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
As a workaround, you can go into the Project window and remove the offending file from the project (e.g. right click on the file, select “Remove From Project”). But you have to do that every time you regenerate the MHC code.
A proper fix would be to inhibit the generation of the MemMang heap_[n].c file if “Enable dynamic memory allocation” is de-selected.
(And is unhelpful that the forum firmware prevents me from using “#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0” as the title, since that’s what people will probably be searching for!!)
Have not. I can file it as a standard bug report, but if you (or anyone in the community) knows the group responsible for MHC’s interface to FreeRTOS, let me know so I can better direct the request. Thanks!
Shridhar: I didn’t know how to CC you directly, so consider this the CC!
Update: Doh! I just realized that you mean for me to file a formal Microchip issue. That will take me a bit more time since I don’t have my dev environment at hand (I’m traveling) so I can’t cite the version numbers, etc. That will take a few more days!