ESP32 core version 3.x.x has some “breaking changes”

Last week Espressif announced the release of version 3.0.0 of the ESP32 core.

The new core version has a different URL, so won’t appear as an upgrade option in the Arduino IDE’s Board Manager unless you change the URL used in the “Additional Board Manager URLs” section.

But, before you rush out and do this, you should carry-on reading…

The Espressif announcement says:

The new Arduino ESP32 core is still under development, however, you can test the development version.

Since this is a development version, you might encounter some issues. You can report them to Arduino ESP32 GitHub issue tracker.

The expected stable release of the latest version is December 2023 and the 2.0.x will be under support maintenance until July 2024 then will be discontinued.

You can read the full announcement here:
https://blog.espressif.com/announcing-the-arduino-esp32-core-version-3-0-0-3bf9f24e20d4

Before you think about updating to version 3.x.x of the ESP32 core, you should study this Migration Guide:

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

I’ve had a quick look through it, and one of the things that jumped out at me is the changes to the LEDC functionality.

LEDC is used as an alternative to the analogWrite() command that’s available for the ESP8266, and is used to vary the brightness of physical LEDs.
The ESP32 3.x.x core deletes the ledcSetup and ledcAttachPin commands and replaces them with a new combined command, as well as adding new LEDC functionality.

This is important because the Blynk Edgent_ESP32 example uses the ledcSetup and ledcAttachPin commands in the indicator.h file, so attempting to compile the current Edgent_ESP32 example will result in compilation errors if you’re using the 3.x.x version of the core.

This is obviously something for @vshymanskyy to take a look at, but I’m guessing that many Blynk users also use the LEDC functionality in their own projects.
I’m guessing that libraries like FastLED will also be affected by this change, and will require an update to enable them to work under version 3.x.x of the core.

There are also quite a few other “breaking changes” (changes that will break your existing code) highlighted in the migration guide linked above. So, if you’re an ESP32 “power user” you need to read the migration guide and assess the impact on your existing projects.

Personally, I won’t be upgrading to the new core until it’s at least at “stable release” status, but as support for version 2.x.x will end in mid 2024, I’ll need to make the move fairly soon.

Pete.

4 Likes

Yes, we’re aware of it and preparing the relevant updates on our end.

2 Likes

So I am a new uses since last week using ESP32, and have been so happy to be able to compile and execute code, build dashboards and succesfully do OTA updates on a LOLINESP32, however…
Since this is a custom board, if I define BOARD_LED_PIN in settings.h, I get this error.
Indicator.h:116:4: error: ‘ledcSetup’ was not declared in this scope
116 | ledcSetup(BOARD_LEDC_CHANNEL_1, BOARD_LEDC_BASE_FREQ, BOARD_LEDC_TIMER_BITS);

it seems in Indicator.h, that this calls the ledcSetup

#elif defined(BOARD_LED_PIN) // Single color LED
void initLED() {
ledcSetup(BOARD_LEDC_CHANNEL_1, BOARD_LEDC_BASE_FREQ, BOARD_LEDC_TIMER_BITS);
ledcAttachPin(BOARD_LED_PIN, BOARD_LEDC_CHANNEL_1);
}

If I do not define any LED pin config, i can compile and proceed, although this is not strictly correct.

Is this related to this issue?
Thanks for a great product.

Yep, you are right!,

If I remove the 3.0.0 ESP32 board library, I no longer get theledcSetup errors with LED pins defined.

THANKS