Skip to main content
mchin.1
Associate II
November 28, 2021
Question

Compile error when add usb virtual com port application in stmcubemx

  • November 28, 2021
  • 5 replies
  • 2382 views

usb_device.h is not found

This topic has been closed for replies.

5 replies

mchin.1
mchin.1Author
Associate II
November 28, 2021

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

ST Technical Moderator
November 29, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
mchin.1
mchin.1Author
Associate II
November 29, 2021

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
mchin.1Author
Associate II
November 30, 2021

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
mchin.1Author
Associate II
December 2, 2021

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