PlatformIO Community

Latest (Arduino v2.0.1) ESP32 Arduino and IDF Build

Since the latest arduino-esp32 has been release to 2.x should the latest version work to build with framework = arduino, espif? When I look in the examples, they require

platform_packages =
  ; use a special branch
  framework-arduinoespressif32 @

The examples build ok, but they are based upon appx 3 year old branch that doesn’t contain latest arduino-esp32 updates. Whenever I try it with the latest branch, I get fatal error: Arduino.h: No such file or directory. Should the latest arduino-esp32 branch work now without having to use this “special branch”? How can I get this working with a modern release of arduino-esp32 and ESP-IDF?

@valeros, please help.

Hi @bwjohns4 ! Unfortunately, it’s not possible to use mixed Arduino + IDF projects with the latest 2.x release. Mainly because Arduino depends on a specific version of IDF v4.4 which we don’t support yet.

@valeros , What is the latest espressif32 version and platform_package that I can use to do a arduino/IDF build? The one in the arduino/espidf examples uses a 3 year old arduino-esp32 version with missing and outdated libraries.

The one in the arduino/espidf examples uses a 3 year old arduino-esp32 version with missing and outdated libraries.

Sorry to disappoint you, but it’s the last known combination of IDF/Arduino that worked with the Arduino v1.x. The Arduino v2.x started using IDF v4.4 from development branch even though it wasn’t released at that moment, so we simply couldn’t refactor support for mixed IDF/Arduino projects.

@valeros , Is it anticipated that this will be supported in the near future? Or would this support be a long time away?

TBH, I don’t have any ETA for you. The Arduino/IDF combination is used by a very very small number of users, so it’s definitely not in our priority list at the moment.

@valeros: Understand that its not a priority if only few person use it. What I dont understand is, in order to use arduino libraries and do edits to the sdkconfig (e.g. via menuconfig) to change basic features of an esp32 this feature is needed. Why do only few people have this problem? Or are they solving it differently?

This makes the LOLIN S2 mini (ESP32-S2) really frustrating to use.

Versions of the espressif32 platform before 5.0.0 don’t support it at all and framework = espidf, arduino doesn’t build because the two parts have incompatible USB support.

Without a custom sdkconfig I can’t enable CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE.

Instead of having releases with fixed configurations it would be better if the SDK was always rebuilt as part of the project so that these settings could be changed.

@valeros Is there a difference between doing framework = espidf, arduino OR just building espidf with Arduino as an IDF component? Are both approaches the same? If not, what’s the difference?