一、环境
VScode、ESP-idf组件
二、完整报错展示
在使用SDK配置编辑器时发生如下错误
---------------------------ERROR--------------------------
CMake Error at G:/app/esp-idf/531/Espressif/frameworks/esp-idf-v5.3.1/tools/cmake/build.cmake:552 (message):
ERROR: The "path" field in the manifest file
"G:\app\esp-idf\Espressif\frameworks\esp-idf-v5.3.1\examples\common_components\protocol_examples_common\idf_component.yml"
does not point to a directory. You can safely remove this field from the
manifest if this project is an example copied from a component repository.
The dependency will be downloaded from the ESP component registry.
Documentation:
https://docs.espressif.com/projects/idf-component-manager/en/latest/reference/manifest_file.html#override-path
Call Stack (most recent call first):
-----------------------END OF ERROR-----------------------
---------------------------ERROR--------------------------
G:/app/esp-idf/531/Espressif/frameworks/esp-idf-v5.3.1/tools/cmake/project.cmake:710 (idf_build_process)
CMakeLists.txt:6 (project)
-----------------------END OF ERROR-----------------------
三、原因分析
错误发生在“idf_component.yml”文件中的 “protocol_examples_tapif_io”和“protocol_examples_common” 组件的路径跟实际idf安装位置不一致。因为项目需要从idf安装文件里获取组件,由于我idf安装位置发生了变化,导致路径失效,CMake无法找到目录。
四、操作
将“idf_component.yml”文件中的地址修改即可。
修改前:
修改后: