espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.61k stars 7.27k forks source link

Failure running cmake: (IDFGH-6637) #8277

Open Nnicholasnjue opened 2 years ago

Nnicholasnjue commented 2 years ago

Hello, I've been stuck with setting up esp-idf on eclipse for the past one week now. Right now am getting this error:

cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\ENGINEER\esp\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\Users\ENGINEER\eclipse-workspace\hello_world Failure running cmake:

when trying to compile the hello_world example on eclipse. Mysteriously with the esp_idf cmd and power shell, am able to compile and upload to esp32.

Coffeeye commented 2 years ago

Happened to me on reinstal with ESP-IDF Windows Installer after Configuring CMake Toolchain

cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\project\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\project
Failure running cmake: 

FIXED by adding to PATH all tools from .esspresif manualy

kolipakakondal commented 2 years ago

Hello,

This could happen when PATH is not configured correctly. Eclipse plugin provides a way to configure all the required tools and paths, to do this:

  1. Navigate to the Espressif Menu
  2. ESP-IDF Tools Manager > Install Tools

This will check and install the required tools(If it's already installed, it won't install again!) and configure the paths to eclipse CDT build environment.

After running the "Install Tools" action from the eclipse, you could verify the configured paths in the preferences section. Preferences > C/C++ > Build > Environment

Note: Give attention to the console log while running "Install Tools", if something is wrong while installing, it will be reported here.

EmreDUR commented 2 years ago

Happened to me on reinstal with ESP-IDF Windows Installer after Configuring CMake Toolchain

cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\project\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCCACHE_ENABLE=1 -DIDF_TARGET=esp32 C:\project
Failure running cmake: 

FIXED by adding to PATH all tools from .esspresif manualy

Hello. I'm experiencing the same issue as you. Could you please elaborate your solution and explain which tools did you add to PATH and which PATH? I tried to add them manually as well but it did not work.

harsha8370 commented 2 months ago

Hi @kolipakakondal

I am getting this type of error can you help me to resolve this issue? image

kolipakakondal commented 2 months ago

Hi @harsha8370 Please follow the instructions from here to build an esp-adf example in the espressif-ide 3.0

I have updated the docs after verifying with the latest espressif-ide 3.0 with esp-adf-v2.6

Screenshot 2024-08-09 at 1 43 38 PM
harsha8370 commented 2 months ago

Hi @kolipakakondal I am getting cmake file error and I configured all the things properly

please give me solutions to resolve this issue ASAP

image