Hi,
We have C++ projects, using Newlib, and noticed that internal functions of newlib (like printf() ) call malloc (and other functions of the same family like malloc_r, etc.).
This is problematic for many reasons that are obvious and I'm not going to list here.
We would like to redefine all memory allocation function to use FreeRTOS memory allocation function like pvPortMalloc.
Is there an exhaustive list of functions that need to be re-implemented and example implemnetation for FreeRTOS?
Or should i just do it myself and reeimplement all these functions ? (although I'm not sure i fully understand all of them, like malloc_r() for example)
I feel like it's a known problem, and i wouldn't want to reinvent the wheel.
Any advice would be greatly apreciated.
I recommend you have a look at newlib and FreeRTOS
and Using FreeRTOS with newlib and newlib-nano | MCU on Eclipse
Check out as well the latest SDK v2.8 which includes that heap_useNewlib.c too.
I hope this helps,
Erich
Thanks Erich,
That's interesting. I'll have look, do some tests and share my results :smileyhappy: