m3dev

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5f3d92572d243a0df47816971d44f64e6ccad5e7
parent 302540f3fbf3ced395dc92ed3366eda6d7cf86cd
Author: Brian Swetland <swetland@frotz.net>
Date:   Sat, 13 Jun 2015 22:58:42 -0700

flash-agents: build for both lpc13xx and lpc15xx

They're pretty similar, mostly just different rom entrypoint and ram base.

Diffstat:
Magents/lpc-header.S | 6+++---
Magents/lpc-main.c | 5+++++
Magents/module.mk | 6++++++
March/lpc13xx/config.mk | 1+
March/lpc15xx/config.mk | 2+-
5 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/agents/lpc-header.S b/agents/lpc-header.S @@ -8,10 +8,10 @@ _start: .long 0x00010000 // version .long 0x00000001 // flags .long _start - .long 0x02001000 // data addr + .long _start + 0x400 // data addr .long 0x00001000 // data size - .long 0x00000000 // flash addr - .long 0x00010000 // flash size + .long CONFIG_FLASHADDR // flash addr + .long CONFIG_FLASHSIZE // flash size .long 0 .long 0 .long 0 diff --git a/agents/lpc-main.c b/agents/lpc-main.c @@ -16,7 +16,12 @@ #include <agent/flash.h> +#ifdef CONFIG_ARCH_LPC15XX #define LPC_IAP_FUNC 0x03000205 +#else +#define LPC_IAP_FUNC 0x1fff1ff1 +#endif + #define LPC_IAP_PREPARE 50 #define LPC_IAP_WRITE 51 #define LPC_IAP_ERASE 52 diff --git a/agents/module.mk b/agents/module.mk @@ -5,3 +5,9 @@ M_START := agents/lpc-header.o M_OBJS := agents/lpc-main.o $(call build-target-executable) +M_NAME := agent-lpc13xx +M_CHIP := lpc1343-agt +M_START := agents/lpc-header.o +M_OBJS := agents/lpc-main.o +$(call build-target-executable) + diff --git a/arch/lpc13xx/config.mk b/arch/lpc13xx/config.mk @@ -11,6 +11,7 @@ $(call chip,lpc1343-app,lpc13xx_v1,0x10000000,0x00002000,0x00001000,0x00007000,r $(call chip,lpc1345-rom,lpc13xx_v2,0x10000000,0x00002000,0x00000000,0x00008000,rom) $(call chip,lpc1347-rom,lpc13xx_v2,0x10000000,0x00002000,0x00000000,0x00008000,rom) +$(call chip,lpc1343-agt,lpc13xx_v1,0x10000400,0x00000400,0x00000000,0x00008000,ram) ARCH_lpc13xx_v1_CFLAGS := -Iarch/lpc13xx/include ARCH_lpc13xx_v1_CFLAGS += -Iarch/lpc13xx/include-v1 diff --git a/arch/lpc15xx/config.mk b/arch/lpc15xx/config.mk @@ -16,7 +16,7 @@ $(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) +$(call chip,lpc1547-agt,lpc15xx,0x02000400,0x00000400,0x00000000,0x00010000,ram) ARCH_lpc15xx_CFLAGS := \ -Iarch/lpc15xx/include \