From 322523261cf88b795ef35aa010847f86b7a156ec Mon Sep 17 00:00:00 2001 From: daniel-k Date: Tue, 16 Jun 2015 15:48:05 +0200 Subject: [PATCH] samr21: fix SERIAL environment varible to select board when flashing --- boards/samr21-xpro/Makefile.include | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/boards/samr21-xpro/Makefile.include b/boards/samr21-xpro/Makefile.include index 1cd31bd072..9610f28fa8 100644 --- a/boards/samr21-xpro/Makefile.include +++ b/boards/samr21-xpro/Makefile.include @@ -11,6 +11,13 @@ include $(RIOTBOARD)/$(BOARD)/Makefile.dep # setup serial terminal include $(RIOTBOARD)/Makefile.include.serial +# Add board selector (USB serial) to OpenOCD options if specified. +# Use /dist/tools/usb-serial/list-ttys.sh to find out serial number. +# Usage: SERIAL="ATML..." BOARD="samr21-xpro" make flash +ifneq (,$(SERIAL)) +export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)" +endif + # this board uses openocd include $(RIOTBOARD)/Makefile.include.openocd