cancel
Showing results for 
Search instead for 
Did you mean: 

Compile error when add usb virtual com port application in stmcubemx

mchin.1
Associate II

usb_device.h is not found

5 REPLIES 5
mchin.1
Associate II

Core/Src/main.c:24:10: fatal error: usb_device.h: No such file or directory

     #include "usb_device.h"

         ^~~~~~~~~~~~~~

    compilation terminated.

    gcc/Makefile:338: recipe for target 'TouchGFX/build/STM32F469-DISCO/Core/Src/main.o' failed

    make[2]: *** [TouchGFX/build/STM32F469-DISCO/Core/Src/main.o] Error 1

    make[2]: *** Waiting for unfinished jobs....

    make[1]: *** [generate_assets] Error 2

    gcc/Makefile:289: recipe for target 'generate_assets' failed

    ../gcc/Makefile:49: recipe for target 'all' failed

    make: *** [all] Error 2

    Failed

  Failed

Imen.D
ST Employee

Hello @mchin.1​ 

What IDE are you using (IAR, Keil, CubeIDe, TouchGFX Designer) ?

Make sure to set up properly the include directories.

Do you have the same issue when using the application template for the STM32F769I-Disco board available in TouchGFX Designer ?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
mchin.1
Associate II

i did not check with  STM32F769I-Disco baord in TouchGFX Designer. I will try in next.

Now I am using

cube ide is 1.8.0

touchGFX is 4.18.0.

are include directories not included automatically when generate code from touchGFX?

mchin.1
Associate II

0693W00000GZWBjQAP.pnghi,

i am using touchgfx 4.18.0 but Run option is disabled why?

how do i get?

so please give me suggestion.

mchin.1
Associate II

hi,

I told you my previous issue. No can solve still can you please check my problem.

Core/Src/main.c:24:10: fatal error: usb_device.h: No such file or directory

     #include "usb_device.h"

         ^~~~~~~~~~~~~~

    compilation terminated.

    gcc/Makefile:338: recipe for target 'TouchGFX/build/STM32F469-DISCO/Core/Src/main.o' failed

    make[2]: *** [TouchGFX/build/STM32F469-DISCO/Core/Src/main.o] Error 1

    make[2]: *** Waiting for unfinished jobs....

    make[1]: *** [generate_assets] Error 2

    gcc/Makefile:289: recipe for target 'generate_assets' failed

    ../gcc/Makefile:49: recipe for target 'all' failed

    make: *** [all] Error 2

    Failed

  Failed