乐鑫技术交流
直播中

一刀两断

8年用户 963经验值
私信 关注
[问答]

ESP-WHO示例工程无法编译是怎么回事?

一开始我是使用IDF4.4.7来尝试编译ESP-WHO的示例工程的。尝试了很久都没有成功。会报如下类似的错误
------------------------------------------------------------------------------------------------------------------------------------
Dependencies lock doesn't exist, solving dependencies.
CMake Error at E:/Espressif_5.0.4/frameworks/esp-idf-v5.0.4/tools/cmake/build.cmake:519 (message):
  WARNING: Component "espressif/esp32-camera" not found

  WARNING: Component "espressif/esp32-camera" not found

  WARNING: Component "espressif/esp32_s3_eye_noglib" not found

  WARNING: Component "espressif/mdns" not found

  HINT: Please check manifest file of the following component(s): modules

  ERROR: Because project depends on espressif/mdns (^1) which doesn't match
  any versions, version solving failed.

Call Stack (most recent call first):
  E:/Espressif_5.0.4/frameworks/esp-idf-v5.0.4/tools/cmake/project.cmake:530 (idf_build_process)
  CMakeLists.txt:8 (project)


.-- Configuring incomplete, errors occurred!
See also "E:/esp-who-master/examples/human_face_detection/web/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the E:esp-who-masterexampleshuman_face_detectionwebbuildlogidf_py_stderr_output_22676 and E:esp-who-masterexampleshuman_face_detectionwebbuildlogidf_py_stdout_output_22676
----------------------------------------------------------------------------------------------------------------------------------

然后我把IDF版本切换到了5.0.4(上个版本没删),编译还是不通过,会报上面类似的错误(每次安装都测试过IDF,能编译IDF自带的示例工程)。但是我在虚拟机(Linux)上安装IDF5.0的版本,能编译通过。还有在以前没下载过IDF的电脑中,用IDF5.0.4版本都能编译通过。
可能是我删除IDF的方式有问题,我是直接将IDF文件夹直接删除的(在本次遇到问题前就在电脑上换过一次IDF版本)。关于我遇到的这个情况,有解决办法吗?
                                                                                                                                                                 

回帖(1)

陈静

2024-7-1 16:07:22
为了解决这个问题,请按照以下步骤操作:

1. 确保您已经正确安装了 ESP-IDF 框架。您可以访问 Espressif 的官方文档(https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)了解如何安装和设置 ESP-IDF。

2. 检查您的示例工程是否包含了所需的组件。在 `CMakeLists.txt` 文件中,确保您已经添加了以下行:

   ```
   idf_component_register(SRCS "main.c"
                       INCLUDE_DIRS ".")
   ```

3. 确保您的 `sdkconfig` 文件包含了所需的配置。您可以使用 `idf.py menuconfig` 命令来配置您的项目。

4. 如果问题仍然存在,请尝试更新您的 ESP-IDF 版本。您提到的版本是 5.0.4,但您在问题描述中提到使用了 4.4.7 版本。请确保您使用的是正确的版本,并按照相应版本的文档进行操作。

5. 如果更新版本后问题仍然存在,您可以尝试清理项目并重新编译。在命令行中,进入您的项目目录,然后执行以下命令:

   ```
   idf.py clean
   idf.py build
   ```


举报

更多回帖

发帖
×
20
完善资料,
赚取积分