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:
parent
03ec6e4d01
commit
0435e76250
@ -10,6 +10,7 @@ BUILD ?= build-$(BOARD)
|
|||||||
|
|
||||||
include ../py/mkenv.mk
|
include ../py/mkenv.mk
|
||||||
-include mpconfigport.mk
|
-include mpconfigport.mk
|
||||||
|
include boards/$(BOARD)/mpconfigboard.mk
|
||||||
|
|
||||||
# qstr definitions (must come before including py.mk)
|
# qstr definitions (must come before including py.mk)
|
||||||
QSTR_DEFS = qstrdefsport.h $(BUILD)/pins_qstr.h
|
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 = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
|
||||||
CFLAGS += -Iboards/$(BOARD)
|
CFLAGS += -Iboards/$(BOARD)
|
||||||
|
|
||||||
LDFLAGS = -nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref
|
LDFLAGS = -nostdlib -T $(LD_FILE) -Map=$(@:.elf=.map) --cref
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
@ -275,7 +276,6 @@ $(BUILD)/firmware.elf: $(OBJ)
|
|||||||
|
|
||||||
MAKE_PINS = boards/make-pins.py
|
MAKE_PINS = boards/make-pins.py
|
||||||
BOARD_PINS = boards/$(BOARD)/pins.csv
|
BOARD_PINS = boards/$(BOARD)/pins.csv
|
||||||
AF_FILE = boards/stm32f4xx_af.csv
|
|
||||||
PREFIX_FILE = boards/stm32f4xx_prefix.c
|
PREFIX_FILE = boards/stm32f4xx_prefix.c
|
||||||
GEN_PINS_SRC = $(BUILD)/pins_$(BOARD).c
|
GEN_PINS_SRC = $(BUILD)/pins_$(BOARD).c
|
||||||
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
|
GEN_PINS_HDR = $(HEADER_BUILD)/pins.h
|
||||||
|
2
stmhal/boards/CERB40/mpconfigboard.mk
Normal file
2
stmhal/boards/CERB40/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/HYDRABUS/mpconfigboard.mk
Normal file
2
stmhal/boards/HYDRABUS/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.mk
Normal file
2
stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/PYBV10/mpconfigboard.mk
Normal file
2
stmhal/boards/PYBV10/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/PYBV3/mpconfigboard.mk
Normal file
2
stmhal/boards/PYBV3/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/PYBV4/mpconfigboard.mk
Normal file
2
stmhal/boards/PYBV4/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
2
stmhal/boards/STM32F4DISC/mpconfigboard.mk
Normal file
2
stmhal/boards/STM32F4DISC/mpconfigboard.mk
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
AF_FILE = boards/stm32f405_af.csv
|
||||||
|
LD_FILE = boards/stm32f405.ld
|
Loading…
Reference in New Issue
Block a user