Using github version of arduino-espressif32?

The version of arduino-espressif32 that comes with the platformio packet manager is unfortunately out of date for a very specific functionality (ledc-fade). So i want to use the newest github version of the library.
How do i do so? I am on a mac and I cloned the repo, but putting
framework = framework-arduinoaespressif32@/home/julian/Code/arduino-esp32
in my platformio.ini gives me
Error: This board doesn’t support framework-arduinoaespressif32@/home/julian/Code/arduino-esp32 framework!

I’m using an ESP32-S2 and my board in the ini is set to board = esp32-s2-saola-1, so it also might be tha tthe config problem lies there?

framework can only be the principal value of the name of the framework, i.e,. arduino. It’s invalid to pass a package name and a path there. That’s what platform_packages would be for.

However, this still wouldn’t work: The standard platform code (espressif32) and the current state of the Arduino-ESP32 builder script is so wrong (referencing inexisting PlatformIO registry packages etc.), that a platform_packages link to #master would not work. Espressif seems to have screwed that one up.

The solution is to use a third-party platform that correctly integrates the Alpha 3.0.0 release of Arduino-ESP32 into PlatformIO. This was discussed in https://github.com/platformio/platform-espressif32/issues/1211. The solution is to simply change the platform value to that fork.

[env:esp32-s2-saola-1]
platform = https://github.com/Jason2866/platform-espressif32.git#Arduino/IDF5
board = esp32-s2-saola-1
framework = arduino

thank you. I am still confused, however. The repo you linked seems to be something else than i want? At least the compiler can’t find any of the ledc functions now, which come out of https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-ledc.c ?
I must be fundamentally not understanding something right, but i don’t know what it is

The platform-espressif32 is the PlatformIO platform. It does not contain the framework’s source code. But it references the packages that do.

my bad. the functions are there, the whole way how ledc is done has changed.
So has the way, esp-now is handled. god, what a mess :wink:

If upgrading to an Alpha version is too unstable and unmaintainable, I’m sure you can do with classical ledcWrite() calls on every loop() call with some time variable map()-ed to the right color / PWM value. (example)

Changes are to expect when major release version number increases :wink:
I update my repo on every relevant change in Arduino or IDF code.
The breaking changes are documented → Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation

Please keep in mind my fork is not fully compatible to the official one.
Removed some stuff we don’t use in project Tasmota. The most relevant is the remove of the old outdated SPIFFS lib.

1 Like

as long as ledc and esp-now work i should be ok with my project :slight_smile:

I tried the link, however BLE does not work at all. I am not very familiar with this things, however it is listed there:

  • remove all BT BLE libraries ,
    Does to mean we cannot use this lib for developing BLE?

That’s correct! You cannot use the Tasmota platform for BLE development.

Tasmota is a modified Arduino core that omits some things to save space.
The reference to Tasmota is from February.

In the meantime pioarduino/platform-espressif32 has been released. This is a community fork of the Espressif32 platform for PlatformIO which always provides the latest Espressif Arduino version (currently 3.0.7 and 3.1.0-rc2) - without any changes or omissions to the Arduino Core.

Give it a try!

1 Like

Thanks @sivar2311 , it is working.
As I work with an ESP32-S3_zero board which is clone of adafruit_feather_esp32s3, I had to find partitions-4MB-tinyuf2.csv file and copy it to main project folder. then the project compile successfully. However the same code (Arduino example of BLE scanner) on S3 DevKitC board finds all BLE devices around, but this tiny board find only 1 sometimes 2.
back to plarformio, this reference :
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip
created a folder: … .platformio\packages\framework-arduinoespressif32-libs, and I am wondering, if I can refer somehow to this folder, or I have to add the same reference to the zip file in platofrmio.ini to work wit this package?

I think it’s a quality issue with your clone.

Simply put platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.07/platform-espressif32.zip into your platformio.ini to use the pioarduino-espressif32 platform. Other projects with the same platform setting will reuse the installed platform folders.

1 Like