Skip to content

makefiles/tools: enhance miniterm path finding in serial.inc.mk [backport 2026.04]#22219

Merged
crasbe merged 3 commits into
RIOT-OS:2026.04-branchfrom
AnnsAnns:backport/2026.04/pr/miniterm
Apr 29, 2026
Merged

makefiles/tools: enhance miniterm path finding in serial.inc.mk [backport 2026.04]#22219
crasbe merged 3 commits into
RIOT-OS:2026.04-branchfrom
AnnsAnns:backport/2026.04/pr/miniterm

Conversation

@AnnsAnns

Copy link
Copy Markdown
Member

Backport of #22208

Contribution description

Apparently miniterm likes to change the executable name. In very old versions it was miniterm.py, then it was miniterm and now (version 3.5 and higher) it is pyserial-miniterm.

This change enhances the path discovery to select the right one.

Testing procedure

Make sure you have (a recent version of) pyserial installed:

cbuec@W11nMate:~/RIOTstuff/riot-vanilla/RIOT$ pip show pyserial
Name: pyserial
Version: 3.5
Summary: Python Serial Port Extension
Home-page: https://github.com/pyserial/pyserial
Author: Chris Liechti
Author-email: cliechti@gmx.net
License: BSD
Location: /usr/lib/python3/dist-packages
Requires: 
Required-by: adafruit-nrfutil

Run your favorite application with RIOT_TERMINAL=miniterm.

Behavior on master:

cbuec@W11nMate:~/RIOTstuff/riot-vanilla/RIOT$ RIOT_TERMINAL=miniterm BOARD=nrf52840dk make -C tests/sys/shell flash term -j
make: Entering directory '/home/cbuec/RIOTstuff/riot-vanilla/RIOT/tests/sys/shell'
Building application "tests_shell" for "nrf52840dk" with CPU "nrf52".

"make" -C /home/cbuec/RIOTstuff/riot-vanilla/RIOT/pkg/cmsis/ 
...
J-Link>exit

Script processing completed.

Terminal program miniterm is required but not found in PATH.  Aborting.
make: *** [/home/cbuec/RIOTstuff/riot-vanilla/RIOT/tests/sys/shell/../../../Makefile.include:869: term] Error 1
make: Leaving directory '/home/cbuec/RIOTstuff/riot-vanilla/RIOT/tests/sys/shell'

Behavior with this PR:

cbuec@W11nMate:~/RIOTstuff/riot-vanilla/RIOT$ RIOT_TERMINAL=miniterm BOARD=nrf52840dk make -C tests/sys/shell flash term -j
make: Entering directory '/home/cbuec/RIOTstuff/riot-vanilla/RIOT/tests/sys/shell'
Building application "tests_shell" for "nrf52840dk" with CPU "nrf52".

"make" -C /home/cbuec/RIOTstuff/riot-vanilla/RIOT/pkg/cmsis/ 
...
J-Link>exit

Script processing completed.

pyserial-miniterm --eol LF "/dev/ttyACM0" "115200"  
--- Miniterm on /dev/ttyACM0  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
main(): This is RIOT! (Version: 2026.04-devel-410-gecc128-pr/miniterm)
test_shell.
>

Issues/PRs references

Found while testing #22207.

Declaration of AI-Tools / LLMs usage:

AI-Tools / LLMs that were used are:

  • none

@AnnsAnns AnnsAnns added the Area: build system Area: Build system label Apr 28, 2026
@AnnsAnns
AnnsAnns requested a review from aabadie as a code owner April 28, 2026 09:31
@AnnsAnns AnnsAnns added the Area: cpu Area: CPU/MCU ports label Apr 28, 2026
@AnnsAnns AnnsAnns added the Area: doc Area: Documentation label Apr 28, 2026
@AnnsAnns
AnnsAnns requested a review from jia200x as a code owner April 28, 2026 09:31
@AnnsAnns AnnsAnns added the Area: examples Area: Example Applications label Apr 28, 2026
@AnnsAnns
AnnsAnns requested a review from gschorcht as a code owner April 28, 2026 09:31
@AnnsAnns AnnsAnns added Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: ESP Platform: This PR/issue effects ESP-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Apr 28, 2026
@AnnsAnns
AnnsAnns requested a review from crasbe April 28, 2026 09:32
@riot-ci

riot-ci commented Apr 28, 2026

Copy link
Copy Markdown

Murdock results

✔️ PASSED

58a4609 treewide: update documentation regarding miniterm

Success Failures Total Runtime
1 0 1 01m:19s

Artifacts

@crasbe crasbe added State: waiting for other PR State: The PR requires another PR to be merged first and removed State: waiting for other PR State: The PR requires another PR to be merged first labels Apr 28, 2026
@crasbe

crasbe commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Please rebase :)

@crasbe crasbe added the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Apr 29, 2026
@AnnsAnns
AnnsAnns enabled auto-merge April 29, 2026 09:52
@AnnsAnns AnnsAnns removed the State: needs rebase State: The codebase was changed since the creation of the PR, making a rebase necessary label Apr 29, 2026
@AnnsAnns
AnnsAnns force-pushed the backport/2026.04/pr/miniterm branch from d013034 to c9fa913 Compare April 29, 2026 09:53
@AnnsAnns
AnnsAnns force-pushed the backport/2026.04/pr/miniterm branch from c9fa913 to 58a4609 Compare April 29, 2026 09:59
@github-actions github-actions Bot removed Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: network Area: Networking Area: core Area: RIOT kernel. Handle PRs marked with this with care! Area: pkg Area: External package ports Area: drivers Area: Device drivers Area: BLE Area: Bluetooth Low Energy support Area: CI Area: Continuous Integration of RIOT components Area: LoRa Area: LoRa radio support Area: boards Area: Board ports Area: SAUL Area: Sensor/Actuator Uber Layer Area: CoAP Area: Constrained Application Protocol implementations Area: sys Area: System Area: Kconfig Area: Kconfig integration labels Apr 29, 2026
@AnnsAnns

Copy link
Copy Markdown
Member Author

My brain instantly rebased based on master, we, ofc, don't want to rebase on master here. Fixed now 👍

@AnnsAnns
AnnsAnns enabled auto-merge April 29, 2026 10:05
@crasbe
crasbe disabled auto-merge April 29, 2026 10:05
@AnnsAnns

Copy link
Copy Markdown
Member Author

Crasbe doesn't want this to be merged 🤨

@crasbe

crasbe commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

We'll have to queue this manually once the next PR on the master queue is merged, otherwise it'll have to be aborted and re-queued anyways.

@AnnsAnns

Copy link
Copy Markdown
Member Author

Oh, Murdock can't handle multiple merge queues?

@crasbe

crasbe commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Oh, Murdock can't handle multiple merge queues?

Yes and no, since this is on a different branch, both will be in the Murdock list and GitHub counts that as "running". With our current CI situation, having two merges running at the same time will result in the second merge being cancelled due to inactivity after 6 hours.

So this PR will have to be added manually to the merge queue so that we don't hit that 6h limit, so around ~2 hours after the first merge started.

@crasbe

crasbe commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

That's what I did yesterday/tonight with the Docker PR too before going to sleep 😴

@AnnsAnns

Copy link
Copy Markdown
Member Author

That's what I did yesterday/tonight with the Docker PR too before going to sleep 😴

True commitment to the craft

@crasbe
crasbe added this pull request to the merge queue Apr 29, 2026
Merged via the queue into RIOT-OS:2026.04-branch with commit f1e99ba Apr 29, 2026
26 checks passed
@AnnsAnns AnnsAnns added this to the Release 2026.04 milestone May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: examples Area: Example Applications Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Platform: ESP Platform: This PR/issue effects ESP-based platforms Process: release backport Integration Process: The PR is a release backport of a change previously provided to master Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants