From ca1067965b24308e086cf50091b33cb99041c043 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 29 Oct 2013 20:41:28 +0100 Subject: Fix flash target --- firmware/Makefile | 23 ++++++++++++++++++----- 1 file 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) -- cgit v1.2.3