From 6d729033e51ce1598d09d39ea39cd989f19e099d Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Mon, 3 Apr 2023 13:15:18 +0200 Subject: [PATCH] makefiles/tools/serial.inc.mk: Handle new miniterm versions While testing examples/micropython I notice that the default of miniterm.py is actually miniterm. To simplify user setups, this checks for miniterm.py first then falls back to miniterm. --- makefiles/tools/serial.inc.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/makefiles/tools/serial.inc.mk b/makefiles/tools/serial.inc.mk index cb6e768a46..8389e42167 100644 --- a/makefiles/tools/serial.inc.mk +++ b/makefiles/tools/serial.inc.mk @@ -53,7 +53,13 @@ else ifeq ($(RIOT_TERMINAL),picocom) TERMPROG ?= picocom TERMFLAGS ?= --nolock --imap lfcrlf --baud "$(BAUD)" "$(PORT)" else ifeq ($(RIOT_TERMINAL),miniterm) - TERMPROG ?= miniterm.py + # Check if miniterm.py is available in the path, if not use just miniterm + # since new versions will only have miniterm and not miniterm.py + ifeq (,$(shell command -v miniterm.py 2>/dev/null)) + TERMPROG ?= miniterm + else + TERMPROG ?= miniterm.py + endif # The RIOT shell will still transmit back a CRLF, but at least with --eol LF # we avoid sending two lines on every "enter". TERMFLAGS ?= --eol LF "$(PORT)" "$(BAUD)" $(MINITERMFLAGS)