PlatformIO Community

How to update ESP IDF version on arduino framework

I want to use latest ESP IDF version , greater than 4.0. I don’t know how to do this.
I use Espressif 32 version is 3.3.2.
my plateformio.ini is:
[env:esp32dev]
platform = espressif32@3.3.2
board = esp32dev
framework = arduino
And i upload the code:
void setup() {

Serial.begin(115200);
Serial.println("Setup");

Serial.printf("esp idf version:%s \n\r",esp_get_idf_version());

}
the result is:
Setup
esp idf version:v3.3.5-1-g85c43024c

So I want to update the idf version, I don’t found correct solution.

The current default version in PlatformIO is ESP-IDF 4.3. So all you need to do is drop the version number when you specify the framework:

platform = espressif32

ok, this is full build log:

Executing task: C:\Users\liangkongde.platformio\penv\Scripts\platformio.exe run <

Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (3.3.2) > Espressif ESP32 Dev Module
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)
PACKAGES:

  • framework-arduinoespressif32 3.10006.210326 (1.0.6)
  • tool-esptoolpy 1.30100.210531 (3.1.0)
  • toolchain-xtensa32 2.50200.97 (5.2.0)
    LDF: Library Dependency Finder → http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 30 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    Compiling .pio\build\esp32dev\src\main.cpp.o
    Generating partitions .pio\build\esp32dev\partitions.bin
    Archiving .pio\build\esp32dev\libFrameworkArduinoVariant.a
    Indexing .pio\build\esp32dev\libFrameworkArduinoVariant.a
    Compiling .pio\build\esp32dev\FrameworkArduino\Esp.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\FunctionalInterrupt.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\HardwareSerial.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\IPAddress.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\IPv6Address.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\MD5Builder.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\Print.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\Stream.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\StreamString.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\WMath.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\WString.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\base64.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\cbuf.cpp.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-adc.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-bt.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-cpu.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-dac.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-gpio.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-i2c.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-ledc.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-log.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-matrix.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-misc.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-psram.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-rmt.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-sigmadelta.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-spi.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-time.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-timer.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-touch.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\esp32-hal-uart.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\libb64\cdecode.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\libb64\cencode.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\main.cpp.o
    C:\Users\liangkongde.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c: In function ‘spiTransferBytesNL’:C:\Users\liangkongde.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:922:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    uint8_t * last_out8 = &result[c_longs-1];
    ^
    C:\Users\liangkongde.platformio\packages\framework-arduinoespressif32\cores\esp32\esp32-hal-spi.c:923:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    uint8_t * last_data8 = &last_data;
    ^
    Compiling .pio\build\esp32dev\FrameworkArduino\stdlib_noniso.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\wiring_pulse.c.o
    Compiling .pio\build\esp32dev\FrameworkArduino\wiring_shift.c.o
    Archiving .pio\build\esp32dev\libFrameworkArduino.a
    Indexing .pio\build\esp32dev\libFrameworkArduino.a
    Linking .pio\build\esp32dev\firmware.elf
    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: [ ] 4.1% (used 13480 bytes from 327680 bytes)
    Flash: [== ] 15.9% (used 208818 bytes from 1310720 bytes)
    Building .pio\build\esp32dev\firmware.bin
    esptool.py v3.1
    Merged 1 ELF section
    =================================================== [SUCCESS] Took 11.46 seconds ===================================================

Can you show the full build log?

Sorry, I’ve just seen that I have mixed up two things. You are using the Arduino framework (on top of ESP-IDF).

The ESP32 Arduino framework integrated into PlatformIO is the version that is built on top of ESP-IDF 3.3.

One or two days ago, a new major release of the ESP32 Arduino framework has been released, which is built on top of ESP-IDF 4.4. It will take some days until this version will be available in PlatformIO.

It is not possible to change the ESP-IDF version independent of the ESP32 Arduino framework.

1 Like

Thank you very much, I decision change my solution, add ardunio become a component . And I can use ESP-IDF 4.0 version and ardunio together.

I close it, thank you very much.