CubeMX code not working with USB
Hello!
I have project created with CubeMX. I coded a lot there and then I wanted to add a USB CDC device with CubeMX. After code generation I compiled the project and I got an error message:
../Inc/usb_device.h:61:22: fatal error: usbd_def.h: No such file or directory
I did some research and some had the problem that the path name hat spaces in it. That was not the case with my path. I thought my path was too long maybe, so I changed the name of the folder created by CubeMX "STM32_USB_Device_Library" to "STM32_USB". Then this error message disapeared but another one appeared.
../Inc/usbd_audio_if.h:59:68: fatal error: ../Middlewares/ST/STM32_USB/Class/AUDIO/Inc/usbd_audio.h: No such file or directory
I don´t know what to do anymore and why is this audio.h file needed anyway for a CDC USB device?
Any help is welcome