diff options
-rw-r--r-- | firmware/Makefile | 23 |
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) |