hi 各位:
我安装了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:\esp32\examples\get-started\hello_world> idf.py set-target esp32c3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
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:\esp32\examples\get-started\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=1 d:\esp32\examples\get-started\hello_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:\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin\riscv32-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:\esp32\examples\get-started\hello_world>
同样的步骤和同样的安装文件, 在家里的win10上安装后编译无问题, 不同之处是家里电脑为win10专业版,想问问各位是否知道怎么回事? 恳请指导一二.
PS: 怀疑为安装问题, 卸载了重装问题依旧.
[已解决] win10家庭版安装idf V4.3.1后编译例程失败
Re: win10家庭版安装idf V4.3.1后编译例程失败
您好,建议您那边尝试删除 build 文件夹重新编译看看。
Re: win10家庭版安装idf V4.3.1后编译例程失败
你好, 感谢回复.
build手动删除过, 仍然是 同样的错误.
build手动删除过, 仍然是 同样的错误.
Re: win10家庭版安装idf V4.3.1后编译例程失败
我贴上我打开power shell 后的操作 log及error log来给各位看看. 麻烦了.
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
Setting PYTHONNOUSERSITE, was not set
Using Python in D:\.espressif\python_env\idf4.3_py3.8_env\Scripts
Python 3.8.7
Using Git in D:\.espressif\tools\idf-git\2.30.1\cmd
git version 2.30.1.windows.1
Setting IDF_PATH: D:\esp32
Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.20.0. To use it, run 'D:\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe D:\esp32\tools\idf_tools.py export --prefer-system'
Not using an unsupported version of tool ccache found in PATH: 3.1.9. To use it, run 'D:\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe D:\esp32\tools\idf_tools.py export --prefer-system'
Name Value
---- -----
OPENOCD_SCRIPTS d:\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\share\openocd\...
IDF_CCACHE_ENABLE 1
IDF_PYTHON_ENV_PATH d:\.espressif\python_env\idf4.3_py3.8_env
Added to PATH
-------------
D:\esp32\components\esptool_py\esptool
D:\esp32\components\app_update
D:\esp32\components\espcoredump
D:\esp32\components\partition_table
d:\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\bin
d:\.espressif\tools\xtensa-esp32s2-elf\esp-2021r1-8.4.0\xtensa-esp32s2-elf\bin
d:\.espressif\tools\xtensa-esp32s3-elf\esp-2021r1-8.4.0\xtensa-esp32s3-elf\bin
d:\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin
d:\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
d:\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
d:\.espressif\tools\cmake\3.16.4\bin
d:\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin
d:\.espressif\tools\idf-exe\1.0.1\
d:\.espressif\tools\ccache\3.7\
d:\.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
D:\esp32\tools
%PATH%
D:\.espressif\python_env\idf4.3_py3.8_env\Scripts
Checking if Python packages are up to date...
Python requirements from D:\esp32\requirements.txt are satisfied.
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
PS D:\esp32> cd .\examples\get-started\hello_world\
PS D:\esp32\examples\get-started\hello_world> ls
目录: D:\esp32\examples\get-started\hello_world
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/10/19 8:45 build
d----- 2021/10/12 11:43 main
-a---- 2021/10/5 18:07 241 CMakeLists.txt
-a---- 2021/10/5 18:07 683 example_test.py
-a---- 2021/10/5 18:07 190 Makefile
-a---- 2021/10/5 18:07 2387 README.md
PS D:\esp32\examples\get-started\hello_world> rm -rf .\build\
Remove-Item : 找不到与参数名称“rf”匹配的参数。
所在位置 行:1 字符: 4
+ rm -rf .\build\
+ ~~~
+ CategoryInfo : InvalidArgument: (:) [Remove-Item],ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
PS D:\esp32\examples\get-started\hello_world> rm .\build\
确认
D:\esp32\examples\get-started\hello_world\build\ 处的项具有子项,并且未指定 Recurse
参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) 暂停(S) [?] 帮助 (默认值为“Y”): A
PS D:\esp32\examples\get-started\hello_world> ls
目录: D:\esp32\examples\get-started\hello_world
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/10/12 11:43 main
-a---- 2021/10/5 18:07 241 CMakeLists.txt
-a---- 2021/10/5 18:07 683 example_test.py
-a---- 2021/10/5 18:07 190 Makefile
-a---- 2021/10/5 18:07 2387 README.md
PS D:\esp32\examples\get-started\hello_world> idf.py set-target esp32c3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory 'd:\esp32\examples\get-started\hello_world\build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32c3, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory d:\esp32\examples\get-started\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=1 d:\esp32\examples\get-started\hello_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_5b5cd && [1/2] Building C object CMakeFiles/cmTC_5b5cd.dir/testCCompiler.c.obj
FAILED: CMakeFiles/cmTC_5b5cd.dir/testCCompiler.c.obj
D:\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe -march=rv32imc -o CMakeFiles/cmTC_5b5cd.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:\esp32\examples\get-started\hello_world>
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
Setting PYTHONNOUSERSITE, was not set
Using Python in D:\.espressif\python_env\idf4.3_py3.8_env\Scripts
Python 3.8.7
Using Git in D:\.espressif\tools\idf-git\2.30.1\cmd
git version 2.30.1.windows.1
Setting IDF_PATH: D:\esp32
Adding ESP-IDF tools to PATH...
Not using an unsupported version of tool cmake found in PATH: 3.20.0. To use it, run 'D:\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe D:\esp32\tools\idf_tools.py export --prefer-system'
Not using an unsupported version of tool ccache found in PATH: 3.1.9. To use it, run 'D:\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe D:\esp32\tools\idf_tools.py export --prefer-system'
Name Value
---- -----
OPENOCD_SCRIPTS d:\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\share\openocd\...
IDF_CCACHE_ENABLE 1
IDF_PYTHON_ENV_PATH d:\.espressif\python_env\idf4.3_py3.8_env
Added to PATH
-------------
D:\esp32\components\esptool_py\esptool
D:\esp32\components\app_update
D:\esp32\components\espcoredump
D:\esp32\components\partition_table
d:\.espressif\tools\xtensa-esp32-elf\esp-2021r1-8.4.0\xtensa-esp32-elf\bin
d:\.espressif\tools\xtensa-esp32s2-elf\esp-2021r1-8.4.0\xtensa-esp32s2-elf\bin
d:\.espressif\tools\xtensa-esp32s3-elf\esp-2021r1-8.4.0\xtensa-esp32s3-elf\bin
d:\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin
d:\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
d:\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
d:\.espressif\tools\cmake\3.16.4\bin
d:\.espressif\tools\openocd-esp32\v0.10.0-esp32-20210401\openocd-esp32\bin
d:\.espressif\tools\idf-exe\1.0.1\
d:\.espressif\tools\ccache\3.7\
d:\.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
D:\esp32\tools
%PATH%
D:\.espressif\python_env\idf4.3_py3.8_env\Scripts
Checking if Python packages are up to date...
Python requirements from D:\esp32\requirements.txt are satisfied.
Done! You can now compile ESP-IDF projects.
Go to the project directory and run:
idf.py build
PS D:\esp32> cd .\examples\get-started\hello_world\
PS D:\esp32\examples\get-started\hello_world> ls
目录: D:\esp32\examples\get-started\hello_world
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/10/19 8:45 build
d----- 2021/10/12 11:43 main
-a---- 2021/10/5 18:07 241 CMakeLists.txt
-a---- 2021/10/5 18:07 683 example_test.py
-a---- 2021/10/5 18:07 190 Makefile
-a---- 2021/10/5 18:07 2387 README.md
PS D:\esp32\examples\get-started\hello_world> rm -rf .\build\
Remove-Item : 找不到与参数名称“rf”匹配的参数。
所在位置 行:1 字符: 4
+ rm -rf .\build\
+ ~~~
+ CategoryInfo : InvalidArgument: (:) [Remove-Item],ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
PS D:\esp32\examples\get-started\hello_world> rm .\build\
确认
D:\esp32\examples\get-started\hello_world\build\ 处的项具有子项,并且未指定 Recurse
参数。如果继续,所有子项均将随该项删除。是否确实要继续?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) 暂停(S) [?] 帮助 (默认值为“Y”): A
PS D:\esp32\examples\get-started\hello_world> ls
目录: D:\esp32\examples\get-started\hello_world
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2021/10/12 11:43 main
-a---- 2021/10/5 18:07 241 CMakeLists.txt
-a---- 2021/10/5 18:07 683 example_test.py
-a---- 2021/10/5 18:07 190 Makefile
-a---- 2021/10/5 18:07 2387 README.md
PS D:\esp32\examples\get-started\hello_world> idf.py set-target esp32c3
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Build directory 'd:\esp32\examples\get-started\hello_world\build' not found. Nothing to clean.
Executing action: set-target
Set Target to: esp32c3, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.
Running cmake in directory d:\esp32\examples\get-started\hello_world\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DIDF_TARGET=esp32c3 -DCCACHE_ENABLE=1 d:\esp32\examples\get-started\hello_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_5b5cd && [1/2] Building C object CMakeFiles/cmTC_5b5cd.dir/testCCompiler.c.obj
FAILED: CMakeFiles/cmTC_5b5cd.dir/testCCompiler.c.obj
D:\.espressif\tools\riscv32-esp-elf\esp-2021r1-8.4.0\riscv32-esp-elf\bin\riscv32-esp-elf-gcc.exe -march=rv32imc -o CMakeFiles/cmTC_5b5cd.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:\esp32\examples\get-started\hello_world>
- Attachments
-
- CMakeOutput.log
- (1.49 KiB) Downloaded 698 times
-
- CMakeError.log
- (2.25 KiB) Downloaded 532 times
-
- Posts: 26
- Joined: Thu Nov 18, 2021 12:22 am
Re: win10家庭版安装idf V4.3.1后编译例程失败
有没有 搞定呀?
Re: win10家庭版安装idf V4.3.1后编译例程失败
通过重装系统为WIN10 专业版解决。 果然重装能解决99%的问题。
其实未必是系统的问题, 也有可能是之前安装了其他的一些软件, 比如python, Cygwin, gcc 之类的软件和idf冲突了。
其实未必是系统的问题, 也有可能是之前安装了其他的一些软件, 比如python, Cygwin, gcc 之类的软件和idf冲突了。
Who is online
Users browsing this forum: Google [Bot] and 94 guests