Skip to content

Commit

Permalink
Merge #19444
Browse files Browse the repository at this point in the history
19444: makefiles/tools/serial.inc.mk: Handle new miniterm versions r=maribu a=MrKevinWeiss



### Contribution description

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.

### Testing procedure

Take any board with any newish version of Ubuntu and run
```
make -C flash test examples/micropython
```

If you have `miniterm.py` in `PATH` or if it is `miniterm` both should work.

### Issues/PRs references



Co-authored-by: MrKevinWeiss <[email protected]>
  • Loading branch information
bors[bot] and MrKevinWeiss authored Apr 4, 2023
2 parents 985a38c + 6d72903 commit d6dc3a1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion makefiles/tools/serial.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6dc3a1

Please sign in to comment.