Cannot build with latest framework-espidf @ 3.50100.0 (5.1.0)

Hi,

I want to use the latest esp-idf release 3.50100.0 with platformio. However, I encounter issues. I already covered all options: fresh re-installed platformio including delete of .plarformio folder, updated packages, google, chatgpt, etc. However, error persists.

I see also a “not a git repository”. But that should not be the issue because previous version 3.50002.230601 is working without problems. I think is related to CMake Error kconfgen not able to create the sdkconfig.main file.
Any help is much appreciated.

My platformio.ini file:

[platformio]
default_envs = main

[env]
platform = espressif32@6.3.2                            ; see versions  https://registry.platformio.org/platforms/platformio/espressif32/versions
board = esp32dev
framework = espidf
platform_packages = framework-espidf@3.50100.0   ; previous 3.50002.230601 is working, see versions https://registry.platformio.org/tools/platformio/framework-espidf/versions
upload_speed = 921600
monitor_speed = 115200
monitor_raw = true

The output when I try to buid is:

Processing main (platform: espressif32@6.3.2; board: esp32dev; framework: espidf)
------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (6.3.2) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) 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-espidf @ 3.50100.0 (5.1.0)
 - 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
 - toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
 - toolchain-xtensa-esp32 @ 11.2.0+2022r1
Reading CMake configuration...
-- Building ESP-IDF components for target esp32
-- Project sdkconfig file C:/git/firmware/sdkconfig.main
-- Configuring incomplete, errors occurred!
See also "C:/git/firmware/.pio/build/main/CMakeFiles/CMakeOutput.log".     

fatal: not a git repository (or any of the parent directories): .git
C:\Users\EFeru\.platformio\penv\.espidf-5.1.0\Scripts\python.exe: No module named kconfgen

CMake Error at C:/Users/EFeru/.platformio/packages/framework-espidf/tools/cmake/kconfig.cmake:176 (message):
  Failed to run kconfgen
  (C:/Users/EFeru/.platformio/penv/.espidf-5.1.0/Scripts/python.exe;-m;kconfgen;--list-separator=semicolon;--kconfig;C:/Users/EFeru/.platformio/packages/framework-espidf/Kconfig;--sdkconfig-rename;C:/Users/EFeru/.platformio/packages/framework-espidf/sdkconfig.rename;--config;C:/git/firmware/sdkconfig.main;--env-file;C:/git/firmware/.pio/build/main/config.env).
  Error 1
Call Stack (most recent call first):
  C:/Users/EFeru/.platformio/packages/framework-espidf/tools/cmake/build.cmake:611 (__kconfig_generate_config)
  C:/Users/EFeru/.platformio/packages/framework-espidf/tools/cmake/project.cmake:464 (idf_build_process)   
  CMakeLists.txt:3 (project)

I think this is what kills it, there’s a mismatch between what python packets the @6.3.2 platform installs and what python pacakges ESP-IDF 5.1.0 needs.

Currently, the references package vesion for the bleeding edge is 5.1.0.

So I’d recomment to just

  1. Delete C:\Users\EFeru\.platformio\penv\.espidf-5.1.0\
  2. Use the platformio.ini
[platformio]
default_envs = main

[env]
platform = https://github.com/platformio/platform-espressif32.git#f1fdbc5838f6271379c89dd97242fb0614fdfdde
board = esp32dev
framework = espidf
upload_speed = 921600
monitor_speed = 115200
monitor_raw = true

Bingo! Works. Using platform = https://github.com/platformio/platform-espressif32.git builds without issues.

Any reason why default platform = espressif32 gives issues and if it is planned to be fixed sometime soon?
Good to hear from you Max.

Well there isn’t really a problem, by using a specific platform version that’s meant to go with a specific (maximum( ESP-IDF version and using platform_packages to use a higher ESP-IDF version you’ve created a disconnect between the builder code and what package version it was meant to. The next stable package

The next stable platform version after 6.3.2 should have ESP-IDF 5.1.0 normally and you can reference that.

1 Like