mirror of
https://github.com/esphome/esphome.git
synced 2026-03-01 02:14:19 -07:00
af1a00ccf9b8f055a9a51fd9fe019b9c8d9eb638
ESP-IDF SDK components reference fprintf(), printf(), and vprintf() which pull in newlib's _vfprintf_r (~11 KB). This is a separate implementation from _svfprintf_r (used by snprintf/vsnprintf) that handles FILE* stream I/O with buffering and locking. ESPHome replaces the ESP-IDF log handler via esp_log_set_vprintf_(), so the SDK's vprintf() path is dead code at runtime. The fprintf() and printf() calls in SDK components are only in debug/assert paths that are either GC'd or never called. These linker --wrap stubs redirect through vsnprintf() + fwrite(), allowing the linker to dead-code eliminate _vfprintf_r. An escape hatch is provided via enable_full_printf: true in the esp32 advanced config section for external components that need full FILE*-based fprintf.
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
524 MiB
Languages
C++
64.1%
Python
35.5%
C
0.3%
