cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE generate wrong code in USB_HOST with FreeRTOS

NDubr.1
Associate

File \USB_HOST\Target\usbh_conf.h has the definitions:

#define USBH_malloc     malloc

#define USBH_free      free

This does not work with FreeRTOS. It will be better, but maybe not perfect:

/** Alias for memory allocation. */
#if (USBH_USE_OS == 1)
#define USBH_malloc     pvPortMalloc
#else
#define USBH_malloc     malloc
#endif
 
/** Alias for memory release. */
#if (USBH_USE_OS == 1)
#define USBH_free      vPortFree
#else
#define USBH_free      free
#endif

0 REPLIES 0