Abstracted the .cfg file (in extra folder)

This commit is contained in:
Mike Szczys 2012-06-16 17:28:00 -05:00
parent 1faceda5b3
commit 8a17e1fe2c
2 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,9 @@ STD_PERIPH_LIB=Libraries
# location of OpenOCD Board .cfg files (only used with 'make program')
OPENOCD_BOARD_DIR=/usr/share/openocd/scripts/board
# Configuration (cfg) file containing programming directives for OpenOCD
OPENOCD_PROC_FILE=extra/stm32f0-openocd.cfg
# that's it, no need to change anything below this line!
###################################################
@ -51,7 +54,7 @@ $(PROJ_NAME).elf: $(SRCS)
$(OBJCOPY) -O binary $(PROJ_NAME).elf $(PROJ_NAME).bin
program: $(PROJ_NAME).bin
openocd -f $(OPENOCD_BOARD_DIR)/stm32f0discovery.cfg -f extra/stm32f0-openocd.cfg -c "stm_flash `pwd`/$(PROJ_NAME).bin" -c shutdown
openocd -f $(OPENOCD_BOARD_DIR)/stm32f0discovery.cfg -f $(OPENOCD_PROC_FILE) -c "stm_flash `pwd`/$(PROJ_NAME).bin" -c shutdown
clean:
rm -f *.o

View File

@ -30,6 +30,7 @@ This template will serve as a quick-start for those who do not wish to use an ID
5. extra/
* This contains a procedure file used to write the image to the board via OpenOCD
* **Abstracting the extra folder:** the .cfg file in the extra folder may be placed anywhere so that multiple projects can use one file. Just change the OPENOCD_PROC_FILE variable in the Make file to match the new location.
##Loading the image on the board