Loading...
 
Skip to main content

System Workbench for STM32


Use vPortMalloc() in HAL Libraries?

This is an STM32CubeMX project with the FREERTOS option enabled.

In the code I add to the project I use vPortMalloc() for dynamic allocation and vPortFree() for deallcation. I am wondering if the HAL libraries should also be using these instead of malloc() and free(). I would make the HAL libraries use vPortMalloc() and vPortFree() with these macros:

Copy to clipboard
#define malloc(size) pvPortMalloc(size) #define free(ptr) vPortFree(ptr)
Tunisia

I am wondering if HAL uses really malloc/free ?

I haves seached for eventual malloc/free in STM32F4 HAL, but found nothing !