AnsweredAssumed Answered

STM32Cube FW_F1 V1.0.0 - USB CDC Bug

Question asked by barbieri.alessan.001 on May 28, 2015
Hi friends,
I create a sample project with:
- STM32Cube FW_F1 V1.0.0
- F103

Shortly I found this lines in usbd_conf.c

  * @brief  static single allocation.
  * @param  size: size of allocated memory
  * @retval None
void *USBD_static_malloc(uint32_t size)
    static uint8_t mem[sizeof(USBD_CDC_HandleTypeDef)];
    return mem;

  * @brief  Dummy memory free
  * @param  *p pointer to allocated  memory address
  * @retval None
void USBD_static_free(void *p)


As you can see, we don't have a real malloc, but we try to free a NON MALLOC pointer.
I think this is a BUG!