[已解决] ESP32工程编译提示错误

weishao
Posts: 5
Joined: Wed Jun 23, 2021 1:23 pm

[已解决] ESP32工程编译提示错误

Postby weishao » Wed Jun 23, 2021 1:31 pm

刚开始用,编译Hello world 时,idf.py set-target esp32, 出现下述错误,但 idf.py set-target esp32s2,则正常编译,请问该怎么解决?网上没有找到相关办法,看得懂提示的英文说明,但不知道要具体怎么操作。。。

-- Could NOT find Perl (missing: PERL_EXECUTABLE)
CMake Warning (dev) at ../../../components/mbedtls/CMakeLists.txt:114 (target_sources):
Policy CMP0076 is not set: target_sources() command converts relative paths
to absolute. Run "cmake --help-policy CMP0076" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.

A private source from a directory other than that of target "mbedcrypto"
has a relative path.
This warning is for project developers. Use -Wno-dev to suppress it.

-- App "hello-world" version: v4.3-dirty

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32工程编译提示错误

Postby ESP_Gargamel » Thu Jun 24, 2021 1:21 am

4.3 的 release 版本?这个 warning 应该不影响编译。

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32工程编译提示错误

Postby ESP_Gargamel » Thu Jun 24, 2021 1:55 am

装一下 perl

weishao
Posts: 5
Joined: Wed Jun 23, 2021 1:23 pm

Re: ESP32工程编译提示错误

Postby weishao » Thu Jun 24, 2021 12:44 pm

IDF是V4.3,安装了perl也是不行
set-target esp32 还是一样的warning,(esp32s2 目标则无问题。。。)
编译失败的log如下:
[631/990] Linking C static library esp-idf\ulp\libulp.a
FAILED: esp-idf/ulp/libulp.a
cmd.exe /C "cd . && D:\program\esp-idf-tool\.espressif\tools\cmake\3.16.4\bin\cmake.exe -E remove esp-idf\ulp\libulp.a && CMAKE_AR-NOTFOUND qc esp-idf\ulp\libulp.a esp-idf/ulp/CMakeFiles/__idf_ulp.dir/ulp.c.obj esp-idf/ulp/CMakeFiles/__idf_ulp.dir/ulp_macro.c.obj && D:\program\esp-idf-tool\.espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-ranlib.exe esp-idf\ulp\libulp.a && cd ."
'CMAKE_AR-NOTFOUND' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
[632/990] Performing configure step for 'bootloader'

ESP_Gargamel
Posts: 786
Joined: Wed Nov 14, 2018 8:45 am

Re: ESP32工程编译提示错误

Postby ESP_Gargamel » Fri Jun 25, 2021 2:39 am

这个和 xtensa-esp32-elf-ar.exe 有关,做了个实验,把 .espressif\tools\xtensa-esp32-elf\esp-2020r3-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-ar.exe 删除,可以出现一样的问题。
请确认下 xtensa-esp32-elf-ar.exe 还在不在,能否正常执行 xtensa-esp32-elf-ar.exe --version,有杀毒软件的话,也关一下。

weishao
Posts: 5
Joined: Wed Jun 23, 2021 1:23 pm

Re: ESP32工程编译提示错误

Postby weishao » Fri Jun 25, 2021 1:12 pm

是这个原因,esp32s2目录下有这个软件,所以没问题,我重新装tool后就可以了,ths a lot

weishao
Posts: 5
Joined: Wed Jun 23, 2021 1:23 pm

Re: ESP32工程编译提示错误

Postby weishao » Fri Jun 25, 2021 1:39 pm

被360认为是木马。。。。

Who is online

Users browsing this forum: No registered users and 159 guests