From f4a3b32ddb7b19b8a7462b2f5c59cbc05f4a1847 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Sat, 23 Sep 2017 21:17:40 +0100 Subject: [PATCH] Fix `make debug-store` (and hence `make upload`) on windows Note that the cd commands are to avoid having to translate between / and \ as path separators --- src/makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/makefile b/src/makefile index 51d16716..8858644d 100644 --- a/src/makefile +++ b/src/makefile @@ -108,12 +108,17 @@ include $(BUILD_DIR)/build.mk CONSOLE?=/dev/arduino BAUD?=9600 -.PHONY: debug-store flash upload debug console dfu +ifneq "$(OS)" "Windows_NT" +COPY=cp +else +COPY=copy +endif +.PHONY: debug-store flash upload debug console dfu print-% : ; @echo $* = $($*) debug-store: ../LPC1768/$(PROJECT).elf - cp ../LPC1768/$(PROJECT).elf ../LPC1768/$(PROJECT)_lastupload.elf + cd .. && cd LPC1768 && $(COPY) $(PROJECT).elf $(PROJECT)_lastupload.elf flash: ../LPC1768/$(PROJECT).hex debug-store lpc21isp $< $(CONSOLE) 115200 12000 -- 2.20.1