首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ESP-IDF在尝试包含main时在示例项目(闪烁)期间cMake失败

ESP-IDF在尝试包含main时在示例项目(闪烁)期间cMake失败
EN

Stack Overflow用户
提问于 2021-06-25 06:02:56
回答 1查看 233关注 0票数 0

我正在尝试让ESP-IDF在Ubuntu 18.04上运行。当我尝试使用"idf.py build“编译测试项目blink时,我从cmake得到一个错误。

失败的原始代码在/home/bjorn/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake中

失败的命令如下:

include(${__component_dir}/CMakeLists.txt OPTIONAL)

它会生成错误“include called with error number of arguments. include()只接受一个文件”。

删除可选关键字会将错误更改为"include called with invalid argument: code/ESP-IDF“

我在生成错误的那一行之前添加了几行代码,以尝试了解发生了什么:

代码语言:javascript
复制
message( "listing component values")
message(${__component_name})
message(${__component_dir})


include(${__component_dir}/CMakeLists.txt)

这会生成一个很长的组件列表,直到其中一个组件出现故障。它是main:

代码语言:javascript
复制
listing component values

main

  
/xxx/ESP-IDFtutorial/blink/main


CMake Error at
/xxx/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:102
  (include):

include called with invalid argument: code/ESP-IDF

Call Stack (most recent call first):

/xxx/esp/esp-idf/tools/cmake/scripts/component_get_requirements.cmake:120 (__component_get_requirements)

我真的不知道接下来该怎么做。是否有需要设置的变量才能正确执行此操作?还是有什么不兼容的地方?

EN

回答 1

Stack Overflow用户

发布于 2021-06-25 07:19:53

呃,我发现了这个问题: main路径中的一些目录的名称中有空格。

当我重新定位我的代码目录时,一切都开始顺利地工作。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68123193

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档