i tried to send a message to my pc using USB CDC . i get a error : error: 'hUsbDeviceFS' undeclared (first use in this function) but the 'hUsbDeviceFS' is defined in the usb_devise.c
..
..
hi,
i just found a solution. i was using the STM32L496G-DICO.i was trying to preform the example project in the MOOC training provided by st "STM32L4 hands-on-sessions".
"https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/stm32cubemx-and-cubeHhal-basics.html"
you can see vedio number 35 if you want to know exactly what i was doing.
the problem was that a error accured when compiling "the usb handler hUsbDeviceFS is not defined" . But when i reviewed the project structures it was defined in one of the includes….
i just Added hUsbDeviceFS as a global variable in the main ( I added this line : USBD_HandleTypeDef hUsbDeviceFS; ) and every think worked fine.
Kind Regards,
Hamza
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.