platform-espressif32 icon indicating copy to clipboard operation
platform-espressif32 copied to clipboard

platform espressif32 6.12.0 fails to configure under macOS

Open kscheff opened this issue 5 months ago • 3 comments

I had the same issue when trying to get the esp-idf framework 5.4.2 going. Now with the official release of 6.12.0 including framework esp-idf 5.5.0 I am getting this error again, see log below for details.

I already cleared out the ~/.platformio/packages and ~/.platformio/platforms

This version works installs and works fine: platform = https://github.com/platformio/platform-espressif32.git#5e0a22e

@6.11.0 installs also fine, but does not work for me due to some new missing framework APIs (5.4.2)

Temporary fix

Disabling the component manager patched the issue:

[env]
...
extra_scripts = pre:disable_component_manager.py

And then punting into this python file: disable_component_manager.py:

import os
os.environ["IDF_COMPONENT_MANAGER"] = "0"

Original issue log:

Resolving esp32-c3-XXX dependencies...
Already up-to-date.
Updating metadata for the vscode IDE...
UserSideException: Processing esp32-c3-XXX (platform: [email protected]; board: esp32-c3-XXX; framework: espidf)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-XXX.html
PLATFORM: Espressif 32 (6.12.0) > XXX-24
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, 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-espidf @ 3.50500.0 (5.5.0) 
 - tool-cmake @ 3.30.2 
 - tool-esp-rom-elfs @ 0.0.1+20241011 
 - tool-esptoolpy @ 2.40900.0 (4.9.0) 
 - tool-ninja @ 1.9.0 
 - tool-riscv32-esp-elf-gdb @ 12.1.0+20221002 
 - tool-xtensa-esp-elf-gdb @ 12.1.0+20221002 
 - toolchain-esp32ulp @ 1.23800.240113 (2.38.0) 
 - toolchain-riscv32-esp @ 14.2.0+20241119
Reading CMake configuration...
-- Found Git: /usr/bin/git (found version "2.39.5 (Apple Git-154)")
-- git rev-parse returned 'fatal: not a git repository (or any parent up to mount point /Volumes)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).'
-- Minimal build - OFF
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /Volumes/SN770/Users/xxx/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Volumes/SN770/Users/xxx/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Volumes/SN770/Users/xxx/.platformio/packages/toolchain-riscv32-esp/bin/riscv32-esp-elf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32c3
-- Configuring incomplete, errors occurred!

fatal: not a git repository (or any parent up to mount point /Volumes)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /Volumes/SN770/Users/xxx/.platformio/packages/framework-espidf/tools/cmake/build.cmake:629 (message):
  usage: __main__.py [-h] [--project_dir PROJECT_DIR]

                     [--interface_version {0,1,2,3}] [--lock_path LOCK_PATH]
                     {prepare_dependencies,inject_requirements,inject_requrements}
                     ...

  __main__.py: error: argument --interface_version: invalid choice: 4 (choose
  from 0, 1, 2, 3)

Call Stack (most recent call first):
  /Volumes/SN770/Users/xxx/.platformio/packages/framework-espidf/tools/cmake/project.cmake:740 (idf_build_process)
  CMakeLists.txt:3 (project)



========================== [FAILED] Took 1.70 seconds ==========================

Environment       Status    Duration
----------------  --------  ------------
esp32-c3-XXX  FAILED    00:00:01.704
==================== 1 failed, 0 succeeded in 00:00:01.704 ====================

kscheff avatar Aug 04 '25 23:08 kscheff

Hi @kscheff, what's the output of /Volumes/SN770/Users/xxx/.platformio/penv/.espidf-5.5.0/Scripts/python -m pip list

valeros avatar Aug 05 '25 11:08 valeros

I had the same error. Delete the espidf venv. For me the location is in folder .platformio/penv/... The venv gets not updated (it should, but it did not in my case) and this error happens. When the venv gets fresh installed it works as expected.

Jason2866 avatar Aug 05 '25 12:08 Jason2866

@valeros there is no directory Scripts in my installation. @Jason2866 this helped, thanks. Strange: after reversing to the old penv directory it works also. The old directory had the subdirectory .esp-idf-5.5.0, but wasn't working. So it might be something to do with the creation of the penv directory itself.

kscheff avatar Aug 05 '25 17:08 kscheff

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.

stale[bot] avatar Dec 18 '25 01:12 stale[bot]