Skip to main content
NDubr.1
Visitor II
April 10, 2020
Question

STM32CubeIDE generate wrong code in USB_HOST with FreeRTOS

  • April 10, 2020
  • 0 replies
  • 444 views

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

This topic has been closed for replies.