platformio / platformio-home

PlatformIO Home
https://docs.platformio.org/page/home/index.html
Apache License 2.0
95 stars 62 forks source link

Could not initialize project with ESP-IDF (but work well with arduino for ESP32) #2865

Closed viafx24 closed 3 years ago

viafx24 commented 3 years ago

I got this error trying creating a project for ESP32 using ESP-IDF (work perfectly on my computer with the arduino code).

I have tried to: 1) remove some envionnement variables relative to cmake or python : no influence; still can't create a project. 2) uninstall platformio and delete .platfomio folder, then reboot computer et reinstall everything: no influence; still can't create a project. 3) thus i tried to install the expressif extension and follow all the long steps and after a long time, i got some python errors. Thus, i failed also by using the alternative extension of expressif but i think it's a different problem.

Is someone has any idea about this problems? (lot of persons encounters this errors without a solution in the forums).

I have windows 10, VScode and platformio up-to-date. Again, the esp32 works well with the arduino framework. I only struggle with the ESP-IDF.

Cheers,

viafx24

PIO Core Call Error: "The current working directory F:\Documents\PlatformIO\Projects\Test_56 will be used for the project.\r\n\r\nThe next files/directories have been created in F:\Documents\PlatformIO\Projects\Test_56\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.3.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.40300.0 (4.3.0) \r\n - tool-cmake 3.16.4 \r\n - tool-esptoolpy 1.30100.210531 (3.1.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.18.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/Guillaume/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe\r\n-- Check for working C compiler: C:/Users/Guillaume/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe\r\n-- Check for working C compiler: C:/Users/Guillaume/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe -- broken\r\n-- Configuring incomplete, errors occurred!\r\nSee also \"F:/Documents/PlatformIO/Projects/Test_56/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeOutput.log\".\r\nSee also \"F:/Documents/PlatformIO/Projects/Test_56/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeError.log\".\r\n\r\nfatal: not a git repository (or any of the parent directories): .git\r\nCMake Error at C:/Users/Guillaume/.platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:44 (try_compile):\r\n Failed to open\r\n\r\n F:/Documents/PlatformIO/Projects/Test_56/.pio/build/esp32doit-devkit-v1/CMakeFiles/CMakeTmp/CMakeLists.txt\r\n\r\n Permission denied\r\nCall Stack (most recent call first):\r\n C:/Users/Guillaume/.platformio/packages/framework-espidf/tools/cmake/project.cmake:308 (project)\r\n CMakeLists.txt:3 (project)\r\n\r\n\r\nCMake Error at C:/Users/Guillaume/.platformio/packages/tool-cmake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):\r\n The C compiler\r\n\r\n \"C:/Users/Guillaume/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc.exe\"\r\n\r\n is not able to compile a simple test program.\r\n\r\n It fails with the following output:\r\n\r\n \r\n\r\n \r\n\r\n CMake will not be able to correctly generate this project.\r\nCall Stack (most recent call first):\r\n C:/Users/Guillaume/.platformio/packages/framework-espidf/tools/cmake/project.cmake:308 (project)\r\n CMakeLists.txt:3 (project)\r\n\r\n\r\n\r\n========================== [FAILED] Took 5.21 seconds =========================="

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.