strange git error in Ninha/Cmake build in ESP-32 Vscode project

chriskuku
Posts: 9
Joined: Fri Mar 29, 2024 5:49 pm

strange git error in Ninha/Cmake build in ESP-32 Vscode project

Postby chriskuku » Tue Apr 16, 2024 2:42 pm

When building one of the example projects in

``~/Users/kuku/esp/v5.2/esp-idf/examples/peripherals/lcd/spi_lcd_touch``

I'm getting

Code: Select all

*  Executing task: ninja  

[0/1] Re-running CMake...
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
...
What gives?

EDIT: I get this also when doing an

Code: Select all

idf.py menuconfig

DeltaPi
Posts: 1
Joined: Wed Jan 29, 2025 6:24 pm

Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project

Postby DeltaPi » Wed Jan 29, 2025 6:26 pm

I am also having the same problem, but only after installing the arduino framework component using the command

idf.py add-dependency "espressif/arduino-esp32^3.0.2"

mgrote013
Posts: 3
Joined: Sun Feb 02, 2025 4:05 am

Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project

Postby mgrote013 » Sun Feb 02, 2025 4:08 am

I'm getting the same error, even just trying the hello_world example. I've been beating my head against the wall for a day, please tell me one of you two found a solution!

User avatar
Roland
Espressif staff
Espressif staff
Posts: 272
Joined: Tue Oct 09, 2018 10:28 am

Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project

Postby Roland » Mon Feb 03, 2025 8:27 am

The error is coming from the build system which tries to detect the ESP-IDF version. If the git command is not found then it will fall back to alternative solutions, ie. version detection from files. I remember that Vscode didn't like the "fatal" or "error" words in the output but this has been resolved over time. Please check that you use the latest available bugfix version for ESP-IDF (X.Y.Z - latest available Z for whatever ESP-IDF X.Y you are using) and the latest Vscode plugin version. And if you still experience the issue then please open an issue in the vscode plugin github repo (https://github.com/espressif/vscode-esp-idf-extension).

mgrote013
Posts: 3
Joined: Sun Feb 02, 2025 4:05 am

Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project

Postby mgrote013 » Mon Feb 03, 2025 2:58 pm

Thanks for the info. I'm running 5.1.5.

The good news is that I found a workaround. I moved my project files from my cloud drive (Google drive on G:) to a local drive C:. It still throws a similar git error, but it no longer gets caught in an endless CMake loop and I've been able to successfully build my project. I made a separate post on the general discussions page documenting this for any other fellow novices like me.

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], ChatGPT-User, PerplexityBot, Semrush [Bot] and 3 guests