From 59db01e8d7beeac650944f8bcdd14c1a9430cb33 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 28 Feb 2026 11:15:17 -1000 Subject: [PATCH] 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 4e7ab07125..da0f1f337a 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.