Browse Source

Make OpenOCD location easily configurable by using a variable.

pull/2/head
Uwe Hermann 16 years ago
parent
commit
cf7d4df189
  1. 14
      example/Makefile

14
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

Loading…
Cancel
Save