Missing Compiler

birghtnight
Posts: 2
Joined: Sun Jun 04, 2023 5:25 am

Missing Compiler

Postby birghtnight » Sun Jun 04, 2023 5:31 am

When I try to build a project for the ESP32-S3 dev kit using windows 10 in the expressif cmd I get a missing compiler error. Any suggestions on a fix:

Code: Select all

Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DESP_PLATFORM=1 -DCCACHE_ENABLE=1 C:\Espressif\frameworks\esp-idf-v5.0.2-3"...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at C:/Espressif/tools/cmake/3.24.0/share/cmake-3.24/Modules/CMakeDetermineASMCompiler.cmake:17 (message):
  Could not find compiler set in environment variable ASM:

  path\to\compiler\asm.exe.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "C:/Espressif/frameworks/esp-idf-v5.0.2-3/build/CMakeFiles/CMakeOutput.log".
See also "C:/Espressif/frameworks/esp-idf-v5.0.2-3/build/CMakeFiles/CMakeError.log".
cmake failed with exit code 1, output of the command is in the C:\Espressif\frameworks\esp-idf-v5.0.2-3\build\log\idf_py_stderr_output_31932 and C:\Espressif\frameworks\esp-idf-v5.0.2-3\build\log\idf_py_stdout_output_31932

a2800276
Posts: 78
Joined: Sat Jan 23, 2016 1:59 pm

Re: Missing Compiler

Postby a2800276 » Sun Jun 04, 2023 8:32 am

Did you follow the instructions for installing the idf precisely? Specifically did you call the install that script to install the compilers etc after checking out the repository, and set necessary environment params?

MicroController
Posts: 1707
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Missing Compiler

Postby MicroController » Sun Jun 04, 2023 4:06 pm

Try and run

Code: Select all

idf_tools.py list
and see if its output includes something like (emphasis on "installed")

Code: Select all

* xtensa-esp32s3-elf: Toolchain for Xtensa (ESP32-S3) based on GCC
  - esp-12.2.0_20230208 (recommended, installed)

birghtnight
Posts: 2
Joined: Sun Jun 04, 2023 5:25 am

Re: Missing Compiler

Postby birghtnight » Sun Jun 04, 2023 5:16 pm

Thanks for your suggestion. When I run

Code: Select all

idf_tools.py list 
it asks me how I want to open the file and I picked visual studio. It then open the idf_tools.py file that lists in the comments how to install idf tool, update the path, which I have run in the IDF cmd. After a minute or so I get the following list in the IDF cmd window where I originally typed the command:

Code: Select all

C:\Espressif\frameworks\esp-idf-v5.0.2-6>
[main 2023-06-04T17:12:02.026Z] update#setState idle
[main 2023-06-04T17:12:32.031Z] update#setState checking for updates
[main 2023-06-04T17:12:32.128Z] update#setState idle
[25912:0604/131402.023:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is disabled, ANGLE is
I didn't see anything that says installed or xtensa. However, it looks like it's already installed:

Code: Select all

C:\Espressif\frameworks\esp-idf-v5.0.2-6>xtensa-esp32s3-elf-gcc --version
xtensa-esp32s3-elf-gcc (crosstool-NG esp-2022r1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

MicroController
Posts: 1707
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Missing Compiler

Postby MicroController » Mon Jun 05, 2023 8:25 am

Under Windows, try

Code: Select all

%IDF_PYTHON% %IDF_PATH%\tools\idf_tools.py list
to actually run idf_tools.

Tomblarom
Posts: 3
Joined: Sat Feb 17, 2024 2:38 pm

Re: Missing Compiler

Postby Tomblarom » Sat Feb 17, 2024 2:46 pm

MicroController wrote:

Code: Select all

%IDF_PYTHON% %IDF_PATH%\tools\idf_tools.py list

Was getting this very weird behaviour, when running idf_tools.py install. Visual Studio Code opened and I was very confused!!

Code: Select all

C:\Users\X390\esp\v5.2\esp-idf> idf_tools.py install
[main 2024-02-17T14:42:17.866Z] update#setState idle
[main 2024-02-17T14:42:20.567Z] Extension host with pid 23232 exited with code: 0, signal: unknown.
Finally! You advised helped! Can you please add this to your docs?? I removed and installed the ESP-IDF nearly 3 times, when working with idf_tools the first time and trying to install esp-clang. THANK YOU!

Who is online

Users browsing this forum: No registered users and 85 guests