J. Nick Koston af1a00ccf9 [esp32] Wrap printf/vprintf/fprintf to eliminate _vfprintf_r (~11 KB flash)
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.
2026-02-27 12:35:41 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-12 23:04:19 +13:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
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%