mirror of
https://github.com/esphome/esphome.git
synced 2026-09-02 11:06:04 +00:00
9a8d17e3c8d15c7eee0ec0d201358afc9bd54ef5
On RP2040, the core0 stack lives in a 4KB SCRATCH_Y RAM bank. The Noise protocol handshake calls into curve25519 scalar multiplication which needs ~2KB+ of stack. When all handshake state branches lived in a single function, the compiler allocated stack space for all branches simultaneously (SERVER_HELLO msg[46]+mac[13], HANDSHAKE buffer[65], NoiseBuffer, etc.), leaving insufficient headroom for the crypto path. Split state_action_() into per-state methods so each state's locals occupy separate stack frames. The crypto path (WRITE_MESSAGE) now only carries its own 85 bytes of locals instead of ~200+ bytes from all branches combined.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
605 MiB
Languages
C++
56.1%
Python
43.3%
C
0.3%
JavaScript
0.2%
