Skip to main content
mwp
Associate III
November 29, 2017
Question

CubeMX - Static USBD setting?

  • November 29, 2017
  • 2 replies
  • 1121 views
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
This topic has been closed for replies.

2 replies

mwp
mwpAuthor
Associate III
November 30, 2017
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
December 1, 2017
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