Issues with Specifying a Particular Version of ESP-IDF in PlatformIO

I am encountering an issue while developing with PlatformIO for the ESP32-S3-BOX-Lite. According to the official ESP-IDF requirements, I need to use version 5.1 of ESP-IDF to compile my project. However, despite my attempts to configure the platformio.ini file using various methods, including seeking assistance from GPT, when I click the PlatformIO build button, it still uses version 5.2.1 of ESP-IDF.

I have tried the following methods to specify the ESP-IDF version:

  1. Adding espidf_version = 5.1 to the platformio.ini file.
  2. Setting the ESP-IDF version in PlatformIO’s global configuration.
  3. Setting the ESP-IDF version in PlatformIO’s project configuration.

None of these methods have been successful. I hope someone can help me resolve this issue and guide me on how to correctly specify the ESP-IDF version in PlatformIO.

Here are my hardware and software environments:

  • Hardware: ESP32-S3-BOX-Lite
  • Software: Win11, VSCode, PlatformIO 6.1.16 version
  • ESP-IDF version: 5.1 (required), 5.2.1 (currently in use)

Attached is an image showing the configuration of my platformio.ini file for specifying the ESP-IDF version:

[env:esp32s3box(lite try)]
platform = espressif32
board = esp32s3box
framework = espidf(#version try)
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
xxx_version= (try)
lib_dep= (try)
(try) means I’ve already tries .please.

box-lite has brushed 0.5.0 bin file

You have to specify the version in the platform setting like so

platform = espressif32 @ 6.5.0

which will give you ESP-IDF 5.1.2 (see table below)

You’ll find the corresponding ESP-IDF versions in the release informations.
See Releases · platformio/platform-espressif32 · GitHub

Here is an overview for you:

platform
version
ESP-IDF
version
6.9.0 5.3.1
6.8.1 5.3.0
6.8.0 5.3.0
6.7.0 5.2.1
6.6.0 5.2.1
6.5.0 5.1.2
6.4.0 5.1.1
6.3.2 5.0.2
6.3.1 5.0.2
6.3.0 5.0.2
6.2.0 5.0.1
6.1.0 5.0.1
6.0.0 5.0.0
1 Like

Thank you so much. I just tried it, and it worked. Thanks again.

1 Like