From 287d9620fc4f19eadbaaa2fbb7008604ea02a37f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 11 Feb 2014 14:37:37 +0200 Subject: [PATCH] Enable link map file generation. --- stm/Makefile | 2 +- unix/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stm/Makefile b/stm/Makefile index 12fb4b71ba..32f43213c3 100644 --- a/stm/Makefile +++ b/stm/Makefile @@ -31,7 +31,7 @@ else CFLAGS += -Os -DNDEBUG endif -LDFLAGS = --nostdlib -T stm32f405.ld +LDFLAGS = --nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref LIBS = # uncomment this if you want libgcc diff --git a/unix/Makefile b/unix/Makefile index a1a6a7102c..317bcb5ebf 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -12,7 +12,7 @@ include ../py/py.mk # compiler settings CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) -LDFLAGS = $(LDFLAGS_MOD) -lm +LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref ifeq ($(MICROPY_MOD_TIME),1) CFLAGS_MOD += -DMICROPY_MOD_TIME=1