From 5f21986c334d5e37ba22657c673ae0b270ac3009 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 25 May 2013 17:28:57 +0200 Subject: [PATCH] modify openocd Makefile target to work with /usr/local based installation --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 15ea40b..03d50c9 100755 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ STD_PERIPH_LIB=Libraries LDSCRIPT_INC=Device/ldscripts # location of OpenOCD Board .cfg files (only used with 'make program') -OPENOCD_BOARD_DIR=/usr/share/openocd/scripts/board +OPENOCD_SCRIPTS_DIR=/usr/local/share/openocd/scripts +OPENOCD_BOARD_DIR=$(OPENOCD_SCRIPTS_DIR)/board # Configuration (cfg) file containing programming directives for OpenOCD OPENOCD_PROC_FILE=extra/stm32f0-openocd.cfg @@ -69,7 +70,7 @@ $(PROJ_NAME).elf: $(SRCS) $(SIZE) $(PROJ_NAME).elf program: $(PROJ_NAME).bin - openocd -f $(OPENOCD_BOARD_DIR)/stm32f0discovery.cfg -f $(OPENOCD_PROC_FILE) -c "stm_flash `pwd`/$(PROJ_NAME).bin" -c shutdown + openocd -s $(OPENOCD_SCRIPTS_DIR) -f $(OPENOCD_BOARD_DIR)/stm32f0discovery.cfg -f $(OPENOCD_PROC_FILE) -c "stm_flash `pwd`/$(PROJ_NAME).bin" -c shutdown clean: find ./ -name '*~' | xargs rm -f