From c989205d8f4143bb23506ee0078e6a7874859033 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 9 Apr 2020 09:57:45 +0200 Subject: [PATCH] boards/msbiot: Use common stm32 serial/programmer settings --- boards/msbiot/Makefile.include | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/boards/msbiot/Makefile.include b/boards/msbiot/Makefile.include index 1c458961da..584a28683a 100644 --- a/boards/msbiot/Makefile.include +++ b/boards/msbiot/Makefile.include @@ -1,15 +1,13 @@ # we use shared STM32 configuration snippets INCLUDES += -I$(RIOTBOARD)/common/stm32/include -#define the default port depending on the host OS -PORT_LINUX ?= /dev/ttyUSB0 -PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) - -# setup serial terminal -include $(RIOTMAKE)/tools/serial.inc.mk +PROGRAMMER ?= openocd DEBUG_ADAPTER ?= stlink -STLINK_VERSION ?= 2 +ifeq (openocd,$(PROGRAMMER)) + STLINK_VERSION ?= 2 + PORT_LINUX ?= /dev/ttyUSB0 +endif -# this board uses openocd -include $(RIOTMAKE)/tools/openocd.inc.mk +# Setup of programmer and serial is shared between STM32 based boards +include $(RIOTMAKE)/boards/stm32.inc.mk