我在开发ESP32的过程中,遇到编译问题。Cmake 无法解析我新添加的component。
这个问题是我刚刚遇到的,在这之前一直可以正常编译。不知是什么原因可能导致的编译环境问题呢?
我用的idf版本是4.1。使用vscode搭建的编译环境。有重新下载过idf(4.4版本)但还是不行。
ESP IDF编译环境突然崩溃
ESP IDF编译环境突然崩溃
- Attachments
-
- WechatIMG808.jpeg (53.29 KiB) Viewed 10258 times
Re: ESP IDF编译环境突然崩溃
更加详细的说明,我使用git管理工程,在做好一个版本后,上传到git。我在git中设置了不上传build文件。只上传了工程文件。在上传后,我切换到其他分支,编译发现组件配置错误,之前从未发生过。现在我切换哪个分支编译都是一样的错误。
附上编译日志
-- Found Git: /usr/local/bin/git (found version "2.23.0")
-- 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: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v2.0-1-gbed717a-dirty
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from /Users/fanxinyu/document/esp-idf/requirements.txt are satisfied.
Cannot parse CMake requirements line: __component_set_property(___idf_BY_driver REQUIRES "unity;cxx;newlib;freertos;heap;log;lwip;soc;esp_rom;esp_common;xtensa;esp32")
CMake Error at /Users/fanxinyu/document/esp-idf/tools/cmake/component.cmake:240 (message):
Call Stack (most recent call first):
/Users/fanxinyu/document/esp-idf/tools/cmake/build.cmake:405 (__component_get_requirements)
/Users/fanxinyu/document/esp-idf/tools/cmake/project.cmake:396 (idf_build_process)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
附上编译日志
-- Found Git: /usr/local/bin/git (found version "2.23.0")
-- 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: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Users/fanxinyu/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Project version: v2.0-1-gbed717a-dirty
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
Python requirements from /Users/fanxinyu/document/esp-idf/requirements.txt are satisfied.
Cannot parse CMake requirements line: __component_set_property(___idf_BY_driver REQUIRES "unity;cxx;newlib;freertos;heap;log;lwip;soc;esp_rom;esp_common;xtensa;esp32")
CMake Error at /Users/fanxinyu/document/esp-idf/tools/cmake/component.cmake:240 (message):
Call Stack (most recent call first):
/Users/fanxinyu/document/esp-idf/tools/cmake/build.cmake:405 (__component_get_requirements)
/Users/fanxinyu/document/esp-idf/tools/cmake/project.cmake:396 (idf_build_process)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: ESP IDF编译环境突然崩溃
先确认编译 idf 自带的 sample,比如 hello_world 没有问题。再来排查你自己工程中的问题,建议从你自己 component 的 CMakeLists.txt 查起。
Re: ESP IDF编译环境突然崩溃
发现问题了。我使用VScode搭建的编译环境。VScode的IDF插件更新到1.0.3出了Bug,导致的工程无法编译。目前切回1.0.0,可以正常编译
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: ESP IDF编译环境突然崩溃
Wow,VS Code 插件昨天才更新,估计 VS Code 自动给升级了,这个问题我们会尽快处理一下。
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: ESP IDF编译环境突然崩溃
请快跑 ESP-IDF: 安装ESP-IDF扩展Python包 (ESP-IDF: Install ESP-IDF extension Python Packages)
缺少idf-component-manager python包
缺少idf-component-manager python包
-
- Posts: 786
- Joined: Wed Nov 14, 2018 8:45 am
Re: ESP IDF编译环境突然崩溃
@ESP_bignacio 谢谢来中文区解答
@fanxinyu
你可以在 VS Code 里 Ctrl + Shift + P,然后选 ESP-IDF: Install ESP-IDF extension Python Packages 来安装 ESP-IDF 扩展 Python 包。
或者在 idf 目录下:
试一下吧
@fanxinyu
你可以在 VS Code 里 Ctrl + Shift + P,然后选 ESP-IDF: Install ESP-IDF extension Python Packages 来安装 ESP-IDF 扩展 Python 包。
或者在 idf 目录下:
Code: Select all
export IDF_PATH=$(pwd)
. ./export.sh
pip install idf-component-manager
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: ESP IDF编译环境突然崩溃
`idf component manager`0.2.1a1刚刚发布,要解决此问题,请在卸载前一个包后运行`ESP-IDF:Install ESP-IDF Python Packages`以获取最新版本。
Who is online
Users browsing this forum: No registered users and 85 guests