platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
855 stars 570 forks source link

fatal: not a git repository (or any of the parent directories): .git #1352

Closed hitecSmartHome closed 2 months ago

hitecSmartHome commented 2 months ago

This morning I got a compilation error out of the blue. I'm using Arduino as component of IDF with platformio

Here is my PIO ini file

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
build_cache_dir = ./cache

[env:esp-wrover-kit]
check_skip_packages = yes
platform = espressif32
board = esp-wrover-kit
framework = arduino, espidf
board_build.filesystem = littlefs

upload_protocol = espota
upload_port     = 192.168.10.107
upload_speed    = 921600

monitor_speed   = 115200
monitor_filters = colorize, esp32_exception_decoder

board_upload.flash_size = 16MB
board_build.flash_mode = qio
board_build.partitions = ./Partitions/hshPartition_APP_3MB.csv
board_build.f_cpu   = 240000000L
board_build.f_flash = 80000000L

build_flags = 
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue
    -mfix-esp32-psram-cache-strategy=memw
    -DCONFIG_SPIRAM_USE_MALLOC=1
    -DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1
    -DCONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=1
    -DCONFIG_SPIRAM_CACHE_WORKAROUND=1
    -DCORE_DEBUG_LEVEL=0
    -std=gnu++17

build_unflags =
    -std=gnu++11

upload_flags =
     --auth=test

Compilation error

Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino, espidf)
------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (6.6.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
 - framework-espidf @ 3.40406.240122 (4.4.6)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40501.0 (4.5.1)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - tool-openocd-esp32 @ 2.1100.20220706 (11.0)
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Warning! Arduino framework as an ESP-IDF component doesn't handle the `variant` field! The default `esp32` variant will be used.
Reading CMake configuration...
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/Users/Pc/OneDrive/Dokumentumok/GitHub/HsH/HitecSmartHome_IDF/sdkconfig.esp-wrover-kit
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/soc/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa    
-- Component paths: C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader_support C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/efuse C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp32 C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_common C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_hw_support C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_rom C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esp_system C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/esptool_py C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/freertos C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/hal C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/log C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader/subproject/main C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/bootloader/subproject/components/micro-ecc C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/newlib C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/partition_table C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/soc C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/spi_flash C:/Users/Pc/.platformio/packages/framework-espidf@3.40406.240122/components/xtensa
-- Configuring incomplete, errors occurred!
See also "C:/Users/Pc/OneDrive/Dokumentumok/GitHub/HsH/HitecSmartHome_IDF/.pio/build/esp-wrover-kit/bootloader/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any of the parent directories): .git
CMake Error at ../../esptool_py/CMakeLists.txt:67 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "app".

  The add_dependencies works for top-level logical targets created by the
  add_executable, add_library, or add_custom_target commands.  If you want to
  add file-level dependencies see the DEPENDS option of the add_custom_target
  and add_custom_command commands.

And I can't compile my sketch. I have tried to close vscode, delete cache, clean the project. None of these works.

hitecSmartHome commented 2 months ago

So i deleted the sdkconfig.esp-wrover-kit file from my project. After that, I had to go back to menuconfig and reenable every one of the options I use and compile again. Strange. Probably I misconfigured something in the menuconfig which caused this to happen.