如题,win10系统,安装完esp-idf4.3.2(安装过程没有报错),然后编译自带例程hello world出现报错。命令:idf.py build,错误如下:
PS F:\esp32\blink> idf.py build
Executing action: all (aliases: build)
Running cmake in directory f:\esp32\blink\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 f:\esp32\blink"...
-- Found Git: D:/Espressif/tools/idf-git/2.34.2/cmd/git.exe (found version "2.34.1.windows.1")
-- IDF_TARGET not set, using default target: esp32
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe -- broken
CMake Error at D:/Espressif/tools/cmake/3.16.4/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: F:/esp32/blink/build/CMakeFiles/CMakeTmp
Run Build Command(s):D:/Espressif/tools/ninja/1.10.2/ninja.exe cmTC_7d773 && [1/2] Building C object CMakeFiles/cmTC_7d773.dir/testCCompiler.c.obj
[2/2] Linking C executable cmTC_7d773
FAILED: cmTC_7d773
cmd.exe /C "cd . && D:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -mlongcalls -Wno-frame-address CMakeFiles/cmTC_7d773.dir/testCCompiler.c.obj -o cmTC_7d773 && cd ."
xtensa-esp32-elf-gcc.exe: error: CMakeFiles/cmTC_7d773.dir/testCCompiler.c.obj: No such file or directory
xtensa-esp32-elf-gcc.exe: fatal error: no input files
compilation terminated.
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
D:/Espressif/frameworks/esp-idf-v4.3.2/tools/cmake/project.cmake:311 (__project)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "F:/esp32/blink/build/CMakeFiles/CMakeOutput.log".
See also "F:/esp32/blink/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1
esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
Re: esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
请问您解决了吗,我换了另一套系统就可以编译了,但还是没有找到问题所在。
Re: esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
是使用的下载工具进行的下载吗,还是在老版本上进行的升级,看样子是工具链不够新,尝试下运行 install.bat
Re: esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
还是会报这个错误
[Error: non zero exit code 2
-- Found Git: D:/Espressif/tools/idf-git/2.30.1/cmd/git.exe (found version "2.30.1.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe
-- Check for working C compiler: D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe - broken
CMake Error at D:/Espressif/tools/cmake/3.20.3/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"D:/Espressif/tools/xtensa-esp32-elf/esp-2021r2-patch2-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/Espressif/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeTmp
Run Build Command(s):D:/Espressif/tools/ninja/1.10.2/ninja.exe cmTC_54b4a && [1/2] Building C object CMakeFiles\cmTC_54b4a.dir\testCCompiler.c.obj
FAILED: CMakeFiles/cmTC_54b4a.dir/testCCompiler.c.obj
D:\Espressif\tools\xtensa-esp32-elf\esp-2021r2-patch2-8.4.0\xtensa-esp32-elf\bin\xtensa-esp32-elf-gcc.exe -mlongcalls -Wno-frame-address -o CMakeFiles\cmTC_54b4a.dir\testCCompiler.c.obj -c testCCompiler.c
xtensa-esp32-elf-gcc.exe: error: CreateProcess: No such file or directory
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
D:/Espressif/esp-idf/tools/cmake/project.cmake:290 (__project)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "D:/Espressif/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "D:/Espressif/esp-idf/examples/get-started/hello_world/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory 'd:\espressif\esp-idf\examples\get-started\hello_world\build' 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:\espressif\esp-idf\examples\get-started\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32 -DCCACHE_ENABLE=1 d:\espressif\esp-idf\examples\get-started\hello_world"...
at ChildProcess.<anonymous> (\dist\extension.js:1:4499)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.EventEmitter.emit (domain.js:467:12)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)]
Re: esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
可能我电脑里面之前装过Python等开发环境,换一台什么都没有安装过的电脑,一步到位,可以正常使用。我在一台笔记本上试过、在虚拟机里面也试过,都可以。
Who is online
Users browsing this forum: No registered users and 25 guests