aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann2009-07-18 01:31:08 +0200
committerUwe Hermann2009-07-18 01:31:08 +0200
commitcf7d4df189344f7e0721e64db5ae3031e891dbfb (patch)
treed4aeb0314698b192c2c787b72920b9b98dce46c6
parentf3d7eda380ff3fdd665d80cdb41a7700ff79c5b1 (diff)
Make OpenOCD location easily configurable by using a variable.
-rw-r--r--example/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/example/Makefile b/example/Makefile
index d517a06..a0f0dbb 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