How to change USBH_malloc
Hello,
I`m using the CubeMX 4.23 and want to use the HAL USB Driver. In the usbh:conf.h is the code:
/* Memory management macros */
&sharpdefine USBH_malloc malloc&sharpdefine USBH_free free&sharpdefine USBH_memset memset&sharpdefine USBH_memcpy memcpyBut i want to use the FreeRTOS functions for malloc and free. So i changed the code to:
/* Memory management macros */
&sharpdefine USBH_malloc pvPortMalloc&sharpdefine USBH_free vPortFree&sharpdefine USBH_memset memset&sharpdefine USBH_memcpy memcpyThis works fine, but as soon as i generate code with the CubeMX the change is gone. Is it possible to add something similar to the ffconf.h to the
usbh:conf.h or make it configurable in the CubeMX?
/* define the ff_malloc ff_free macros as standard malloc free */
&sharpif !defined(ff_malloc) && !defined(ff_free)&sharpinclude <stdlib.h>&sharpdefine ff_malloc malloc&sharpdefine ff_free free&sharpendifI hope you can help me with a solution
#usb-fs #cube #cube-hal