modify openocd Makefile target to work with /usr/local based installation

This commit is contained in:
Harald Welte 2013-05-25 17:28:57 +02:00
parent 63543af41e
commit 5f21986c33
1 changed files with 3 additions and 2 deletions

View File

@ -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