diff --git a/Makefile.include b/Makefile.include
index 0c0622888b9572b042141a59fa3d8784c8678e1d..dcbc2efc2569b883ea4c79318cfd7f10070578f4 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -287,6 +287,9 @@ term: $(filter flash, $(MAKECMDGOALS))
 		exit 1; }
 	$(TERMPROG) $(TERMFLAGS)
 
+list-ttys:
+	$(AD)$(RIOTBASE)/dist/tools/usb-serial/list-ttys.sh
+
 doc:
 	make -BC $(RIOTBASE) doc
 
diff --git a/boards/samr21-xpro/Makefile.include b/boards/samr21-xpro/Makefile.include
index e472d36b609a8aff01dccec6925e121c1b99d75d..db23d819ac38b00146f5c1191e581ba58cde32b4 100644
--- a/boards/samr21-xpro/Makefile.include
+++ b/boards/samr21-xpro/Makefile.include
@@ -16,8 +16,12 @@ include $(RIOTBOARD)/Makefile.include.serial
 # 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)"
-PORT_LINUX := $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL))
+    export OPENOCD_EXTRA_INIT += "-c cmsis_dap_serial $(SERIAL)"
+    SERIAL_TTY = $(shell $(RIOTBASE)/dist/tools/usb-serial/find-tty.sh $(SERIAL))
+    ifeq (,$(SERIAL_TTY))
+        $(error Did not find a device with serial $(SERIAL))
+    endif
+    PORT_LINUX := $(SERIAL_TTY)
 endif
 
 # this board uses openocd