完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我是按照官方教程一步步走的,但在执行idf.py set-target esp32时出现报错:
CMake Error at build/CMakeFiles/git-data/grabRef.cmake:48 (file): file failed to open for reading (No such file or directory): D:/Programs/esp-idf/examples/get-started/hello_world/build/CMakeFiles/git-data/head-ref 我打开git-data文件夹,确实没有找到head-ref文件,里面只有grabRef.cmake文件和HEAD文件。即使不管报错继续执行idf.py build也无法编译,出现几乎相同的报错。百度完全没有查询到相关信息,也请大家和审核大大帮帮我 我不管是用什么教程都会遇到错误,编译不了例程 上次发的Visual Studio Code插件配置问题也没有人回复 以下是CMD内信息: D:Programsesp-idfexamplesget-startedhello_world>D:Programsesp-idfexport.bat Setting IDF_PATH: D:Programsesp-idf Adding ESP-IDF tools to PATH... fatal: No names found, cannot describe anything. WARNING: Git describe was unsuccessful: b'' D:Programsesp-toolstoolsxtensa-esp32s2-elfesp-2021r1-8.4.0xtensa-esp32s2-elfbin D:Programsesp-toolstoolsxtensa-esp32s3-elfesp-2021r1-8.4.0xtensa-esp32s3-elfbin D:Programsesp-toolstoolsriscv32-esp-elfesp-2021r1-8.4.0riscv32-esp-elfbin D:Programsesp-toolstoolsesp32ulp-elf2.28.51-esp-20191205esp32ulp-elf-binutilsbin D:Programsesp-toolstoolsesp32s2ulp-elf2.28.51-esp-20191205esp32s2ulp-elf-binutilsbin D:Programsesp-toolstoolsopenocd-esp32v0.10.0-esp32-20210902openocd-esp32bin D:Programsesp-toolstoolsninja1.10.2 D:Programsesp-toolstoolsidf-exe1.0.1 D:Programsesp-toolstoolsccache4.3ccache-4.3-windows-64 D:Programsesp-toolstoolsdfu-util�.9dfu-util-0.9-win64 D:Programsesp-toolspython_envidf4.4_py3.6_envScripts D:Programsesp-idftools Checking if Python packages are up to date... Python requirements from D:Programsesp-idfrequirements.txt are satisfied. Done! You can now compile ESP-IDF projects. Go to the project directory and run: idf.py build D:Programsesp-idfexamplesget-startedhello_world>idf.py set-target esp32 Adding "set-target"'s dependency "fullclean" to list of commands with default set of options. Executing action: fullclean Directory 'd:programsesp-idfexamplesget-startedhello_worldbuild' doesn't seem to be a CMake build directory. Refusing to automatically delete files in this directory. Delete the directory manually to 'clean' it. D:Programsesp-idfexamplesget-startedhello_world>idf.py set-target esp32 Adding "set-target"'s dependency "fullclean" to list of commands with default set of options. Executing action: fullclean Build directory 'd:programsesp-idfexamplesget-startedhello_worldbuild' not found. Nothing to clean. Executing action: set-target Set Target to: esp32, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old. Running cmake in directory d:programsesp-idfexamplesget-startedhello_worldbuild Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 d:programsesp-idfexamplesget-startedhello_world"... -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.33.0.windows.2") CMake Error at build/CMakeFiles/git-data/grabRef.cmake:48 (file): file failed to open for reading (No such file or directory): D:/Programs/esp-idf/examples/get-started/hello_world/build/CMakeFiles/git-data/head-ref Call Stack (most recent call first): D:/Programs/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include) D:/Programs/esp-idf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision) D:/Programs/esp-idf/tools/cmake/build.cmake:67 (git_describe) D:/Programs/esp-idf/tools/cmake/build.cmake:174 (__build_get_idf_git_revision) D:/Programs/esp-idf/tools/cmake/idf.cmake:50 (__build_init) D:/Programs/esp-idf/tools/cmake/project.cmake:12 (include) CMakeLists.txt:5 (include) CMake Warning at D:/Programs/esp-idf/tools/cmake/git_submodules.cmake:52 (message): Git submodule is out of date. Run 'git submodule update --init --recursive' to fix. Call Stack (most recent call first): D:/Programs/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) D:/Programs/esp-idf/tools/cmake/build.cmake:174 (__build_get_idf_git_revision) D:/Programs/esp-idf/tools/cmake/idf.cmake:50 (__build_init) D:/Programs/esp-idf/tools/cmake/project.cmake:12 (include) CMakeLists.txt:5 (include) CMake Error at D:/Programs/esp-idf/tools/cmake/git_submodules.cmake:57 (get_filename_component): get_filename_component unknown component BASE_DIR Call Stack (most recent call first): D:/Programs/esp-idf/tools/cmake/build.cmake:77 (git_submodule_check) D:/Programs/esp-idf/tools/cmake/build.cmake:174 (__build_get_idf_git_revision) D:/Programs/esp-idf/tools/cmake/idf.cmake:50 (__build_init) D:/Programs/esp-idf/tools/cmake/project.cmake:12 (include) CMakeLists.txt:5 (include) -- Configuring incomplete, errors occurred! cmake failed with exit code 1 D:Programsesp-idfexamplesget-startedhello_world>git submodule update --init D:Programsesp-idfexamplesget-startedhello_world> |
|
相关推荐
1个回答
|
|
出现这个错误的原因可能是由于以下几个方面:
1. **Git子模块问题**:ESP-IDF 使用 Git 子模块来管理其依赖项。如果子模块没有正确克隆或者更新,可能会导致这个问题。请确保你已经正确克隆了 ESP-IDF 仓库,包括所有的子模块。你可以使用以下命令来更新子模块: ``` git submodule update --init --recursive ``` 2. **CMake缓存问题**:有时候,CMake 的缓存可能会导致问题。你可以尝试清理 CMake 缓存,然后重新运行 `idf.py build`。在命令行中,进入你的项目目录,然后执行以下命令: ``` idf.py fullclean idf.py set-target esp32 idf.py build ``` 3. **路径问题**:确保你的项目路径没有包含特殊字符或者空格。有时候,这些字符可能会导致问题。 4. **权限问题**:确保你有足够的权限来读取和写入项目目录。如果你没有足够的权限,可能会导致文件无法打开的错误。 5. **ESP-IDF版本问题**:确保你使用的是最新版本的 ESP-IDF。有时候,旧版本的 ESP-IDF 可能会有已知的问题。你可以使用以下命令来更新 ESP-IDF: ``` git pull git submodule update --init --recursive ``` 6. **IDE或编辑器问题**:如果你使用的是特定的 IDE 或编辑器,确保它们没有干扰到你的项目设置或者文件。 |
|
|
|
只有小组成员才能发言,加入小组>>
436 浏览 1 评论
1305 浏览 1 评论
599浏览 6评论
498浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
481浏览 5评论
481浏览 4评论
465浏览 4评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-14 08:07 , Processed in 0.620973 second(s), Total 46, Slave 40 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (威廉希尔官方网站 图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号