esp-idf 4.3.2安装完成之后,idf.py build例程hello world报错
Posted: Fri Feb 25, 2022 7:51 am
如题,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
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