A serial port monitor plugin for xmake
Monitor the serial output of your embedded device directly from xmake
Introduction (中文)
This plugin adds a xmake monitor command that streams the output of a serial port to your terminal,
just like idf.py monitor or the Arduino serial monitor, but without any extra dependency.
- Auto-detects the connected serial port when it is not specified.
- Configurable baud rate, data bits, parity and stop bits.
- Works on macOS, Linux, BSD (via
stty) and Windows (via the .NETSystem.IO.PortsAPI).
Install it by name, it will be resolved from the xmake-repo index:
$ xmake plugin --install serial-monitorOr install it directly from this repository, either with the full git url or the github: shortcut:
$ xmake plugin --install https://github.com/xmake-io/serial-monitor-plugin.git
$ xmake plugin --install github:xmake-io/serial-monitor-pluginOr install it from a local clone:
$ git clone https://github.com/xmake-io/serial-monitor-plugin.git
$ xmake plugin --install serial-monitor-pluginYou can list all the installed plugins with:
$ xmake plugin --listAnd remove it with (the name is the one shown by --list, serial-monitor when it was installed
from the repository index, serial-monitor-plugin when it was installed from git or a local clone):
$ xmake plugin --remove serial-monitorList the available serial ports:
$ xmake monitor --list
the available serial ports:
/dev/cu.usbserial-0001Monitor the only connected port with the default baud rate (115200):
$ xmake monitor
monitoring /dev/cu.usbserial-0001 @ 115200 (Ctrl-C to exit)
Hello world!Specify the port and the baud rate explicitly:
$ xmake monitor --port=/dev/cu.usbserial-0001 --baud=9600Configure the serial frame format:
$ xmake monitor --databits=8 --parity=even --stopbits=1Press Ctrl-C to exit the monitor.
| Option | Default | Description |
|---|---|---|
-p, --port |
auto-detected | The serial port, e.g. /dev/cu.usbserial-0001 (macOS), /dev/ttyUSB0 (Linux), COM3 (Windows) |
-b, --baud |
115200 |
The baud rate |
-d, --databits |
8 |
The data bits: 5, 6, 7, 8 |
--parity |
none |
The parity: none, even, odd |
-s, --stopbits |
1 |
The stop bits: 1, 2 |
-l, --list |
List the available serial ports |
You can also see the full help with:
$ xmake monitor --help- Email: waruqi@gmail.com
- Homepage: xmake.io
- Community: Discord
Licensed under the Apache License 2.0.