Use different version of Arduino framework on espressif platform

We are using ESP32 boards with espressif platform and Arduino framework
The arduino framework is maintained in GitHub - espressif/arduino-esp32: Arduino core for the ESP32 and we would like to use a specific branch from this repo to test certain upcoming improvements.

Is it possible to do this?

If this branch is after 1.0.6 (e.g. some 2.0.0 beta or 2.0.0), which I read when you say “upcoming improvements”, you can’t use it properly with PlatformIO yet because integration is missing. You can certainly attempt to use it per this (framework-arduinoespressif32) and ESP32-Arduino - platformio support for 2.0.0 version - #2 by maxgerhardt but it will likely not fully work.

Can’t we use this?

platform_packages =
    platformio/framework-arduinoespressif32 @

Since this wire-ng branch does not exist in Branches · espressif/arduino-esp32 · GitHub I cannot confirm this. You might be needing an updated compiler and esptoolpy package, too.

My bad, the branch is called feature/wire_ng

No, not by itself. That branch is 6 commits ahead of master which is after 2.0.0, and thus falls in the “2.0.0 core is not yet supported by PlatformIO, this will likely not work” category per above. Also, by only redirecting the Arduino core package, you are still using the old compiler and old esptoolpy, which will give you an error during compilation.

What works for me is the following:

platform = espressif32
board = esp32dev
framework = arduino
platform_packages =
   toolchain-xtensa32 @ file://C:\Users\Max\Downloads\xtensa-esp32-elf-gcc8_4_0-esp-2021r1-win32\xtensa-esp32-elf
   platformio/tool-esptoolpy @ ~1.30100
monitor_speed = 115200

whereas the path C:\Users\Max\Downloads\xtensa-esp32-elf-gcc8_4_0-esp-2021r1-win32\xtensa-esp32-elf must be changed to a folder created this way:

  "name": "toolchain-xtensa32",
  "version": "2.80400.210114",
  "description": "GCC Toolchain for Xtensa32 processor",
  "keywords": [
    "build tools",
  "license": "GPL-2.0-or-later",
  "repository": {
    "type": "git",
    "url": ""
  "system": [
  • If not using Windows, replace windows_amd64 with other identifiers, e.g., linux_x86_64 (Linux) or darwin_x86_64 (Mac)
  • Adapt the file:// path in the platformio.ini to where your xtensa-esp32-elf folder is
  • Compile and upload.

When I do this with the minimal code

#include <Arduino.h>

void setup() { Serial.begin(115200); }
void loop() { Serial.println("Test"); delay(1000); }

I get output on my ESP32 board.

Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   3.6% (used 11872 bytes from 327680 bytes)
Flash: [==        ]  17.9% (used 234061 bytes from 1310720 bytes)
Configuring upload protocol...
============================================================================= [SUCCESS] Took 16.30 seconds =============================================================================
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at
--- Miniterm on COM4  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

configsip: 0, SPIWP:0xee
mode:DIO, clock div:2
ho 0 tail 12 room 4
ho 0 tail 12 room 4
entry 0x400805ec

Sadly one can not use toolchain-xtensa32 @ ~2.80400.0 here to get the right compiler version because that seems to be one version behind (not gcc8_4_0-esp-2021r1).

No guarantes that this works fully and exactly the same as in the Arduino IDE though – as said, PlatformIO’s integration with 2.0.0+ cores is still pending.

1 Like

Thank you very much for your extensive answer!

The new toolchains are in the Platformio Registry no need for using homebrew ones.
The setup is

platform =
platform_packages = framework-arduinoespressif32 @
platformio/tool-esptoolpy @ ~1.30100
1 Like