PlatformIO Community

Cant create project with doit esp32 devkit v1 with esp-idf framework

Hello,

I am unable to create a new project using the doit esp32 devkit v1 board with the esp-idf framework. I have read similar issues but none of the solutions has helped me. This is my terminal’s output when running pio update:

Updating platformio/contrib-piohome           3.3.4 @ ~3.3.4                     [Up-to-date]
Updating platformio/tool-scons                4.40100.2 @ ~4.40100.2             [Up-to-date]

    Platform Manager
    ================
    Platform espressif32
    --------
    Updating platformio/espressif32               3.2.0                              [Up-to-date]
    Updating platformio/toolchain-xtensa32        2.50200.97 @ ~2.50200.0            [Up-to-date]
    Updating platformio/toolchain-esp32ulp        1.22851.191205 @ ~1.22851.0        [Up-to-date]
    Updating platformio/framework-arduinoespressif32 3.10006.210326 @ ~3.10006.0        [Up-to-date]
    Updating platformio/framework-espidf          3.40200.210118 @ ~3.40200.0        [Up-to-date]
    Updating platformio/tool-esptoolpy            1.30000.201119 @ ~1.30000.0        [Up-to-date]
    Updating platformio/tool-mkspiffs             2.230.0 @ ~2.230.0                 [Up-to-date]
    Updating platformio/tool-cmake                3.16.4 @ ~3.16.0                   [Up-to-date]
    Updating platformio/tool-ninja                1.9.0 @ ^1.7.0                     [Up-to-date]
    Updating platformio/tool-mconf                1.4060000.20190628 @ ~1.4060000.0  [Up-to-date]
    Updating platformio/tool-idf                  1.0.1 @ ~1.0.1                     [Up-to-date]

    Platform espressif32
    --------
    Updating platformio/espressif32               1.11.2                             [Detached]
    Updating platformio/toolchain-xtensa32        2.50200.97 @ ~2.50200.0            [Up-to-date]
    Updating platformio/toolchain-esp32ulp        1.22851.191205 @ ~1.22851.190618   [Up-to-date]
    Updating platformio/tool-mkspiffs             2.230.0 @ ~2.230.0                 [Up-to-date]

For some reason espressif32 appears as detached.

When i open older projects with the same boards there are no errors at all and i can even compile the program. This only occurs when i try creating new projects as mentioned above.

This is the output when i try to create new project:

Could not initialize project

PIO Core Call Error: "The current working directory C:\\Users\\User\\Documents\\PlatformIO\\Projects\\test_project will be used for the project.\r\n\r\nThe next files/directories have been created in C:\\Users\\User\\Documents\\PlatformIO\\Projects\\test_project\r\ninclude - Put project header files here\r\nlib - Put here project specific (private) libraries\r\nsrc - Put project source files here\r\nplatformio.ini - Project Configuration File\r\n\n\nError: Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: espidf)\r\n--------------------------------------------------------------------------------\r\nVerbose mode can be enabled via -v, --verbose option\r\nCONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html\r\nPLATFORM: Espressif 32 (3.2.0) > DOIT ESP32 DEVKIT V1\r\nHARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash\r\nDEBUG: Current (esp-prog) External (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)\r\nPACKAGES: \r\n - framework-espidf 3.40200.210118 (4.2.0) \r\n - tool-cmake 3.16.4 \r\n - tool-esptoolpy 1.30000.201119 (3.0.0) \r\n - tool-idf 1.0.1 \r\n - tool-mconf 1.4060000.20190628 (406.0.0) \r\n - tool-ninja 1.9.0 \r\n - toolchain-esp32ulp 1.22851.191205 (2.28.51) \r\n - toolchain-xtensa32 2.80400.210211 (8.4.0)\r\nReading CMake configuration...\r\n-- Found Git: C:/Program Files/Git/cmd/git.exe (found version \"2.27.0.windows.1\") \r\n-- The C compiler identification is GNU 8.4.0\r\n-- The CXX compiler identification is GNU 8.4.0\r\n-- The ASM compiler identification is GNU\r\n-- Found assembler: C:/Users/User/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe\r\n-- Check for working C compiler: C:/Users/User/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe\r\n-- Check for working C compiler: C:/Users/User/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Detecting C compile features\r\n-- Detecting C compile features - done\r\n-- Check for working CXX compiler: C:/Users/User/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe\r\n-- Check for working CXX compiler: C:/Users/User/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++.exe -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Detecting CXX compile features\r\n-- Detecting CXX compile features - done\r\n-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.\r\n-- Building ESP-IDF components for target esp32\r\n-- Found PythonInterp: C:/Users/User/.platformio/penv/Scripts/python.exe (found version \"3.9.2\") \r\n-- Could NOT find Perl (missing: PERL_EXECUTABLE) \r\n-- App \"test_project\" version: 1\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld\r\n-- Adding linker script C:/Users/User/Documents/PlatformIO/Projects/test_project/.pio/build/esp32doit-devkit-v1/esp-idf/esp32/esp32_out.ld\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp32/ld/esp32.project.ld.in\r\n-- Adding linker script C:/Users/User/.platformio/packages/framework-espidf/components/esp32/ld/esp32.peripherals.ld\r\n-- Components: __pio_env app_trace app_update asio bootloader bootloader_support bt cbor coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_ipc esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs src tcp_transport tcpip_adapter tinyusb ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa\r\n-- Component paths: C:/Users/User/Documents/PlatformIO/Projects/test_project/.pio/build/esp32doit-devkit-v1/__pio_env C:/Users/User/.platformio/packages/framework-espidf/components/app_trace C:/Users/User/.platformio/packages/framework-espidf/components/app_update C:/Users/User/.platformio/packages/framework-espidf/components/asio C:/Users/User/.platformio/packages/framework-espidf/components/bootloader C:/Users/User/.platformio/packages/framework-espidf/components/bootloader_support C:/Users/User/.platformio/packages/framework-espidf/components/bt C:/Users/User/.platformio/packages/framework-espidf/components/cbor C:/Users/User/.platformio/packages/framework-espidf/components/coap C:/Users/User/.platformio/packages/framework-espidf/components/console C:/Users/User/.platformio/packages/framework-espidf/components/cxx C:/Users/User/.platformio/packages/framework-espidf/components/driver C:/Users/User/.platformio/packages/framework-espidf/components/efuse C:/Users/User/.platformio/packages/framework-espidf/components/esp-tls C:/Users/User/.platformio/packages/framework-espidf/components/esp32 C:/Users/User/.platformio/packages/framework-espidf/components/esp_adc_cal C:/Users/User/.platformio/packages/framework-espidf/components/esp_common C:/Users/User/.platformio/packages/framework-espidf/components/esp_eth C:/Users/User/.platformio/packages/framework-espidf/components/esp_event C:/Users/User/.platformio/packages/framework-espidf/components/esp_gdbstub C:/Users/User/.platformio/packages/framework-espidf/components/esp_hid C:/Users/User/.platformio/packages/framework-espidf/components/esp_http_client C:/Users/User/.platformio/packages/framework-espidf/components/esp_http_server C:/Users/User/.platformio/packages/framework-espidf/components/esp_https_ota C:/Users/User/.platformio/packages/framework-espidf/components/esp_https_server C:/Users/User/.platformio/packages/framework-espidf/components/esp_ipc C:/Users/User/.platformio/packages/framework-espidf/components/esp_local_ctrl C:/Users/User/.platformio/packages/framework-espidf/components/esp_netif C:/Users/User/.platformio/packages/framework-espidf/components/esp_ringbuf C:/Users/User/.platformio/packages/framework-espidf/components/esp_rom C:/Users/User/.platformio/packages/framework-espidf/components/esp_serial_slave_link C:/Users/User/.platformio/packages/framework-espidf/components/esp_system C:/Users/User/.platformio/packages/framework-espidf/components/esp_timer C:/Users/User/.platformio/packages/framework-espidf/components/esp_websocket_client C:/Users/User/.platformio/packages/framework-espidf/components/esp_wifi C:/Users/User/.platformio/packages/framework-espidf/components/espcoredump C:/Users/User/.platformio/packages/framework-espidf/components/esptool_py C:/Users/User/.platformio/packages/framework-espidf/components/expat C:/Users/User/.platformio/packages/framework-espidf/components/fatfs C:/Users/User/.platformio/packages/framework-espidf/components/freemodbus C:/Users/User/.platformio/packages/framework-espidf/components/freertos C:/Users/User/.platformio/packages/framework-espidf/components/heap C:/Users/User/.platformio/packages/framework-espidf/components/idf_test C:/Users/User/.platformio/packages/framework-espidf/components/jsmn C:/Users/User/.platformio/packages/framework-espidf/components/json C:/Users/User/.platformio/packages/framework-espidf/components/libsodium C:/Users/User/.platformio/packages/framework-espidf/components/log C:/Users/User/.platformio/packages/framework-espidf/components/lwip C:/Users/User/.platformio/packages/framework-espidf/components/mbedtls C:/Users/User/.platformio/packages/framework-espidf/components/mdns C:/Users/User/.platformio/packages/framework-espidf/components/mqtt C:/Users/User/.platformio/packages/framework-espidf/components/newlib C:/Users/User/.platformio/packages/framework-espidf/components/nghttp C:/Users/User/.platformio/packages/framework-espidf/components/nvs_flash C:/Users/User/.platformio/packages/framework-espidf/components/openssl C:/Users/User/.platformio/packages/framework-espidf/components/partition_table C:/Users/User/.platformio/packages/framework-espidf/components/perfmon C:/Users/User/.platformio/packages/framework-espidf/components/protobuf-c C:/Users/User/.platformio/packages/framework-espidf/components/protocomm C:/Users/User/.platformio/packages/framework-espidf/components/pthread C:/Users/User/.platformio/packages/framework-espidf/components/sdmmc C:/Users/User/.platformio/packages/framework-espidf/components/soc C:/Users/User/.platformio/packages/framework-espidf/components/spi_flash C:/Users/User/.platformio/packages/framework-espidf/components/spiffs C:/Users/User/Documents/PlatformIO/Projects/test_project/src C:/Users/User/.platformio/packages/framework-espidf/components/tcp_transport C:/Users/User/.platformio/packages/framework-espidf/components/tcpip_adapter C:/Users/User/.platformio/packages/framework-espidf/components/tinyusb C:/Users/User/.platformio/packages/framework-espidf/components/ulp C:/Users/User/.platformio/packages/framework-espidf/components/unity C:/Users/User/.platformio/packages/framework-espidf/components/vfs C:/Users/User/.platformio/packages/framework-espidf/components/wear_levelling C:/Users/User/.platformio/packages/framework-espidf/components/wifi_provisioning C:/Users/User/.platformio/packages/framework-espidf/components/wpa_supplicant C:/Users/User/.platformio/packages/framework-espidf/components/xtensa\r\n-- Configuring incomplete, errors occurred!\r\nSee also \"C:/Users/User/Documents/PlatformIO/Projects/test_project/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeOutput.log\".\r\n\r\nCMake Error at .pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/grabRef.cmake:48 (file):\r\n file failed to open for reading (No such file or directory):\r\n\r\n C:/Users/User/Documents/PlatformIO/Projects/test_project/.pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/head-ref\r\nCall Stack (most recent call first):\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/build.cmake:68 (git_describe)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/build.cmake:160 (__build_get_idf_git_revision)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/idf.cmake:49 (__build_init)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/project.cmake:7 (include)\r\n CMakeLists.txt:2 (include)\r\n\r\n\r\nCMake Error at .pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/grabRef.cmake:48 (file):\r\n file failed to open for reading (No such file or directory):\r\n\r\n C:/Users/User/Documents/PlatformIO/Projects/test_project/.pio/build/esp32doit-devkit-v1/CMakeFiles/git-data/head-ref\r\nCall Stack (most recent call first):\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/project.cmake:48 (git_describe)\r\n C:/Users/User/.platformio/packages/framework-espidf/tools/cmake/project.cmake:391 (__project_get_revision)\r\n CMakeLists.txt:3 (project)\r\n\r\n\r\n\r\n========================== [FAILED] Took 7.87 seconds

Could you offer me guidance on how to solve this issue?

thanks in advance

Reminds me of build fails if project is empty git repo (IDFGH-1676) · Issue #3920 · espressif/esp-idf · GitHub. Is any project in the folder chain of C:/Users/User/Documents/PlatformIO/Projects/test_project a git repository (git init has been executed in them)?

1 Like

None of them. I tried to initialize git but it still does not work. The weird about this is, i can successfully create projects with the arduino framework using the esp32 Board. Only when selecting the esp idf framework it fails to create new project.

I have the same problem is there any solution to it?

Does it appear in the latest ESP-IDF too when you install it per Espressif instructions? Then issue → Issues · espressif/esp-idf · GitHub

I would be interesting to conduct a poll to reveal:–

  1. how many people attempted to follow IDF instructions
  2. how many of step 1 succeeded

Just for everyone how gets stuck into this. The solution for me was to take pervious Version.