Tips & Tricks

Serial Port Monitor Plugin for Embedded Developers in CLion

The ability to monitor any data passing through the serial ports of your computer is useful for development, testing, and debugging your COM-based programs and devices. Today, we’re happy to announce a plugin that provides the Serial Port Monitor tool window. It allows you to communicate with serial devices like Arduino right from CLion.

The plugin was originally released by Dmitry Cherkas, and then the CLion team took over after coming to an agreement with the author. The plugin is open-source under the Apache License – you can find the source code on our GitHub.

DOWNLOAD CLION

Key benefits

Imagine you’re working with several serial devices and want to connect to the COM ports you’re using for communicating with the devices. And let’s say you need to monitor the data transmitted in and out of a specific COM port. Now you no longer need any additional utilities for that – simply install the plugin to CLion.

CLion’s serial port monitor is easy to configure and connect to the port in just one click. The flexible UI allows you to rearrange the tabs in a way that suits your workflow. The port console supports many modes and encodings. Let’s take a closer look!

Simultaneous multiple connections

The plugin operates on the basis of pre-configured profiles. A profile contains a saved record of the port name and all the necessary parameters, like encoding, baud rate, stop bits, and others.

The plugin supports multiple profiles, so you can configure all available ports and simultaneously monitor all the ports you need to. This is handy when your project includes multiple devices that communicate with each other: wireless systems, IoT networks, mesh networks of different types, etc. It’s possible to have several profiles for the same port with different parameters for different projects.

Drag and drop tabs

As you can see, you can drag each tab by its title to rearrange the tabs inside the tool window and, thus make several consoles visible simultaneously.

Output console

In the connection output console, you can adjust parameters on the fly, type in data, clean the text window, pause, or disconnect the port. The console supports:

  • Multibyte encodings, including UTF-8
  • Correct handling of CR/LF line breaks
  • Local echoing
  • ANSI coloring

The console output tab is configurable and allows you to enable HEX along with the ASCII view, scroll to the end of the output, and pause and clean the data log. 

Output console

How to enable Serial Port Monitor and start viewing the data

Install the plugin into CLion in Settings/Preferences | Plugins. Once you’ve done that, you’ll get a new tool window in View | Tool Windows | Serial Connections:

Tool window

In the tool window, you’ll find the list of saved connection profiles and the list of currently available ports (connected devices). Selecting a profile shows its saved parameters, and selecting a port shows the default settings, which can also be adjusted.

Encoding

To create a profile, select an available port and click Create profile….

Serial ports and profiles

You can also clone existing profiles. Profiles’ port names can either be selected from the list of ports or entered manually. The latter is helpful when working with Linux symlinks, for instance.
Select an available port or a profile to configure the settings and click Connect to start monitoring the transferred data.

image description