From 59db01e8d7beeac650944f8bcdd14c1a9430cb33 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 28 Feb 2026 11:15:17 -1000 Subject: [PATCH 1/2] Fix IRAM_ATTR not defined on LibreTiny (bk72xx) IRAM_ATTR is defined by esp_attr.h on ESP32 but not on LibreTiny. Add a no-op fallback in the C file since hal.h (which defines it for C++) cannot be included from C. --- esphome/core/lwip_fast_select.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/esphome/core/lwip_fast_select.c b/esphome/core/lwip_fast_select.c index 4e7ab07125b..da0f1f337a4 100644 --- a/esphome/core/lwip_fast_select.c +++ b/esphome/core/lwip_fast_select.c @@ -126,6 +126,12 @@ #include +// IRAM_ATTR is defined by esp_attr.h (included via FreeRTOS headers) on ESP32. +// On LibreTiny it's not defined — provide a no-op fallback. +#ifndef IRAM_ATTR +#define IRAM_ATTR +#endif + // Compile-time verification of thread safety assumptions. // On ESP32 (Xtensa/RISC-V) and LibreTiny (ARM Cortex-M), naturally-aligned // reads/writes up to 32 bits are atomic. From e7fc69e45357d08aa324e9b5567a8ff33380154d Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 28 Feb 2026 12:26:31 -1000 Subject: [PATCH 2/2] reorder --- esphome/components/uart/uart_component_esp_idf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/uart/uart_component_esp_idf.h b/esphome/components/uart/uart_component_esp_idf.h index 7bb25f8dfff..631bf54cd56 100644 --- a/esphome/components/uart/uart_component_esp_idf.h +++ b/esphome/components/uart/uart_component_esp_idf.h @@ -3,11 +3,11 @@ #ifdef USE_ESP32 #include +#include "esphome/core/component.h" +#include "uart_component.h" #ifdef USE_UART_WAKE_LOOP_ON_RX #include #endif -#include "esphome/core/component.h" -#include "uart_component.h" namespace esphome::uart {