Browse Source

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

master
Harald Welte 9 years ago
parent
commit
5f21986c33
  1. 5
      Makefile

5
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

Loading…
Cancel
Save