Skip to content

Add LibreTiny support #63

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

Merged

Conversation

kuba2k2
Copy link

@kuba2k2 kuba2k2 commented May 28, 2025

This PR adds support for LibreTiny to AsyncTCP.
Aside from several new #ifdef LIBRETINY conditionals, it was required to add support for non-IPv6 lwIP.
Context: ESP32Async/ESPAsyncWebServer#187

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for LibreTiny to AsyncTCP by adding LIBRETINY-specific conditionals and handling for non-IPv6 lwIP configurations.

  • Introduces LIBRETINY definitions and include adjustments in both header and source files.
  • Conditions network initialization and address assignment logic based on lwIP IPv4/IPv6 availability.
  • Modifies AsyncServer constructors to correctly handle IP address types under various configurations.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/AsyncTCP.h Added LIBRETINY conditional definitions and FreeRTOS include macros
src/AsyncTCP.cpp Wrapped logging, IP address initialization, and server begin logic with LIBRETINY and lwIP conditionals
Comments suppressed due to low confidence (1)

src/AsyncTCP.cpp:871

  • [nitpick] Consider clarifying the differences between using 'addr.u_addr.ip4.addr' and 'addr.addr' in the IP assignment branches, as this could be confusing when maintaining the code across different lwIP configurations.
addr.u_addr.ip4.addr = ip;

@mathieucarbou
Copy link
Member

mathieucarbou commented May 28, 2025

Could you please also update the CI to add entries for Libretiny ?

@kuba2k2
Copy link
Author

kuba2k2 commented May 28, 2025

Could you please also update the CI to add entries for Libretiny ?

CI added and passing. For some reason, IDF checks are failing, but that also applies to previous PRs and commits; the errors are unrelated to the scope of this PR.

@mathieucarbou
Copy link
Member

Thanks! I will check to see if other team members want or have time to look at the PR before merging and releasing.

@kuba2k2 kuba2k2 marked this pull request as draft May 28, 2025 12:43
@kuba2k2
Copy link
Author

kuba2k2 commented May 28, 2025

Ah, that should be better... The Copilot didn't detect such a silly mistake 😄

With this change, it is fully functional on real hardware.

@kuba2k2 kuba2k2 marked this pull request as ready for review May 28, 2025 13:30
@mathieucarbou mathieucarbou merged commit cf97c13 into ESP32Async:main Jun 1, 2025
21 of 27 checks passed
@mathieucarbou
Copy link
Member

@kuba2k2 : FYI: #64
I am disabling libretiny support for board generic-rtl8710bn-2mb-788k for now.
It does not compile anymore.

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

Successfully merging this pull request may close these issues.

2 participants