2019-04-25 10:55 AM
In my STM32F72xx/3xx project, I'm not allocating memory dynamically, i.e., I'm using neither malloc nor free. And I'm restricting myself to C, with no C++ parts.
Is there a reason I shouldn't set the heap size to zero? Do any of the drivers, HAL or CMSIS, or FatFs, rely on the heap?
Solved! Go to Solution.
2019-04-25 03:07 PM
FatFs, depends on the configuration, LFN support can use malloc/free.
Some of ST's USB code uses malloc/free
2019-04-25 02:00 PM
Yes, You can and should do it. That is the only way how I make my projects and my projects do work. As far as I know (but can not guarantee) HAL doesn't use heap, though I do not use HAL anymore. Can't comment on FatFs.
What exactly do You mean by CMSIS? It has many different parts!
2019-04-25 03:07 PM
FatFs, depends on the configuration, LFN support can use malloc/free.
Some of ST's USB code uses malloc/free
2019-04-25 06:42 PM
To be sure, fill the heap with some pattern before running your stuff, later check if it has (not) changed.
-- pa