aboutsummaryrefslogtreecommitdiff
path: root/stmhal/Makefile
diff options
context:
space:
mode:
authorDamien George2015-04-18 21:21:28 +0100
committerDamien George2015-04-18 21:40:59 +0100
commit0435e762507e5513dec6d709b382d3c13b699e0c (patch)
tree0d87cf41f0c775f259bf874454d5dca753d47da4 /stmhal/Makefile
parent03ec6e4d018debac8e6f3460cd6ddc78696211f1 (diff)
stmhal: Make ld and af files configurable within Makefile.
Each board now needs an mpconfigboard.mk file which defines AF_FILE and LD_FILE. Also moved stm32f405.ld to boards/ directory to keep things organised.
Diffstat (limited to 'stmhal/Makefile')
-rw-r--r--stmhal/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile
index 0ec0cf32b..78553f188 100644
--- a/stmhal/Makefile
+++ b/stmhal/Makefile
@@ -10,6 +10,7 @@ BUILD ?= build-$(BOARD)
include ../py/mkenv.mk
-include mpconfigport.mk
+include boards/$(BOARD)/mpconfigboard.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
@@ -45,7 +46,7 @@ CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -m
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS += -Iboards/$(BOARD)
-LDFLAGS = -nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref
+LDFLAGS = -nostdlib -T $(LD_FILE) -Map=$(@:.elf=.map) --cref
LIBS =
# Debugging/Optimization
@@ -275,7 +276,6 @@ $(BUILD)/firmware.elf: $(OBJ)
MAKE_PINS = boards/make-pins.py
BOARD_PINS = boards/$(BOARD)/pins.csv
-AF_FILE = boards/stm32f4xx_af.csv
PREFIX_FILE = boards/stm32f4xx_prefix.c
GEN_PINS_SRC = $(BUILD)/pins_$(BOARD).c
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h