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