chegewara / esp32-usbip-poc

ESP32 S2/S3 USBIP proof of concept app
73 stars 8 forks source link

usb_host.h: No such file or directory #12

Closed Joey0609 closed 1 month ago

Joey0609 commented 1 month ago

When attempting to build my project using the command "idf.py build," I encountered an issue and was unable to resolve it despite my efforts.

In file included from E:/esp32-usbip-poc-master/main/usbip.cpp:12: E:/Windows-Hello-Project/esp32-usbip-poc-master/main/usbip.hpp:3:10: fatal error: usb/usb_host.h: No such file or directory 3 | #include "usb/usb_host.h" compilation terminated. Missing "usb/usb_host.h" file name found in the following component(s): usb(D:\Espressif\frameworks\esp-idf-v5.1.2\components\usb\include\usb\usb_host.h). Maybe one of the components needs to add the missing header directory to INCLUDE_DIRS of idf_component_register call in CMakeLists.txt. ninja failed with exit code 1

Appreciate your help.

chegewara commented 1 month ago

Hi, yes, the project has been build and tested with older esp-idf version. Espressif decided to move tinyusb from esp-idf to external component. They most likely refactored usb host component.

Joey0609 commented 1 month ago

Thanks! May I ask which version of ESP-IDF you are using? I have tried version 4.3.2 , 4.3.3 and 4.4.7, but I still encountered the same issue. Version 4.2.5, however, does not support ESP32-S3.In version 4.3, the error message has changed.

CMake Error at D:/Espressif/frameworks/esp-idf-v4.3.2/tools/cmake/build.cmake:191 (message): Failed to resolve component 'usb'. Call Stack (most recent call first): D:/Espressif/frameworks/esp-idf-v4.3.2/tools/cmake/build.cmake:222 (build_resolve_and_add_req) D:/Espressif/frameworks/esp-idf-v4.3.2/tools/cmake/build.cmake:441 (build_expand_requirements) D:/Espressif/frameworks/esp-idf-v4.3.2/tools/cmake/project.cmake:399 (idf_build_process) CMakeLists.txt:8 (project)

chegewara commented 1 month ago

I believe it was some 4.4.x version. All patches should be good. Changes i mentioned earlier could be implemented after esp-idf 5.x.

Can you insert file with all logs from idf.py build command?

Joey0609 commented 1 month ago

I believe it was some 4.4.x version. All patches should be good. Changes i mentioned earlier could be implemented after esp-idf 5.x.

Can you insert file with all logs from idf.py build command? ESP-IDF 4.4 CMD.log

Joey0609 commented 1 month ago

I believe it was some 4.4.x version. All patches should be good. Changes i mentioned earlier could be implemented after esp-idf 5.x.

Can you insert file with all logs from idf.py build command?

Moreover, ESP-IDF 4.4.1 also has the same issue.Thanks for your reply.

chegewara commented 1 month ago

This is the reason

-- Building ESP-IDF components for target esp32

Esp32 does not support USB host, esp32-S2 and S3 does.

Joey0609 commented 1 month ago

That's right, thank you.