Skip to main content
GSpri
Associate
February 28, 2019
Question

Not a question. I just installed StmCube_FW_v1240 (F4 v1.24.0) The file USB_CONF.C has a build fault. There is no function prototype for the private function USBD_Get_USB_Status()

  • February 28, 2019
  • 5 replies
  • 1296 views

..

This topic has been closed for replies.

5 replies

GSpri
GSpriAuthor
Associate
February 28, 2019

Small correction.... the file is USBD_CONF.C (not USB_CONF.C as listed above)

WGend.1
Associate
February 28, 2019

for me prototype is at line 53 :

USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status);

but it is in the USER CODE section...

still i'm having issue with the usb virtual comport and the 1.24. The python script I was using with 1.23 can't connect. When using a more standard serial software it is ok (TeraTerm) but not with python and PYserial !

Note to myself, never upgrade cubeMX on an ongoing project !

WGend.1
Associate
February 28, 2019
Klang.Martin
Associate II
December 23, 2019

This applies both to usbh_conf.c and usbd_conf.c generated by STM32CubeMX v5.3.0

Adding the declaration in a user block (e.g. at line 53 in usbd_conf.c as suggested by @Community member​ solves the compilation error.

/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
 
USBD_StatusTypeDef USBD_Get_USB_Status(HAL_StatusTypeDef hal_status);
 
/* USER CODE END PFP */

or for usbh_conf.c:

/* USER CODE BEGIN PFP */
/* Private function prototypes -----------------------------------------------*/
 
USBH_StatusTypeDef USBH_Get_USB_Status(HAL_StatusTypeDef hal_status);
 
/* USER CODE END PFP */

Klang.Martin
Associate II
December 23, 2019

Update: this is still an issue with v5.4.0