PlatformIO Community

Using current ESP-IDF / Arduino-ESP32

I’ve looked around and haven’t found instructions on how to update the version of the ESP-IDF used by PIO, although there are plenty of indications that it does indeed support the current 4.x branch. My VS-Code/PIO installation is up to date (Core 4.3.1, Home 3.1.1, PIO expressif32 1.12), and yet it seems to be including ESP-IDF 3.2.3.

Can someone point me towards some documentation on how to change that?

Make sure to update your platforms (pio platform update or via VSCode GUI) so that you have platform version 1.12.0 (

Yes, as I noted above, PIO expressif32 is at 1.12

Then it’s impossible. Can you show the first like 20 lines of output when you run the “Build” task? It should tell you that framework-espidf is at version 3.40000.*.

If your project is using the ESP-IDF + Arduino as a component configuration, make sure to follow the official example ( which sets the to-be-used branch of Arduino-ESP32 to the v4.x branch.

This is what I see if I run the PLATFORMIO UPDATE command:

platformio update
Updating contrib-piohome                 @ 3.1.1          [Up-to-date]
Updating contrib-pysite                  @ 2.37.191017    [Up-to-date]
Updating tool-unity                      @ 1.20500.200322 [Up-to-date]
Updating tool-scons                      @ 3.30102.0      [Up-to-date]
Updating tool-cppcheck                   @ 1.189.0        [Up-to-date]

Platform Manager
Platform Espressif 32
Updating espressif32                     @ 1.12.0         [Up-to-date]
Updating toolchain-xtensa32              @ 2.50200.80     [Up-to-date]
Updating toolchain-esp32ulp              @ 1.22851.190618 [Up-to-date]
Updating framework-arduinoespressif32    @ 3.10004.200129 [Up-to-date]
Updating framework-espidf                @ 3.40000.200303 [Up-to-date]
Updating tool-esptoolpy                  @ 1.20600.0      [Up-to-date]
Updating tool-openocd-esp32              @ 1.1000.20190708[Up-to-date]
Updating tool-mkspiffs                   @ 2.230.0        [Up-to-date]
Updating tool-cmake                      @ 3.16.4         [Up-to-date]
Updating tool-ninja                      @ 1.9.0          [Up-to-date]
Updating tool-mconf                      @ 1.4060000.20190628[Up-to-date]
Updating tool-idf                        @ 1.0.1          [Up-to-date]
Uninstalling toolchain-xtensa32 @ 2.80200.200226:       [OK]

And this is the beginning of a project build:

Processing esp32 (platform: espressif32; board: fujinet_board; framework: arduino)

Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 1.12.0 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: 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)
 - framework-arduinoespressif32 3.10004.200129 (1.0.4)
 - tool-esptoolpy 1.20600.0 (2.6.0)
 - toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ deep+, Compatibility ~ soft

I thought maybe the ESP-IDF version would be different if a started a fresh non-Arduino project. So I started a new project in the PIO GUI, copy-and-pasted the C source for the “getting started” example in the ESP-IDF project, and added the line:

printf("Version: %s\n", esp_get_idf_version());

The output that results is:


And the same string shows up during the boot of the device:

 (171) boot: Loaded app from partition at offset 0x10000
I (171) boot: Disabling RNG early entropy source...
I (171) cpu_start: Pro cpu up.
I (174) cpu_start: Application information:
I (177) cpu_start: Project name:     test23
I (181) cpu_start: App version:      1
I (185) cpu_start: Compile time:     Apr 20 2020 00:51:52
I (190) cpu_start: ELF file SHA256:  ce206e9d1d8ff9ac...
I (195) cpu_start: ESP-IDF:          HEAD-HASH-NOTFOUND
I (200) cpu_start: Starting app cpu, entry point is 0x40080fd8
I (0) cpu_start: App cpu up.

Do you know why it isn’t reporting a version number? I haven’t been getting any useful hits in Google searches.


Hello oscarfowler,

I am experiencing the same thing when I attempted to build my project with the latest IDF.

Did you ever resolve this issue?

Thanks in advance!

No, I haven’t resolved it. I think the problem is that the Git commit information that is used to populate that information in Espressif’s standard ESP-IDF isn’t available when the PlatformIO version is created. I don’t know how to fix it, or if it’s possible.

Thanks for the quick update!

It is very frustrating when you cannot get support for this package, and no one feels compelled to respond to users with an explanation for the issues they discover. It would be nice if a representative were able to at least confirm the issue has been noted and provide a glimmer of hope that it may be fixed in a future release.


I have decided to simply report the ESP-IDF version in my code using the ESP_IDF_VERSION_MAJOR, ESP_IDF_VERSION_MINOR and ESP_IDF_VERSION_PATCH definitions. This at least reliably informs the user about the IDF version used in building the application image, although it does not tell the whole story.

For instance, the PlatformIO ESP framework v1.12.0 added support for ESP-IDF v4.0. The framework v1.12.1 also supports ESP-IDF v4.0, but with improvements to the integration.

Just curious… do you know of a way to retrieve the version of the ESP-IDF framework that was used in a build?