cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX - Static USBD setting?

mwp
Senior
Posted on November 29, 2017 at 18:27

Hi all,

I've started a new F401 project, but for the life of me I cannot find the setting in CubeMX to have it create usbd_conf.h using the static malloc replacement:

/* Memory management macros */ 
#define USBD_malloc (uint32_t *)USBD_static_malloc
#define USBD_free USBD_static_free
#define USBD_memset /* Not used */
#define USBD_memcpy /* Not used */�?�?�?�?�?�?�?�?�?�?

Instead of the heap allocated method that its currently using:

 /* Memory management macros */ 
#define USBD_malloc malloc
#define USBD_free free
#define USBD_memset memset
#define USBD_memcpy memcpy�?�?�?�?�?

Does anyone know where it is / what its called?

Thanks in advance!

#usb-device #stm32f401
2 REPLIES 2
mwp
Senior
Posted on November 30, 2017 at 15:23

Anyone?

I know the setting exists somewhere in STM32CubeMX, as ive used it before on a F070 project.

I just cant find it now...

Thanks.

Ant M
Associate II
Posted on December 01, 2017 at 12:03

I would also like to do this, but I don't think the option exists, see thread below:

https://community.st.com/0D50X00009Xkft5SAB

Ant