我安装了V4.3.1版本的idf后, 编译examples->get_started -> hello_world 例程失败, 编译主机为 Windows 10 64位家庭中文版 10.0.19041.1266 AMD 4800H
根据ESP32-DevKitC V4 入门指南 , 从
https://dl.espressif.com/dl/esp-idf/?idf=4.4 下载离线安装版本安装ESP-IDF 工具安装器,安装过程中显示一切正常.
安装完毕后, power shell/cmd 显示环境变量设置成功, 然后按照入门指南进入到hello_world目录, 编译:
idf.py set-target esp32c3
显示如下错误:
PS D:esp32examplesget-startedhello_world> idf.py set-target esp32c3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of op
tions.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32c3, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory d:esp32examplesget-startedhello_worldbuild
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=1 d:esp32examplesget-startedhello_world"...
-- 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 GNU 8.4.0
-- The CXX compiler identification is GNU 8.4.0
-- The ASM compiler identification is GNU
-- Found assembler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Check for working C compiler: D:/.espressif/tools/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin/riscv32-esp-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/riscv32-esp-elf/esp-2021r1-8.4.0/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/esp32/examples/get-started/hello_world/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/cygwin64/bin/ninja.exe cmTC_90c87 && [1/2] Building C object CMakeFiles/cmTC_90c87.dir/testCCompiler.c.obj
FAILED: CMakeFiles/cmTC_90c87.dir/testCCompiler.c.obj
D:.espressiftoolsriscv32-esp-elfesp-2021r1-8.4.0riscv32-esp-elfbinriscv32-esp-elf-gcc.exe -march=rv32imc -o CMakeFiles/cmTC_90c87.dir/testCCompiler.c.obj -c testCCompiler.c
/bin/sh: D:.espressiftoolsriscv32-esp-elfesp-2021r1-8.4.0riscv32-esp-elfbinriscv32-esp-elf-gcc.exe: command not found
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
D:/esp32/tools/cmake/project.cmake:311 (__project)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "D:/esp32/examples/get-started/hello_world/build/CMakeFiles/CMakeOutput.log".
See also "D:/esp32/examples/get-started/hello_world/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1
PS D:esp32examplesget-startedhello_world>
同样的步骤和同样的安装文件, 在家里的win10上安装后编译无问题, 不同之处是家里电脑为win10专业版,想问问各位是否知道怎么回事? 恳请指导一二.
PS: 怀疑为安装问题, 卸载了重装问题依旧.