summaryrefslogtreecommitdiff
path: root/firmware/Makefile
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-10-29 20:41:28 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2013-10-29 20:41:28 +0100
commitca1067965b24308e086cf50091b33cb99041c043 (patch)
tree636a8d954025fe683366359a3596c81743cb8ba7 /firmware/Makefile
parent94d67aae3a0b9921a7106b592593253b73b0cdb9 (diff)
Fix flash target
Diffstat (limited to 'firmware/Makefile')
-rw-r--r--firmware/Makefile23
1 files changed, 18 insertions, 5 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index e398623..f7edae3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -44,10 +44,16 @@ PRFLAGS ?=
LINKER_SCRIPT = ${LPC}/LPC17xx.ld
CSRCS = \
${LPC}/startup_LPC17xx.c \
- $(wildcard ${CMSIS}/*.c) \
- $(wildcard ${LPC}/*.c) \
- $(wildcard ${DRV}/*.c) \
+ ${LPC}/system_LPC17xx.c \
$(wildcard ${SRC}/*.c)
+
+# ${DRV}/*.c \
+
+
+# $(wildcard ${CMSIS}/*.c) \
+# $(wildcard ${LPC}/*.c) \
+# $(wildcard ${DRV}/*.c) \
+# $(wildcard ${SRC}/*.c)
CSRCS += ${SRC}/${PROJ}.c
ASRCS =
@@ -90,8 +96,15 @@ nuke: clean
-$(RM) -f *.hex *.bin
.PHONY : flash
+#flash: $(EXECNAME)
+# $(CP) -O ihex $(EXECNAME) $(PROJ).hex
+# openocd -f openocd.cfg -c 'flash write_image erase $(PROJ).hex' -c 'verify_image $(PROJ).hex' -c 'reset run'
flash: $(EXECNAME)
- $(CP) -O ihex $(EXECNAME) $(PROJ).hex
- openocd -f openocd.cfg -c 'flash write_image erase $(PROJ).hex' -c 'verify_image $(PROJ).hex' -c 'reset run'
+ $(CP) -O binary $(EXECNAME) $(PROJ).bin
+ ./fix-lpcchecksum $(PROJ).bin
+ openocd -f openocd.cfg \
+ -c 'flash write_image erase $(PROJ).bin' \
+ -c 'verify_image $(PROJ).bin' \
+ -c 'reset run'
-include $(CSRCS:.c=.d)