modify openocd Makefile target to work with /usr/local based installation
This commit is contained in:
parent
63543af41e
commit
5f21986c33
5
Makefile
5
Makefile
|
@ -11,7 +11,8 @@ STD_PERIPH_LIB=Libraries
|
||||||
LDSCRIPT_INC=Device/ldscripts
|
LDSCRIPT_INC=Device/ldscripts
|
||||||
|
|
||||||
# location of OpenOCD Board .cfg files (only used with 'make program')
|
# 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
|
# Configuration (cfg) file containing programming directives for OpenOCD
|
||||||
OPENOCD_PROC_FILE=extra/stm32f0-openocd.cfg
|
OPENOCD_PROC_FILE=extra/stm32f0-openocd.cfg
|
||||||
|
@ -69,7 +70,7 @@ $(PROJ_NAME).elf: $(SRCS)
|
||||||
$(SIZE) $(PROJ_NAME).elf
|
$(SIZE) $(PROJ_NAME).elf
|
||||||
|
|
||||||
program: $(PROJ_NAME).bin
|
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:
|
clean:
|
||||||
find ./ -name '*~' | xargs rm -f
|
find ./ -name '*~' | xargs rm -f
|
||||||
|
|
Loading…
Reference in New Issue