commit 6fae5d5a00b6cd1b240e6ae1c943f837cd2e530f
parent 28082009294087995b456cecdb42f4857d059d55
Author: Brian Swetland <swetland@frotz.net>
Date: Sat, 13 Jun 2015 19:34:44 -0700
flash-agent: prep work in build system
- add an -agt architecture variant for lpc15xx
- allow modules to override start.o (as agents will need to)
Diffstat:
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/lpc15xx/config.mk b/arch/lpc15xx/config.mk
@@ -15,6 +15,9 @@ $(call chip,lpc1547-rom,lpc15xx,0x02000000,0x00003000,0x00000000,0x00010000,rom)
$(call chip,lpc1547-blr,lpc15xx,0x02002c00,0x00000400,0x00000000,0x00001000,rom)
$(call chip,lpc1547-app,lpc15xx,0x02000000,0x00003000,0x00001000,0x0000F000,rom)
+# flash agent
+$(call chip,lpc1547-agt,lpc15xx,0x02000400,0x00000800,0x00000000,0x00000000,ram)
+
ARCH_lpc15xx_CFLAGS := \
-Iarch/lpc15xx/include \
-Iarch/arm-cm3/include
diff --git a/build/target-executable.mk b/build/target-executable.mk
@@ -15,6 +15,10 @@
M_NAME := $(strip $(M_NAME))
M_CHIP := $(strip $(M_CHIP))
+ifeq ($(strip $(M_START)),)
+M_START := $(ARCH_$(M_ARCH)_START)
+endif
+
M_ARCH := $(CHIP_$(M_CHIP)_ARCH)
M_ARCH_CFLAGS := $(ARCH_$(M_ARCH)_CFLAGS)
M_ARCH_OBJS := $(ARCH_$(M_ARCH)_OBJS)
@@ -31,7 +35,7 @@ $(error $(M_MAKEFILE): Module $(M_NAME): Unknown Architecture: $(M_ARCH))
endif
# architecture start glue goes first
-M_OBJS := $(ARCH_$(M_ARCH)_START) $(M_OBJS)
+M_OBJS := $(M_START) $(M_OBJS)
M_OBJS := $(addprefix $(OUT_TARGET_OBJ)/$(M_NAME)/,$(M_OBJS))
M_ARCH_OBJS := $(addprefix $(OUT_TARGET_OBJ)/$(M_NAME)/,$(M_ARCH_OBJS))
@@ -113,6 +117,7 @@ $(M_OUT_ELF): $(M_OBJS) $(M_ARCH_LIB) $(M_LINK_SCRIPT)
$(info module $(M_NAME))
+M_START :=
M_OBJS :=
M_NAME :=
M_BASE :=