cancel
Showing results for 
Search instead for 
Did you mean: 

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()

GSpri
Associate
5 REPLIES 5
GSpri
Associate

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

WGend.1
Associate II

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 II
Klang.Martin
Associate III

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 III

Update: this is still an issue with v5.4.0