board/arm/imxrt: the request for map file in Make.defs LDFLAGS results in absolute path in export target.

The BSP MAke.defs line

  LDFLAGS += -Map=$(TOPDIR)/nuttx.map

results  in absolute path in nuttx-export/scripts/Make.defs
which would mean that each application rebuild would attempt
to modify file inside original build of NuttX system.

Even worse, it prevents linking by GCC, because -Map=xxx/nuttx.map
works directly in LD, it would require -Wl,-Map= for GCC.

Fixed name of map file prevents to define map file by build
system using exported NuttX libraries and link kit.

Change is done to allow OMK template based applications
development for another NuttX BSP

  https://github.com/ppisa/nuttx-devel/tree/master/nuttx-omk-template

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
This commit is contained in:
Pavel Pisa 2021-01-20 19:09:54 +01:00 committed by Xiang Xiao
parent 0a5e7bd3ef
commit d77fe3390f

View File

@ -85,11 +85,6 @@ endif
ifneq ($(CROSSDEV),arm-nuttx-elf-)
LDFLAGS += -nostartfiles -nodefaultlibs
ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
LDFLAGS += -Map="${shell cygpath -w $(TOPDIR)/nuttx.map}"
else
LDFLAGS += -Map=$(TOPDIR)/nuttx.map
endif
endif
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
LDFLAGS += -g