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.
This commit is contained in:
Damien George 2015-04-18 21:21:28 +01:00
parent 03ec6e4d01
commit 0435e76250
9 changed files with 16 additions and 2 deletions

View File

@ -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

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld

View File

@ -0,0 +1,2 @@
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld