arch/avr: make the linker obey DEBUG_LINK_MAP

This patch adds -Map linker flag to Toolchain.defs for AVR.
This commit is contained in:
Kerogit 2025-04-18 23:05:58 +02:00 committed by Xiang Xiao
parent 290f09934d
commit 100bbe620e

View file

@ -97,6 +97,10 @@ ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y)
ARCHOPTIMIZATION += -ffunction-sections -fdata-sections
endif
ifeq ($(CONFIG_DEBUG_LINK_MAP),y)
LDFLAGS += -Map=$(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx.map)
endif
ifneq ($(CONFIG_DEBUG_NOOPT),y)
ARCHOPTIMIZATION += -fno-strict-aliasing
endif