Skip to content

Commit 287d962

Browse files
committed
Enable link map file generation.
1 parent a075741 commit 287d962

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

stm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ else
3131
CFLAGS += -Os -DNDEBUG
3232
endif
3333

34-
LDFLAGS = --nostdlib -T stm32f405.ld
34+
LDFLAGS = --nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref
3535
LIBS =
3636

3737
# uncomment this if you want libgcc

unix/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ include ../py/py.mk
1212

1313
# compiler settings
1414
CFLAGS = -I. -I$(PY_SRC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD)
15-
LDFLAGS = $(LDFLAGS_MOD) -lm
15+
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
1616

1717
ifeq ($(MICROPY_MOD_TIME),1)
1818
CFLAGS_MOD += -DMICROPY_MOD_TIME=1

0 commit comments

Comments
 (0)