diff --git a/stmhal/Makefile b/stmhal/Makefile index 0ec0cf32b9..78553f188b 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 diff --git a/stmhal/boards/CERB40/mpconfigboard.mk b/stmhal/boards/CERB40/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/CERB40/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/HYDRABUS/mpconfigboard.mk b/stmhal/boards/HYDRABUS/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/HYDRABUS/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.mk b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/NETDUINO_PLUS_2/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/PYBV10/mpconfigboard.mk b/stmhal/boards/PYBV10/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/PYBV10/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/PYBV3/mpconfigboard.mk b/stmhal/boards/PYBV3/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/PYBV3/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/PYBV4/mpconfigboard.mk b/stmhal/boards/PYBV4/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/PYBV4/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/boards/STM32F4DISC/mpconfigboard.mk b/stmhal/boards/STM32F4DISC/mpconfigboard.mk new file mode 100644 index 0000000000..3c2bdab98b --- /dev/null +++ b/stmhal/boards/STM32F4DISC/mpconfigboard.mk @@ -0,0 +1,2 @@ +AF_FILE = boards/stm32f405_af.csv +LD_FILE = boards/stm32f405.ld diff --git a/stmhal/stm32f405.ld b/stmhal/boards/stm32f405.ld similarity index 100% rename from stmhal/stm32f405.ld rename to stmhal/boards/stm32f405.ld