These options are handled by arduino-pico internally on RP2040.
Use cv.only_on([Platform.ESP32]) in the schema validators instead
of rejecting them in _validate().
- Clean up eth_ on begin() failure to prevent leak and stale pointer
- Add LwIPLock around dns_getserver() in get_dns_address()
- Add LwIPLock around dns_setserver() in start_connect_()
- Add LwIPLock around dns_getserver() in dump_connect_params_()
- Reject clock_speed and polling_interval config options on RP2040
Restore the comment explaining why s_socket_woke must not be cleared
between the early-return check and the __wfe() loop, and restore the
s_socket_woke = false after the loop to consume the wake for the next
call. Both were lost during conflict resolution.
These features from upstream/dev were dropped when resolving conflicts
with the PR's remote branch: read_locked_/wait_for_data_ (blocking read
with SO_RCVTIMEO timeout support), recv_timeout_cs_ field, SO_RCVTIMEO
and SO_SNDTIMEO setsockopt/getsockopt handling, and the setblocking()
implementation that accepts blocking mode for SO_RCVTIMEO.
Extract sockaddr_to_lwip() from LWIPRawUDPImpl static method to a
shared file-level function. Refactor LWIPRawCommon::bind() to use it
instead of inline address parsing, removing ~35 lines of duplicated
sockaddr-to-ip_addr_t conversion code.
On RP2040, lwip callbacks run from a low-priority IRQ context and can
preempt main-loop code. All lwip API calls from the main loop must
hold the async_context lock (LWIP_LOCK) to prevent races on shared
lwip state (PCB lists, pbuf pools, IGMP groups).
The TCP implementation was already correct; the UDP methods were
missing the lock.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add CONFIG_ETH_SPI_ETHERNET_W5500, CONFIG_ETH_SPI_ETHERNET_DM9051,
CONFIG_ETH_USE_ESP32_EMAC to defines.h for clang-tidy visibility
- Fix %lu format to PRIu32 for polling_interval_
Add W5500 SPI Ethernet support for RP2040 boards using arduino-pico's
Wiznet5500lwIP class. Tested on WIZnet W5500-EVB-Pico hardware.
- Add ethernet_component_rp2040.cpp with W5500 implementation
- Add RP2040 members and setters to ethernet_component.h
- Enable RP2040 platform in SPI_SCHEMA and FILTER_SOURCE_FILES
- Add RP2040 validation, code generation, and lwIP_w5500 library
- Add W5500 RP2040 test YAML
Restructure the ethernet component from ESP32-only to multi-platform,
following the same pattern as the wifi component (FILTER_SOURCE_FILES
with platform-specific .cpp files).
- Split ethernet_component.cpp into common code + ethernet_component_esp32.cpp
- Remove DEPENDENCIES = ["esp32"], add platform validators per type
- Add FILTER_SOURCE_FILES to select platform-specific .cpp
- Move ESP32 imports inside platform-conditional functions
- Update ethernet_info guards from USE_ESP32 to USE_ETHERNET
- Add USE_ETHERNET_SPI/OPENETH/SPI_POLLING_SUPPORT to defines.h
- Guard ethernet_helpers.c with USE_ESP32
No behavioral changes for ESP32 — this is a pure restructuring to
enable adding non-ESP32 platform support.
Restructure the ethernet component from ESP32-only to multi-platform,
following the same pattern as the wifi component (FILTER_SOURCE_FILES
with platform-specific .cpp files).
- Split ethernet_component.cpp into common code + ethernet_component_esp32.cpp
- Remove DEPENDENCIES = ["esp32"], add platform validators per type
- Add FILTER_SOURCE_FILES to select platform-specific .cpp
- Move ESP32 imports inside platform-conditional functions
- Update ethernet_info guards from USE_ESP32 to USE_ETHERNET
- Add USE_ETHERNET_SPI/OPENETH/SPI_POLLING_SUPPORT to defines.h
- Guard ethernet_helpers.c with USE_ESP32
No behavioral changes for ESP32 — this is a pure restructuring to
enable adding non-ESP32 platform support.
Restructure the ethernet component from ESP32-only to multi-platform,
following the same pattern as the wifi component (FILTER_SOURCE_FILES
with platform-specific .cpp files).
- Split ethernet_component.cpp into common code + ethernet_component_esp32.cpp
- Remove DEPENDENCIES = ["esp32"], add platform validators per type
- Add FILTER_SOURCE_FILES to select platform-specific .cpp
- Move ESP32 imports inside platform-conditional functions
- Update ethernet_info guards from USE_ESP32 to USE_ETHERNET
- Add USE_ETHERNET_SPI/OPENETH/SPI_POLLING_SUPPORT to defines.h
- Guard ethernet_helpers.c with USE_ESP32
No behavioral changes for ESP32 — this is a pure restructuring to
enable adding non-ESP32 platform support.
Move FreeRTOS Mutex methods inline into helpers.h, eliminating
duplicate out-of-line definitions in esp32/helpers.cpp and
libretiny/helpers.cpp.
Hot path impact (disassembled from ELF):
| Platform | Before | After | Saved |
|--------------------|----------|----------|---------|
| ESP32 (Xtensa) | 1304 B | 1270 B | -34 B |
| BK72xx (ARM M4) | 1400 B | 1396 B | -4 B |
| RTL87xx (ARM M33) | 1248 B | 1246 B | -2 B |
| ESP32-C3 (RISC-V) | 1498 B | 1494 B | -4 B |
GCC generates ISRA clones that hoist the handle_ load into callers
and use tail calls to xQueueSemaphoreTake/xQueueGenericSend.