Commit Graph
26777 Commits
Author SHA1 Message Date
J. Nick Koston 2b8311182a Merge remote-tracking branch 'upstream/api-proto-max-length' into integration 2026-04-05 18:42:52 -10:00
J. Nick Koston 2d43d07490 Merge branch 'dev' into api-proto-max-length 2026-04-05 18:42:30 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1c97954b47 Bump aioesphomeapi from 44.9.0 to 44.9.1 (#15470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-05 18:42:17 -10:00
J. Nick Koston 3f7e636f7a Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration 2026-04-05 18:40:32 -10:00
J. Nick Koston bc47757af1 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-05 18:39:27 -10:00
Boris Krivonog 859ea23bde [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 4) (#15462) 2026-04-05 18:33:02 -10:00
J. Nick Koston acd2fc3711 [api] Use multiply instead of loop for constant-size repeated enums
When a repeated enum field has a constant size per element (max < 128),
emit size * constant instead of iterating. This fixes unused variable
warnings from clang-tidy and generates more efficient code.
2026-04-05 18:29:01 -10:00
J. Nick Koston 0fc3664441 [api] Auto-derive max_value for enum fields in protobuf codegen
The protobuf code generator already parses all enum definitions and
knows every enum's maximum value. Use this to automatically apply the
max_value < 128 optimization to all enum fields, eliminating the need
for manual annotation.

Since every enum in api.proto has max < 128, all 58 enum field size
calculations now use constant arithmetic instead of calling varint
size functions.

Builds on #15424 which introduced the max_value optimization.
2026-04-05 18:16:14 -10:00
J. Nick Koston aa76b7bfc6 Merge remote-tracking branch 'upstream/dev' into api-proto-max-length 2026-04-05 18:06:45 -10:00
Jonathan Swoboda 7644f17cf6 [at581x] Fix codegen crash when using lambdas for frequency/time/power (#15468) 2026-04-06 00:05:04 -04:00
J. Nick Koston 1de94c1a84 [api] Add max_value proto option for constant-size varint codegen (#15424) 2026-04-05 18:02:06 -10:00
J. Nick Koston 10f08e0802 [esp8266] Add crash handler for post-mortem diagnostics (#15465) 2026-04-06 03:30:56 +00:00
J. Nick Koston 7a571493ff Merge remote-tracking branch 'origin/esp8266-crash-handler' into integration 2026-04-05 16:55:29 -10:00
Jonathan Swoboda aac74f4c94 [ags10] Fix wrong type passed to cg.templatable for set_zero_point mode (#15467) 2026-04-05 22:48:00 -04:00
J. Nick Koston efc449ccf8 Address Copilot review comments
- Fix crash_handler_has_data docstring: returns true for crash reset
  reason (exception/WDT), not dependent on RTC backtrace presence
- Always log numeric exccause in fallback branch for unexpected causes
2026-04-05 16:27:07 -10:00
Keith BurzinskiandClaude Opus 4.6 07f6be679f [esp32] Add signed app verification without hardware secure boot (#15357)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 21:20:48 -05:00
J. Nick Koston ea0ce710a8 [api] Split Noise handshake state_action_ to reduce stack pressure (#15464) 2026-04-05 13:55:06 -10:00
J. Nick Koston e209fb9ef3 Fix clang-tidy redundant-declaration for _irom0_text_end 2026-04-05 13:53:09 -10:00
J. Nick Koston 724d96dbfb Fix clang-tidy redundant-declaration for _irom0_text_end 2026-04-05 13:52:32 -10:00
J. Nick Koston 92dd7f18a0 Merge branch 'dev' into esp8266-crash-handler 2026-04-05 13:40:11 -10:00
J. Nick Koston f81e1c37da Merge remote-tracking branch 'upstream/esp8266-crash-handler' into integration 2026-04-05 13:39:46 -10:00
J. Nick Koston 2657bdc97a Reserve crash handler RTC region from preferences
Reduce preferences normal region from 96 to 78 words (words 32-109)
to formally reserve words 110-127 for the crash handler backtrace.
Preferences that don't fit in RTC fall back to flash storage, so
this has no functional impact for typical configurations.
2026-04-05 13:35:01 -10:00
J. Nick Koston 42f9b4225f Add RTC memory overlap comment in preferences.cpp 2026-04-05 13:33:27 -10:00
J. Nick Koston 82d178486b Address review feedback
- Add IRAM_ATTR to is_code_addr/recover_code_addr as safety net
  in case the compiler doesn't inline them
- Restore EXCVADDR logging for exception resets (faulting address
  is the key diagnostic for LoadProhibit/StoreProhibit)
- Add comment noting Xtensa stack pointer alignment assumption
2026-04-05 13:33:01 -10:00
J. Nick Koston 0614849896 Fix clang-tidy errors from CI
- Match Arduino core's declaration of _irom0_text_start/_end as
  void functions (mmu_iram.h declares them this way)
- Use C-style casts with NOLINT for int-to-ptr conversions in
  custom_crash_callback (clang-tidy performance-no-int-to-ptr)
2026-04-05 13:28:29 -10:00
J. Nick Koston 155657f1cc [mcp23xxx][pi4ioe5v6408] Disable loop when all pins are outputs (#15460) 2026-04-05 13:26:55 -10:00
J. Nick Koston 0f2d8656ad [esp32_ble] Skip dropped count memw when queue is empty (#15422) 2026-04-05 13:26:40 -10:00
J. Nick Koston 30d1230a17 [button] Downgrade press logging from DEBUG to VERBOSE (#15408) 2026-04-05 13:26:21 -10:00
J. Nick Koston 83a4edbea1 [select] [switch] Downgrade control path logging from DEBUG to VERBOSE (#15406) 2026-04-05 13:26:08 -10:00
J. Nick Koston f193bab60b [api] Add ListEntities benchmarks for sensor, binary_sensor, and light (#15427) 2026-04-05 13:25:50 -10:00
J. Nick Koston 1ecd45d14d Drop addr2line hint line
The ESPHome CLI already decodes addresses inline (shown as
WARNING Decoded lines). The hint was redundant and cost ~100
bytes of flash plus 220 bytes of stack for the format buffer.
2026-04-05 13:18:48 -10:00
Tomer27cz f01762ea44 [ci] move import to function (#15440) 2026-04-05 19:17:52 -04:00
Andrew Rankin f23843130e [lvgl] option to enable LVGL's built-in dark theme (#15389) 2026-04-06 09:07:42 +10:00
J. Nick Koston 4630c045bd Shorten Prohibited to Prohibit in exception cause names 2026-04-05 13:06:27 -10:00
J. Nick Koston 71649f6c1f Drop impossible exception causes and shorten strings
The LX106 (ESP8266) has no MMU, TLB, PIF, or privilege levels, so
exception causes 1, 5, 7, 8, 12-18, and 24-26 can never occur.
Remove them and shorten remaining cause names. Also drop Syscall,
Alloca, PCValue, Privileged which are unreachable on this core.
2026-04-05 13:05:40 -10:00
J. Nick Koston 9cdc6f52e0 Skip zero-init of RtcCrashData to save 15 bytes IRAM 2026-04-05 13:00:14 -10:00
J. Nick Koston 8241e385eb Remove redundant IRAM_ATTR from static inline helpers 2026-04-05 12:58:08 -10:00
J. Nick Koston 10b52df32b Fix stale comments referencing removed is_return_addr 2026-04-05 12:57:20 -10:00
J. Nick Koston d512ce24da Share TAG with other esp8266 component files 2026-04-05 12:54:42 -10:00
J. Nick Koston 9e7c990fc6 Use constexpr for ROM divide-by-zero detection 2026-04-05 12:52:01 -10:00
J. Nick Koston ed7bfa3e0f Detect divide-by-zero from ROM ILL instruction pattern
GCC's ROM divide routine triggers IllegalInstruction (exccause=0) at
ROM addresses 0x4000dce5/0x4000dd3d instead of IntegerDivideByZero
(exccause=6). Patch exccause to match the Arduino core's postmortem
handler behavior.
2026-04-05 12:51:34 -10:00
J. Nick Koston 64be4504ae Match ESP8266 Arduino core reset reason names 2026-04-05 12:49:43 -10:00
J. Nick Koston 57c95909d1 Show exception cause for all crash types
WDT resets also populate exccause in rst_info (e.g. Level1Interrupt
for stack overflow soft WDT). Show the cause string for all crash
reasons, not just REASON_EXCEPTION_RST. Also simplify PC logging
to a single line for all crash types.
2026-04-05 12:46:40 -10:00
J. Nick Koston ca623ace1a Remove s_crash_valid and crash_handler_read_and_clear
resetInfo is a global that persists until next reset — no need to
cache the crash validity in a separate bool. Check resetInfo.reason
directly in crash_handler_has_data() and crash_handler_log().
This eliminates the only RAM byte from the crash handler and removes
the now-empty crash_handler_read_and_clear() function and its call
from arch_init().
2026-04-05 12:43:18 -10:00
J. Nick Koston 9f008ba487 Reduce flash by removing rarely-useful register lines
Remove EPC2/EPC3 (always 0 on LX106, no level 2/3 interrupts) and
DEPC (extremely rare double exception). Combine PC and EXCVADDR into
one log line for exception resets. Shrink hint buffer 256->220.
Saves ~36 bytes flash in crash_handler_log.
2026-04-05 12:38:36 -10:00
J. Nick Koston 9035410fa9 Remove PROGMEM_STRING_TABLE mention from comment 2026-04-05 12:33:46 -10:00
J. Nick Koston 8a8540b247 Use if-else chains instead of switch for string lookups
Switch statements generate CSWTCH jump tables in RAM on ESP8266.
PROGMEM_STRING_TABLE causes LoadStoreError from flash cache conflicts
in API subscribe paths. If-else with LOG_STR avoids both: strings
stay in flash via PSTR, and comparison branches don't need a data
table. Zero RAM overhead confirmed via nm.
2026-04-05 12:33:32 -10:00
J. Nick Koston 58fd6ceff8 Restore progmem.h include needed for PROGMEM_STRING_TABLE 2026-04-05 12:24:30 -10:00
J. Nick Koston 6cdcdbb798 Remove flash-reading return address verification
Reading IROM addresses from IROM code causes LoadStoreError on ESP8266
due to the direct-mapped flash cache — the reading code and target
address can share a cache line, evicting the function mid-execution.

Remove is_return_addr() and rely on linker-symbol IROM bounds
(_irom0_text_start/_end) to eliminate false positives instead. This
is less precise but crash-safe.
2026-04-05 12:24:05 -10:00
J. Nick Koston af6e10816d Fix namespace for progmem_read_byte 2026-04-05 12:12:06 -10:00