Fix build on Arduino ESP32 v3.0.0 and IDF 5.1.1#1351
Fix build on Arduino ESP32 v3.0.0 and IDF 5.1.1#1351blackhack wants to merge 1 commit intome-no-dev:masterfrom
Conversation
|
@blackhack Any way we can use a compiler flag to detect old ESP32 arduino core? I think we should look into making it backwards-compatible. |
|
Just as a drive-by review that will hopefully help get this PR unstuck, consider bracketing the new changes (probably really only the changed mbedtls symbol names) inside #if ESP_ARDUINO_VERSION_MAJOR > 2 or something like that. If you want to minimize the changes in the .cpp files and torment the souls of developers for generations to come, you could do something really gross like #if ESP_ARDUINO_VERSION_MAJOR > 2 That's pretty gross, but it would at least minimize the footprint of the conditionals. I think the basic recipe is just to include esp_arduino_version.h and test ESP_ARDUINO_VERSION_MAJOR and close friends. I don't have any (qualified) opinion on whether that test is >2 or >= 3 or ESP_ARDUINO_VERSION for the whole number or something else. There are options: See approximately this, but skim the whole file for ideas to harvest: Thanks and good luck! |
This fixes compilation on the latest Git version of the Arduino ESP32 core due to API changes in IDF 5.1.
Of course, these changes make ESPAsyncWebServer incompatible with prior Arduino core versions.