Commit 0435e762 authored by Damien George's avatar Damien George
Browse files

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.
parent 03ec6e4d
......@@ -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
......
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
AF_FILE = boards/stm32f405_af.csv
LD_FILE = boards/stm32f405.ld
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment