From 43877394947e9a288af637067c12b943a9586fad Mon Sep 17 00:00:00 2001 From: chrysn Date: Mon, 26 Nov 2018 18:51:26 +0100 Subject: [PATCH] boards/stk3700: Allow selecting OpenOCD OpenOCD works well with those devices; the OpenOCD config is provided at the default location and only needs to refer to the setup that OpenOCD ships. --- boards/stk3700/Makefile.include | 12 +++++++++--- boards/stk3700/dist/openocd.cfg | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 boards/stk3700/dist/openocd.cfg diff --git a/boards/stk3700/Makefile.include b/boards/stk3700/Makefile.include index 4919d97c80..f992b0533a 100644 --- a/boards/stk3700/Makefile.include +++ b/boards/stk3700/Makefile.include @@ -5,9 +5,15 @@ PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) # setup serial terminal include $(RIOTMAKE)/tools/serial.inc.mk -# setup JLink for flashing -export JLINK_DEVICE := $(CPU_MODEL) -include $(RIOTMAKE)/tools/jlink.inc.mk +PROGRAMMER ?= jlink + +ifeq ($(PROGRAMMER),jlink) + # setup JLink for flashing + export JLINK_DEVICE := $(CPU_MODEL) + include $(RIOTMAKE)/tools/jlink.inc.mk +else ifeq ($(PROGRAMMER),openocd) + include $(RIOTMAKE)/tools/openocd.inc.mk +endif # include board common include $(RIOTBOARD)/common/silabs/Makefile.include diff --git a/boards/stk3700/dist/openocd.cfg b/boards/stk3700/dist/openocd.cfg new file mode 100644 index 0000000000..21eb6e65b0 --- /dev/null +++ b/boards/stk3700/dist/openocd.cfg @@ -0,0 +1 @@ +source [find board/efm32.cfg]