我按照文档下载了与使用的IDF对应版本的esp-iot-solution,但接下来选择目标芯片、编译都不行。我按照文档配置了环境变量:set IOT_SOLUTION_PATH=E:\ESP32\esp-iot-solution,回车之后命令行没有任何提示,不知道是否设置成功,在idf.py set-target esp32s2提示找不到环境变量IOT_SOLUTION_PATH,在idf.py build也提示了没有找到IOT_SOLUTION_PATH,控制台的输出信息如下,是否有其他更多错误还不知道。
IDF我下载的是目前最新版本,并且能够正常使用,里面的例程能够编译下载,在外部创建自己的项目代码也能够编译下载。唯独使用esp-iot-solution的时候就不行了。
请问这个该怎么解决?
PS E:\ESP32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display> set IOT_SOLUTION_PATH=E:\ESP32\esp-iot-solution PS E:\ESP32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display> idf.py set-target esp32s2 Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory 'e:\esp32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display\build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32s2, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory e:\esp32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32s2 -DCCACHE_ENABLE=1 e:\esp32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display"...
CMake Warning at CMakeLists.txt:9 (message):
Can't detect IOT_SOLUTION_PATH in your environment, we infer it is
E:/ESP32/esp-iot-solution
-- Found Git: E:/ESP32/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: E:/ESP32/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc.exe
-- Check for working C compiler: E:/ESP32/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc.exe
-- Check for working C compiler: E:/ESP32/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/ESP32/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-g++.exe
-- Check for working CXX compiler: E:/ESP32/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/xtensa-esp32s2-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32s2
CMake Error at E:/ESP32/ESP-IDF/tools/cmake/build.cmake:189 (message):
Failed to resolve component 'usb'.
Call Stack (most recent call first):
E:/ESP32/ESP-IDF/tools/cmake/build.cmake:215 (__build_resolve_and_add_req)
E:/ESP32/ESP-IDF/tools/cmake/build.cmake:435 (__build_expand_requirements)
E:/ESP32/ESP-IDF/tools/cmake/project.cmake:396 (idf_build_process)
CMakeLists.txt:20 (project)
-- Configuring incomplete, errors occurred!
See also "E:/ESP32/esp-iot-solution/examples/usb/host/usb_camera_lcd_display/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
PS E:\ESP32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display> idf.py build Executing action: all (aliases: build)
Running cmake in directory e:\esp32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 e:\esp32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display"...
CMake Warning at CMakeLists.txt:9 (message):
Can't detect IOT_SOLUTION_PATH in your environment, we infer it is
E:/ESP32/esp-iot-solution
-- Found Git: E:/ESP32/.espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- IDF_TARGET not set, using default target: esp32
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: E:/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: E:/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: E:/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: E:/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe
-- Check for working CXX compiler: E:/ESP32/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
CMake Error at E:/ESP32/ESP-IDF/tools/cmake/build.cmake:189 (message):
Failed to resolve component 'usb'.
Call Stack (most recent call first):
E:/ESP32/ESP-IDF/tools/cmake/build.cmake:215 (__build_resolve_and_add_req)
E:/ESP32/ESP-IDF/tools/cmake/build.cmake:435 (__build_expand_requirements)
E:/ESP32/ESP-IDF/tools/cmake/project.cmake:396 (idf_build_process)
CMakeLists.txt:20 (project)
-- Configuring incomplete, errors occurred!
See also "E:/ESP32/esp-iot-solution/examples/usb/host/usb_camera_lcd_display/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1
PS E:\ESP32\esp-iot-solution\examples\usb\host\usb_camera_lcd_display>
ESP IoT Solution无法配置及编译
Moderator: ESP_Bob
Re: ESP IoT Solution无法配置及编译
如果想要查看路径是否设置完成,在Windows的命令行工具下可以使用 set +变量名也就是set IOT_SOLUTION_PATH进行查看,而set-target 指令执行完后是会马上有显示的。另外set-target有无成功和设置IOT_SOLUTION_PATH是没有直接关系的,我这边在Windows环境下用命令行试过了整个编译过程是没有问题的。另外根据你的描述应该是用的官方下载工具下载的IDF,不知道你iot-solution的下载方式,可能会有影响。
Re: ESP IoT Solution无法配置及编译
我现在成功设置了IOT_SOLUTION_PATH变量,但执行set-target命令是,会提示Failed to resolve component 'usb'。这个该怎么解决?
Re: ESP IoT Solution无法配置及编译
切换IDF分支到master,切换Iot-solution版本到usb/add_usb_solutions,然后再使用命令 更新下子模块再进行编译和下载
Code: Select all
git submodule update --init --recursive
Re: ESP IoT Solution无法配置及编译
请教一下楼主,你是如何添加IOT_SOLUTION_PATH变量的。我试了很多种办法 总是在vscode编译时提示 找不到 IOT_SOLUTION_PATH 环境变量
Who is online
Users browsing this forum: No registered users and 62 guests