Skip to content

Instantly share code, notes, and snippets.

@rafacouto
Last active May 9, 2016 00:26
Show Gist options
  • Save rafacouto/aab4643ccbf38192f07da4f942f7aed5 to your computer and use it in GitHub Desktop.
Save rafacouto/aab4643ccbf38192f07da4f942f7aed5 to your computer and use it in GitHub Desktop.
OPENOCD_SCRIPTS = /usr/share/openocd/scripts
#OPENOCD_INTERFACE = $(OPENOCD_SCRIPTS)/interface/stlink-v2.cfg
OPENOCD_INTERFACE = $(OPENOCD_SCRIPTS)/interface/jlink.cfg
OPENOCD_TARGET = $(OPENOCD_SCRIPTS)/target/stm32f1x.cfg
#OPENOCD_TARGET = $(OPENOCD_SCRIPTS)/target/stm32f4x.cfg
flash: $(BUILDDIR)/$(PROJECT).elf
openocd -f $(OPENOCD_INTERFACE) \
-f $(OPENOCD_TARGET) \
-c 'program $(BUILDDIR)/$(PROJECT).elf verify reset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment