diff --git a/Makefile b/Makefile index a3245c00c..37639cd86 100644 --- a/Makefile +++ b/Makefile @@ -95,10 +95,6 @@ products += $(dependencies) @$(SIZE) $< | tail -n 1 | awk '{print "Code: " $$1 " bytes";print "Data: " $$2 " bytes"; print "Total: " int(($$1+$$2)/1024) " kB (" $$1 + $$2 " bytes)";}' @echo "===============================" -.PHONY: %_run -%_run: %.$(EXE) - $(GDB) -x gdb_script.gdb $< - ifdef OBJCOPY products += $(products:.$(EXE)=.hex) $(products:.$(EXE)=.bin) %.hex: %.$(EXE) diff --git a/build/platform.device.mak b/build/platform.device.mak index 53457e48b..b10ec2e4e 100644 --- a/build/platform.device.mak +++ b/build/platform.device.mak @@ -6,5 +6,10 @@ endif USE_LIBA = 1 EXE = elf +.PHONY: %_run +%_run: %.$(EXE) + $(GDB) -x gdb_script.gdb $< + +.PHONY: %_flash %_flash: %.bin dfu-util -i 0 -a 0 -s 0x08000000:leave -D $<