From cf7d4df189344f7e0721e64db5ae3031e891dbfb Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sat, 18 Jul 2009 01:31:08 +0200 Subject: [PATCH] Make OpenOCD location easily configurable by using a variable. --- example/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/example/Makefile b/example/Makefile index d517a067..a0f0dbb5 100644 --- a/example/Makefile +++ b/example/Makefile @@ -30,6 +30,7 @@ CFLAGS = -Os -g -Wall -Wextra -I../include -fno-common \ -mcpu=cortex-m3 -mthumb LDFLAGS = -L../lib -T$(BINARY).ld -nostartfiles OBJS = $(BINARY).o +OPENOCD = openocd # Be silent per default, but 'make V=1' will show all compiler calls. ifneq ($(V),1) @@ -71,12 +72,13 @@ clean: $(Q)rm -f $(BINARY).list flash: - $(Q)openocd -f /usr/share/openocd/scripts/interface/jtagkey-tiny.cfg \ - -f /usr/share/openocd/scripts/board/olimex_stm32_h103.cfg \ - -c "init" -c "reset halt" \ - -c "flash write_image erase blink.bin 0x08000000" \ - -c "resume 0x08000000" \ - -c "shutdown" + $(Q)$(OPENOCD) \ + -f /usr/share/openocd/scripts/interface/jtagkey-tiny.cfg \ + -f /usr/share/openocd/scripts/board/olimex_stm32_h103.cfg \ + -c "init" -c "reset halt" \ + -c "flash write_image erase blink.bin 0x08000000" \ + -c "resume 0x08000000" \ + -c "shutdown" .PHONY: images clean