From 4dfa31f9f81fd8a573827abaea1b556fe48d4792 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 4 Oct 2016 20:25:49 +0000 Subject: [PATCH] rules.mk: flash: send full path for existing openocd When using netcat to send commands to an already existing openocd session, you must path full paths to the file to flash. There's no guarantee that it is running from the same directory as the present example --- examples/rules.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/rules.mk b/examples/rules.mk index 465db5d..2bc17ff 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -228,7 +228,7 @@ ifeq ($(BMP_PORT),) ifeq ($(OOCD_FILE),) %.flash: %.elf @printf " FLASH $<\n" - $(Q)(echo "halt; program $(*).elf verify reset" | nc -4 localhost 4444 2>/dev/null) || \ + $(Q)(echo "halt; program $(realpath $(*).elf) verify reset" | nc -4 localhost 4444 2>/dev/null) || \ $(OOCD) -f interface/$(OOCD_INTERFACE).cfg \ -f target/$(OOCD_TARGET).cfg \ -c "program $(*).elf verify reset exit" \ @@ -236,7 +236,7 @@ ifeq ($(OOCD_FILE),) else %.flash: %.elf @printf " FLASH $<\n" - $(Q)(echo "halt; program $(*).elf verify reset" | nc -4 localhost 4444 2>/dev/null) || \ + $(Q)(echo "halt; program $(realpath $(*).elf) verify reset" | nc -4 localhost 4444 2>/dev/null) || \ $(OOCD) -f $(OOCD_FILE) \ -c "program $(*).elf verify reset exit" \ $(NULL)