Commit Graph
14141 Commits
Author SHA1 Message Date
J. Nick Koston 249a4bdcf0 Add configASSERT checks for pvPortMalloc failures
Matches ESP-IDF's assert pattern for the static allocation callbacks.
2026-03-31 22:27:19 -10:00
J. Nick Koston b726d108f8 Only enable configSUPPORT_STATIC_ALLOCATION on BK72xx
RTL87xx loses 280 bytes heap with it enabled. BK72xx gains 712 bytes.
Keep it BK72xx-only where it's a clear win.
2026-03-31 22:06:35 -10:00
J. Nick Koston 08eccb081c Revert "Revert: only enable configSUPPORT_STATIC_ALLOCATION on BK72xx"
This reverts commit 444ee47ecb.
2026-03-31 22:04:44 -10:00
J. Nick Koston 444ee47ecb Revert: only enable configSUPPORT_STATIC_ALLOCATION on BK72xx
RTL87xx loses 472 bytes heap with it enabled due to different FreeRTOS
internals. BK72xx gains 712 bytes, so keep it there only.
2026-03-31 22:04:14 -10:00
J. Nick Koston bdb9618938 Enable configSUPPORT_STATIC_ALLOCATION for all LibreTiny platforms
The FreeRTOS timer command queue moves from heap to BSS on all
LibreTiny targets, not just BK72xx. RTL87xx and LN882x benefit
from the same heap savings.
2026-03-31 22:00:22 -10:00
J. Nick Koston d3545c960f Document intentional no-destructor and fast-path read rationale 2026-03-31 21:45:15 -10:00
J. Nick Koston 6e9ebf6b1b Fix scoping: declare count outside portENTER_CRITICAL block
BK72xx portENTER_CRITICAL expands to something that introduces a
scope, so variables declared between ENTER/EXIT are not visible after.
2026-03-31 21:43:21 -10:00
J. Nick Koston b980978f05 Enable configSUPPORT_STATIC_ALLOCATION on BK72xx
Add build flag and required callbacks (following ESP-IDF's pvPortMalloc
approach) so FreeRTOSQueue can use xQueueCreateStatic — queue storage
lives in BSS with zero runtime heap allocation.
2026-03-31 21:42:59 -10:00
J. Nick Koston b829bbee95 Use increment_dropped_count() internally in push() 2026-03-31 21:33:57 -10:00
J. Nick Koston 1e156d46b6 Fast path for get_and_reset_dropped_count to avoid critical section
Plain read of aligned uint16_t is safe on ARM. Since drops are rare,
almost every call returns 0 without entering a critical section.
2026-03-31 21:32:26 -10:00
J. Nick Koston bb2991bfda Address review: critical sections for dropped_count_, delete copy/move
- Protect dropped_count_ increment and get+reset with
  portENTER_CRITICAL/portEXIT_CRITICAL since std::atomic is unavailable
  on NO_ATOMICS platforms
- Delete copy/move constructors and assignment operators
- Remove volatile qualifier (critical sections provide proper
  synchronization)
2026-03-31 21:31:41 -10:00
J. Nick Koston 4f33faf89d Restore nullptr checks for xQueueCreate failure 2026-03-31 20:48:33 -10:00
J. Nick Koston 586e37c864 Use xQueueCreate — BK72xx FreeRTOS lacks static allocation
BK72xx's FreeRTOS does not enable configSUPPORT_STATIC_ALLOCATION,
so xQueueCreateStatic is unavailable. Fall back to xQueueCreate
which is a one-time heap allocation during setup.
2026-03-31 20:47:47 -10:00
J. Nick Koston 948449502f Guard freertos_queue.h with ESPHOME_THREAD_MULTI_NO_ATOMICS
Prevents compilation failure on host/native builds where FreeRTOS
headers are not available.
2026-03-31 20:44:43 -10:00
J. Nick Koston 9db5c8ac2d Use xQueueCreateStatic to avoid heap allocation
Storage buffer and control block are now class members, matching
LockFreeQueue's static buffer approach. Removes all null handle checks.
2026-03-31 20:42:13 -10:00
J. Nick Koston 42c2f1906f Use constexpr for queue size with +1 for LockFreeQueue ring buffer 2026-03-31 20:39:43 -10:00
J. Nick Koston 8b81cf3fda [wifi] Use queue abstraction for LibreTiny WiFi events
Replace static FreeRTOS queue globals in the LibreTiny WiFi component
with the same queue abstraction used by ESP32:

- ESPHOME_THREAD_MULTI_ATOMICS (RTL87xx, LN882x): LockFreeQueue
- ESPHOME_THREAD_MULTI_NO_ATOMICS (BK72xx): new FreeRTOSQueue wrapper

Add FreeRTOSQueue in freertos_queue.h — an xQueue wrapper providing
the same API as LockFreeQueue (push, pop, get_and_reset_dropped_count)
for platforms without hardware atomic instructions.

The event queue is now a class member instead of a static global,
matching the ESP32 pattern.
2026-03-31 20:39:21 -10:00
Rene GucaandRene 212b3e1688 [cover] move time_based_cover to its own subdirectory (#15313)
Co-authored-by: Rene <rene@guca.at>
2026-03-31 21:59:24 -04:00
Kevin Ahrendt 31a70ab299 [resampler] Future-proof resampler task to avoid potential memory leaks (#15186) 2026-03-31 21:44:54 -04:00
Christian Handpre-commit-ci-lite[bot] 8f2cf8b8a7 [bmp581_base] Add support for BMP585 (#15277)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 21:39:41 -04:00
954227b203 [esp32_ble_tracker] Restart BLE scan after OTA failure (#15308)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-03-31 23:26:26 +00:00
Kevin Ahrendt 4a23ba7d8a [mixer] Fix memory leak in mixer task on stop/start cycles (#15185) 2026-04-01 12:06:48 +13:00
Edward Firmo b71c406e70 [uart] fix baud rate not applied on load_settings() for ESP32 (IDF) (#15341) 2026-04-01 12:04:07 +13:00
Jesse Hills 15bcd62f22 [internal_temperature] Move code into platform specific files (#15339) 2026-04-01 11:59:53 +13:00
J. Nick Koston 23dcc5389d [time] Fix strftime %Z and %z returning wrong timezone (#15330) 2026-04-01 11:59:45 +13:00
Jonathan Swoboda 9dca7e0daf [tormatic] Fix UART stream desync on ESP32 (#15337) 2026-03-31 18:01:33 -04:00
Clyde StubbsandJesse Hills 66b6d36a26 [lvgl] Fixes #3 (#15304)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-04-01 10:04:10 +13:00
Jonathan Swoboda 2064eef273 [esp32_hosted] Guard against empty firmware URL in perform() (#15338) 2026-03-31 10:53:12 -10:00
dependabot[bot] 64e836f9c8 Bump CodSpeedHQ/action from 4.12.1 to 4.13.0 (#15340)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 10:49:17 -10:00
2cb987095d [modbus] Share helper functions across modbus components - part B (#14172)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 10:48:16 -10:00
Clyde Stubbs da6c4e20fe [lvgl] Fixes #2 (#15161) 2026-04-01 09:29:57 +13:00
Keith Burzinski 26b426bbff [zwave_proxy] Clear Home ID on USB modem disconnect (#15327) 2026-03-31 14:34:16 -05:00
J. Nick Koston 2449aa75af [http_request] Fix crash when esp_http_client_init fails (#15328) 2026-03-31 07:45:23 -10:00
J. Nick Koston 2c9a3051d6 [api] Use memcpy for fixed32 decode on little-endian platforms (#15292) 2026-03-31 07:43:18 -10:00
J. Nick Koston 9b97e95cf3 [binary_sensor] Add on_multi_click integration test (#15329) 2026-03-31 07:42:12 -10:00
J. Nick Koston c64bc24960 [preferences] Reduce log verbosity for unchanged NVS/FDB writes (#15332) 2026-03-31 07:34:54 -10:00
Jonathan Swoboda ceb3cb2ae7 [haier] Fix hOn half-degree temperature setting (#15312) 2026-03-31 15:22:29 +00:00
J. Nick Koston a3913b98ba [wifi] Move LibreTiny WiFi STA state to member variable (#15305) 2026-03-30 17:05:48 -10:00
Guillermo Ruffino ef65e47bc5 [schema] generator fixes (#15276) 2026-03-31 13:08:50 +13:00
Jonathan Swoboda 53b2a03c80 [multiple] Fix -Wformat and -Wextra warnings across 33 component files (#15321) 2026-03-30 18:56:05 -04:00
dependabot[bot] 58df755d8b Bump requests from 2.33.0 to 2.33.1 (#15324) 2026-03-30 12:27:30 -10:00
Ardumine c5eb0eb984 [internal_temperature] Add nRF52 Zephyr support (#15297) 2026-03-31 10:50:11 +13:00
Clyde Stubbs f25fa71235 [lvgl] Fix align_to directives (#15311) 2026-03-31 07:25:15 +11:00
J. Nick Koston 8561a8c495 [core] Suppress component source overflow warnings in testing mode (#15320) 2026-03-30 08:48:04 -10:00
J. Nick Koston 8688ef7125 [benchmark] Fix decode benchmarks being optimized away by compiler (#15293) 2026-03-30 08:24:48 -10:00
J. Nick Koston 46ea61666e [wifi] Replace FreeRTOS queue with LockFreeQueue on ESP-IDF (#15306) 2026-03-30 08:24:34 -10:00
J. Nick Koston 8969eb76e9 [wifi] Avoid redundant SDK calls in WiFi loop on ESP8266 (#15303) 2026-03-30 08:24:17 -10:00
J. Nick Koston ffee4c22b3 [esp32_ble] Devirtualize BLE event handler dispatch (#15310) 2026-03-30 08:21:58 -10:00
J. Nick Koston ad3f6ae313 [automation] Remove actions_end_ pointer from ActionList to save RAM (#15283) 2026-03-30 08:20:52 -10:00
Keith Burzinski b579758c46 [dht] Code clean-up (#15271) 2026-03-30 13:15:37 -05:00