How to use stdlib on SW4STM32 with CUBEMX, on Eclipse as IDE, including freeRTOS?
I just started on a NUCLEO-F401RE project loading from SW4STM32 (AC6) and CubeMX with a project that includes FreeRTOS. Most of it works OK out of the box, and I have 2 threads working. But the links to standard libraries STDIO and STDLIB seem to have problems, probably because of the need for a HEAP. I have experimented by providing (in main.c) shims that expose pvPortMalloc() and vPortFree() as public malloc and free to the rest of the project. But that does not seem to be sufficient. Local heap4.c from FreeRTOS would appear to be required for things like strtok and printf to work (I have coded them locally to get things working).
While I realise printf-stdarg.c is often suggested, IS THERE A SIMPLE WAY to link the standard C libraries (?newlib-nano? is that what eclipse uses?) to the FreeRTOS malloc and free so the heap can be used ‘normally’ by those libraries?
OR is it just that FreeRTOS heap implementation is not compatible with the Standard C library?
Any help much appreciated. Graham Davies.