Skip to main content
This topic has been closed for replies.
Best answer by Bob S

Is this a COMPILE error, or a LINKER error?

Didn't look at the video, but presuming you started with CubeMX (or the IDE embedded version of this), those functions usually reside in usbd_cdc.h and usbd_cdc.c, located in

YOUR_PROJECT_DIR\Middlewares\ST\STM32_USB_Device_Library\CDC\Inc and \Src

If those files exist in your project directory, perhaps the IDE is not configured to look in those directories for files. Presuming you are using an Eclipse-based IDE, rIght-click on the project in the "Project Explorer" window, expand "C/C++ Build" and click on "Settings". In the "Tool Settings" tab, click on "Includes" under "MCU GCC Compiler". You should see a list of directories that the compiler searches for .h files. Make sure the above directory is listed.

4 replies

Bob SAnswer
Super User
January 28, 2020

Is this a COMPILE error, or a LINKER error?

Didn't look at the video, but presuming you started with CubeMX (or the IDE embedded version of this), those functions usually reside in usbd_cdc.h and usbd_cdc.c, located in

YOUR_PROJECT_DIR\Middlewares\ST\STM32_USB_Device_Library\CDC\Inc and \Src

If those files exist in your project directory, perhaps the IDE is not configured to look in those directories for files. Presuming you are using an Eclipse-based IDE, rIght-click on the project in the "Project Explorer" window, expand "C/C++ Build" and click on "Settings". In the "Tool Settings" tab, click on "Includes" under "MCU GCC Compiler". You should see a list of directories that the compiler searches for .h files. Make sure the above directory is listed.

ECrom.1Author
Visitor II
January 29, 2020

Hi and thanks for the reply

It is a compile error

And I am working with STM CUBE

Eli

ECrom.1Author
Visitor II
January 29, 2020

found the problem. Thanks

The compiler did not include the USB include file for some reason, although it is in the tree

I included it manually, and works fne

Thanks again

Eli

Visitor II
April 12, 2020

Eli,

How did you include it manually?

I'm having the same issue.

please provide more details.

thanks in advance

Visitor II
April 12, 2020

Eli,

How did you include it manually?

I'm having the same issue.

please provide more details.

thanks in advance