From 5f736ee1604c4b683eb31c72d511167553c8bd3a Mon Sep 17 00:00:00 2001 From: Kerogit Date: Sun, 25 May 2025 22:02:24 +0200 Subject: [PATCH] arch/avr: make linker print memory usage if GCC is used This option provides useful overview of used memory and should have no downsides. Signed-off-by: Kerogit --- arch/avr/src/avr/Toolchain.defs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index 9737b8d5240..54ba8416ee3 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -110,6 +110,10 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) LDFLAGS += -Map=$(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx.map) endif +ifeq ($(CONFIG_ARCH_TOOLCHAIN_GCC),y) + LDFLAGS += --print-memory-usage +endif + ifneq ($(CONFIG_DEBUG_NOOPT),y) ARCHOPTIMIZATION += -fno-strict-aliasing endif