Error: This board doesn't support espidf @ 4.4.6 framework!

I’m trying to use FastAccelStepper under esp-idf framework. It needs the arduino component (which isn’t available for 5.x) so I’m trying to get my project to use esp-idf v4.4.6. It isn’t going well.

[env:esp32-s3-devkitc-1]
platform = espressif32
board = esp32-s3-devkitc-1
framework = espidf @ 4.4.6

Should select 4.4.6, I think.

But it yields:

Resolving esp32-s3-devkitc-1 dependencies...
Already up-to-date.
Updating metadata for the vscode IDE...
UserSideException: Processing esp32-s3-devkitc-1 (platform: espressif32; board: esp32-s3-devkitc-1; framework: espidf @ 4.4.6)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (6.4.0) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) 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:
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
Error: This board doesn't support espidf @ 4.4.6 framework!
========================== [FAILED] Took 0.33 seconds==========================

I know ESP32-S3 board were supported under 4.4.6. but I can’t find a single board ID that is recognized and Platformio thinks is supported.

Can anyone provide a list of board IDs that are compatible with PlatformIO?

Well, I think:

[env:heltec_wifi_kit_32_V3]
platform = espressif32
board = heltec_wifi_kit_32_V3
framework = espidf
platform_packages =
	platformio/framework-espidf @ ~3.40404.0

Is the correct syntax for selecting an espidf version. It still doesn’t work…

CMake Error at C:/Users/jeffw/.platformio/packages/framework-espidf@3.40405.230623/tools/cmake/crosstool_version_check.cmake:37 (message):


  Toolchain:
  C:/Users/jeffw/.platformio/packages/toolchain-xtensa-esp32s3/bin/xtensa-esp32s3-elf-gcc.exe,
  crosstool-ng version esp-12.2.0_20230208 doesn't match supported version
  esp-2021r2-patch5

  Please try to run 'idf.py fullclean' to solve it quickly.

  Check Getting Started documentation if the error continues.

  You can override this error and proceed with build by defining the  IDF_MAINTAINER environment variable.

Call Stack (most recent call first):
 C:/Users/jeffw/.platformio/packages/frameworkespidf@3.40405.230623/components/esp_common/project_include.cmake:7 (crosstool_version_check)
  C:/Users/jeffw/.platformio/packages/framework-espidf@3.40405.230623/tools/cmake/build.cmake:334 (include)
  C:/Users/jeffw/.platformio/packages/framework-espidf@3.40405.230623/tools/cmake/build.cmake:543 (__build_process_project_includes)
  C:/Users/jeffw/.platformio/packages/framework-espidf@3.40405.230623/tools/cmake/project.cmake:393 (idf_build_process)
  CMakeLists.txt:3 (project)

Why is this so hard?

This is not a valid way of specifying the framework. framework can only be the name of the framework, which in turn will map to a PlatformIO package that contains the framework files (in this case, framework-espidf). You can control the version of that package as documented, with the versions that are available, or that you custom-supply.

When downgrading the ESP-IDF version from 5.x to 4.x, you also have to downgrade the compiler version with it. See e.g.