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 <kr.git@kerogit.eu>
This commit is contained in:
Kerogit 2025-05-25 22:02:24 +02:00 committed by Xiang Xiao
parent 78b0a98747
commit 5f736ee160

View file

@ -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