Skip to main content
This topic has been closed for replies.
Bob S
Bob SBest answer
Super User
Jan 28, 2020 4:18 PM UTC

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.

5 replies

Bob S
Bob SBest answer
Super User
Jan 28, 2020 4:18 PM UTC

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.1
ECrom.1Author
Associate III
Jan 29, 2020 6:33 AM UTC

Hi and thanks for the reply

It is a compile error

And I am working with STM CUBE

Eli

ECrom.1
ECrom.1Author
Associate III
Jan 29, 2020 1:56 PM UTC

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

ARodr.2
Visitor II
Apr 12, 2020 2:52 AM UTC

Eli,

How did you include it manually?

I'm having the same issue.

please provide more details.

thanks in advance

ARodr.2
Visitor II
Apr 12, 2020 2:52 AM UTC

Eli,

How did you include it manually?

I'm having the same issue.

please provide more details.

thanks in advance