In testing mode, set filesystem_size to 0m so the full 2MB flash is
available for the sketch partition. This prevents linker overflow when
CI groups many components into a single build, matching the approach
used by ESP8266's testing mode.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WPA2 Enterprise (EAP) is only implemented for ESP32 and ESP8266 but the
config schema accepted it on all platforms. On RP2040 this caused a
bootloop with no useful error message. Now rejects EAP config at
validation time on unsupported platforms.
Closes https://github.com/esphome/esphome/issues/14743
Addresses review feedback: the hard-coded pin lists only covered RP2040
GPIOs and were incomplete for RP2350 (GPIO up to 47). Now describes the
(gpio / 2) % 2 rule instead.
The RP2040 I2C bus was previously assigned Wire/Wire1 based on the order
I2C buses were defined in YAML, not based on which GPIO pins were used.
This caused I2C1 to not work when only a single bus was configured with
I2C1 pins (e.g., GPIO6/GPIO7).
Now selects the correct Wire instance using the RP2040/RP2350 GPIO pin
mapping formula: (pin / 2) % 2. Also adds config validation to catch
SDA/SCL pin mismatches and duplicate controller assignments.
Closes https://github.com/esphome/esphome/issues/14742
The debug component's reset reason text sensor was returning an empty
string on RP2040/RP2350 platforms. Read the chip reset registers to
report the actual reset source.
RP2040: reads VREG_AND_CHIP_RESET for POR and RUN pin.
RP2350: reads POWMAN chip_reset for POR, brown-out, RUN pin, and
power supply glitch.
Both: checks watchdog_caused_reboot() from the Pico SDK, and
distinguishes between crash (HardFault), watchdog timeout, and
software reset by consulting the crash handler data.
Also adds buf_append_str() helper to helpers.h for efficient plain
string appends without format parsing overhead.
Fix two GCC warnings on RP2040 builds:
1. crash_handler.cpp: Move __attribute__((section(".noinit"))) from
the struct type to the variable declaration where it belongs.
2. mdns_rp2040.cpp: Suppress IRAM_ATTR macro redefinition warning
caused by Arduino-Pico's PolledTimeout.h redefining it to empty.
The debug component's reset reason text sensor was returning an empty
string on RP2040/RP2350 platforms. Read the chip reset registers to
report the actual reset source.
RP2040: reads VREG_AND_CHIP_RESET for POR, RUN pin, and debug port.
RP2350: reads POWMAN chip_reset for POR, brown-out, RUN pin, watchdog
variants, glitch detect, debugger, rescue, and core powerdown.
Both: checks watchdog_caused_reboot() from the Pico SDK.
Also adds buf_append_str() helper to helpers.h for efficient plain
string appends without format parsing overhead.
Move __attribute__((section(".noinit"))) from the struct type to the
variable declaration where it belongs. GCC warns because the section
attribute applies to variables, not types.
The RP2040's LEAmDNS library relies on LwipIntf::stateUpCB() to
restart mDNS when the network interface reconnects. However, this
callback is stubbed out in arduino-pico because the original ESP8266
implementation used schedule_function() which doesn't exist in
arduino-pico, and the callback can't safely run directly since netif
status callbacks fire from IRQ context while _restart() allocates
UDP sockets.
The previous workaround blocked all component setup via can_proceed()
until WiFi connected, which only helped on initial boot but did not
handle reconnects.
Replace with a proper fix: detect WiFi reconnection from the existing
50ms mDNS update interval (main loop context) and call
MDNS.notifyAPChange() to restart mDNS probing and announcing.
The RP2040's LEAmDNS library relies on LwipIntf::stateUpCB() to
restart mDNS when the network interface reconnects. However, this
callback is stubbed out in arduino-pico because the original ESP8266
implementation used schedule_function() which doesn't exist in
arduino-pico, and the callback can't safely run directly since netif
status callbacks fire from IRQ context while _restart() allocates
UDP sockets.
The previous workaround blocked all component setup via can_proceed()
until WiFi connected, which only helped on initial boot but did not
handle reconnects.
Replace with a proper fix: detect WiFi reconnection from the existing
50ms mDNS update interval (main loop context) and call
MDNS.notifyAPChange() to restart mDNS probing and announcing.
Add FixedRingBuffer<T, MAX_CAPACITY> to helpers.h as the runtime-sized
equivalent of StaticRingBuffer. Uses std::conditional_t to auto-select
uint8_t/uint16_t/uint32_t index types based on MAX_CAPACITY.
Convert SlidingWindowFilter from manual ring buffer logic on FixedVector
to FixedRingBuffer<float>, eliminating window_head_, window_count_,
and window_size_ fields.
When calling set_effect("None") from a lambda, the compiler cannot
choose between set_effect(optional<std::string>) and
set_effect(const std::string&) since both require one implicit
conversion from const char*. Add explicit const char* overload to
resolve the ambiguity.
Fixes https://github.com/esphome/esphome/issues/14728