Page 1 of 1
strange git error in Ninha/Cmake build in ESP-32 Vscode project
Posted: Tue Apr 16, 2024 2:42 pm
by chriskuku
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
Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project
Posted: Wed Jan 29, 2025 6:26 pm
by DeltaPi
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"
Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project
Posted: Sun Feb 02, 2025 4:08 am
by mgrote013
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!
Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project
Posted: Mon Feb 03, 2025 8:27 am
by Roland
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).
Re: strange git error in Ninha/Cmake build in ESP-32 Vscode project
Posted: Mon Feb 03, 2025 2:58 pm
by mgrote013
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.