Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serial-monitor-plugin

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 .NET System.IO.Ports API).

Installation

Install it by name, it will be resolved from the xmake-repo index:

$ xmake plugin --install serial-monitor

Or 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-plugin

Or install it from a local clone:

$ git clone https://github.com/xmake-io/serial-monitor-plugin.git
$ xmake plugin --install serial-monitor-plugin

You can list all the installed plugins with:

$ xmake plugin --list

And 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-monitor

Usage

List the available serial ports:

$ xmake monitor --list
the available serial ports:
  /dev/cu.usbserial-0001

Monitor 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=9600

Configure the serial frame format:

$ xmake monitor --databits=8 --parity=even --stopbits=1

Press Ctrl-C to exit the monitor.

Options

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

Contacts

License

Licensed under the Apache License 2.0.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages