STM32CubeMX was used as a starting point to generate a USB device driver stack with CDC support. Here's an overview of the significant USB source files and where they reside, relative to the root of the repository: https://github.com/PacktPublishing/Hands-On-RTOS-with-Microcontrollers/tree/master/
- Low-level HAL USB files:
DRIVERS\STM32F7XX_HAL_DRIVER\
|--Inc
| |stm32f7xx_ll_usb.h
|--Src
|stm32f7xx_ll_usb.c
The stm32f7xx_ll_usb.c/h files are the lowest level files, which provide access to the USB hardware peripherals. These files are used by the STM-supplied USB driver stack middleware.
- STM USB device stack:
MIDDLEWARE\ST\
|--STM32_USB_Device_Library
|----Class
| |----CDC
| |----Inc
| | usbd_cdc.h
| ----Src
| usbd_cdc.c
|----Core
|----Inc
| usbd_core.h
| usbd_ctlreq.h
...