Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build on Arduino ESP32 v3.0.0 and IDF 5.1.1 #1351

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blackhack
Copy link
Contributor

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.

@ayushsharma82
Copy link

@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.

@robertlipe
Copy link

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
#defien mbedtls_sha1_starts_ret mbedtls_sha1_starts
... others continue.

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:

https://github.com/espressif/arduino-esp32/blob/0a47f34b34a64986417de3b38622b607a001a489/cores/esp32/esp_arduino_version.h#L21-L26

Thanks and good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants