idf.py build 报错 No CMAKE_C_COMPILER could be found.

abu9999
Posts: 1
Joined: Sat Nov 07, 2020 9:58 am

idf.py build 报错 No CMAKE_C_COMPILER could be found.

Postby abu9999 » Sat Nov 07, 2020 10:06 am

使用 ESP-IDF 工具安装器2.3 安装
安装过程都正常,没有报错,install export都已执行
win10系统
懂的人帮忙看看

E:\esp\esp-idf>idf.py build
Executing action: all (aliases: build)
Running cmake in directory e:\esp\esp-idf\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 e:\esp\esp-idf"...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
No CMAKE_ASM_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "E:/esp/esp-idf/CMakeFiles/CMakeOutput.log".
See also "E:/esp/esp-idf/CMakeFiles/CMakeError.log".
cmake failed with exit code 1

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Postby ESP_morris » Mon Nov 09, 2020 3:02 am

在你打开新的终端后,执行build之前,你需要先export环境变量,否则就会产生这种找不到找不到工具链的问题

GrandRiver
Posts: 9
Joined: Thu Dec 03, 2020 1:18 am

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Postby GrandRiver » Tue Dec 08, 2020 2:50 am

照做了,问题还是没有解决呢

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: idf.py build 报错 No CMAKE_C_COMPILER could be found.

Postby ESP_morris » Tue Dec 08, 2020 3:50 am

不要在IDF根目录执行idf.py build(你对一个SDK做编译没有任何意义),你至少要选择在一个project下做编译吧,比如某个idf的example

Who is online

Users browsing this forum: No registered users and 56 guests