From 17664750b79a271aa4c7cd140917190e30426715 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 8 Feb 2026 11:20:54 -0600 Subject: [PATCH] tweak --- esphome/analyze_memory/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/esphome/analyze_memory/__init__.py b/esphome/analyze_memory/__init__.py index 6aeb0ef8a66..8de094ed37c 100644 --- a/esphome/analyze_memory/__init__.py +++ b/esphome/analyze_memory/__init__.py @@ -57,8 +57,9 @@ SymbolInfoType = tuple[str, int, str] # RAM sections - symbols in these sections consume RAM RAM_SECTIONS = frozenset([".data", ".bss"]) -# nm symbol types for global/weak defined symbols (used for library symbol mapping) -_NM_DEFINED_GLOBAL_TYPES = frozenset({"T", "D", "B", "R", "W", "V"}) +# nm symbol types for defined symbols (used for library symbol mapping) +# Uppercase = global, lowercase = local/static, W/V = weak +_NM_DEFINED_SYMBOL_TYPES = frozenset({"T", "t", "D", "d", "B", "b", "R", "r", "W", "V"}) @dataclass @@ -525,8 +526,8 @@ class MemoryAnalyzer: sym_type = parts[-2] sym_name = parts[-1] - # Include global defined symbols (uppercase) and weak symbols (W/V) - if sym_type in _NM_DEFINED_GLOBAL_TYPES: + # Include all defined symbols (global, local, and weak) + if sym_type in _NM_DEFINED_SYMBOL_TYPES: symbol_map[sym_name] = lib_name return symbol_map