From 15d0cdbc0b88520987293c129064dc4d21f60faa Mon Sep 17 00:00:00 2001 From: Michael Moon Date: Wed, 26 Dec 2012 17:59:19 +1100 Subject: [PATCH] debug most recently uploaded elf instead of most recently compiled elf --- makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 5ae8111d..61837e07 100644 --- a/makefile +++ b/makefile @@ -30,13 +30,18 @@ CONSOLE=/dev/arduino_A900K10V include ./gcc4mbed/build/gcc4mbed.mk -flash: $(PROJECT).hex +.PHONY: debug-store flash upload debug console + +debug-store: $(PROJECT).elf + cp $(PROJECT).elf $(PROJECT)_lastupload.elf + +flash: $(PROJECT).hex debug-store lpc21isp $< /dev/ttyACM0 115200 14746 -upload: $(PROJECT).bin +upload: $(PROJECT).bin debug-store dfu-util -d 1d50:6015 -D $< -debug: $(PROJECT).elf +debug: $(PROJECT)_lastupload.elf arm-none-eabi-gdb $< -ex "set target-charset ASCII" -ex "set remotelogfile mri.log" -ex "target remote $(CONSOLE)" console: -- 2.20.1