USB Host CDC 驱动 4G Cat.1 示例代码编译错误

Moderator: ESP_Bob

orangerj24
Posts: 8
Joined: Thu Jul 08, 2021 1:28 am

USB Host CDC 驱动 4G Cat.1 示例代码编译错误

Postby orangerj24 » Mon Aug 02, 2021 7:41 am

你好,如题所示,在编译代码时出现如下错误,请问应如何解决?

E:/ESP32/esp-iot-solution/components/usb/uvc_stream/uvc_stream.c:29:10: fatal er
ror: hcd.h: No such file or directory
#include "hcd.h"
^~~~~~~
compilation terminated.
[1008/1221] Building C object esp-idf/..._idf_indicator.dir/led_indicator.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1

ESP_Bob
Posts: 80
Joined: Fri Nov 27, 2020 12:52 pm

Re: USB Host CDC 驱动 4G Cat.1 示例代码编译错误

Postby ESP_Bob » Mon Aug 02, 2021 8:44 am

1. 你跑的是 USB 摄像头代码,4G 模组代码在这里 https://github.com/espressif/esp-iot-so ... _4g_module
2. 找不到头文件的问题,在该示例工程 readme 编译示例代码的步骤中有说明 https://github.com/espressif/esp-iot-so ... 3%E7%A0%81

将 esp-idf/components/usb/CMakeLists.txt 按照以下修改:

idf_component_register(SRCS "hcd.c"
INCLUDE_DIRS "private_include"
PRIV_INCLUDE_DIRS ""
PRIV_REQUIRES hal driver)

Who is online

Users browsing this forum: No registered users and 11 guests