Skip to main content
PMOOD.1
Associate II
Jun 1, 2025 7:41 AM UTC
Solved

CubeMX generates code that compiles with error : usbd_cdc_if.h: No such file or directory

Hello. 

I configured the USB port on CubeMX and the generated code compiles with error 

usbd_cdc_if.h: No such file or directory

I seem to only google arduino references to this file ??

Any clues gratefully accepted.

This topic has been closed for replies.
PMOOD.1
PMOOD.1Best answer
Associate II
Jun 1, 2025 9:38 AM UTC

Followed the steps on this thread and it worked !

https://deepbluembedded.com/stm32-usb-cdc-virtual-com-port-vcp-examples/

If you miss a step it wont work. LOL.

1 reply

PMOOD.1
PMOOD.1AuthorBest answer
Associate II
Jun 1, 2025 9:38 AM UTC

Followed the steps on this thread and it worked !

https://deepbluembedded.com/stm32-usb-cdc-virtual-com-port-vcp-examples/

If you miss a step it wont work. LOL.