Using Serial Terminal and COM Support in Eclipse Oxygen and Neon

Most of the time I’m using a dedicated terminal program like Termite or PuTTY to connect to a board using virtual or non-virtual COM port. Another way is to use the Eclipse built-in Terminal view: that way no extra program is needed to communicate with a real or virtual COM port to my target device:

Terminal Command Output

Terminal Command Output

Traditionally, adding Serial Terminal support to Eclipse seems to be an endless source of pain (see links at the end of this article). Mostly because of the underlying Java connection to the serial ports. The good news is that with Eclipse Oxygen things can work out-of-the box. For other Eclipse version some extra plugins might be necessary.

Installation

With Eclipse Oxygen (4.7.0, I’m using the 64-bit version), no extra plugins need to be installed :-).

Eclipse Oxygen Version

Eclipse Oxygen Version

Other Eclipse distributions need extra plugins installed, if they do not have the Terminal view included, e.g. the NXP MCUXpresso IDE 10.0.2 (MCUXpresso IDE v10.0.2 [Build 411] [2017-07-11]) which is Eclipse Neon (4.6) based.

For Eclipse Neon, use the menu Help > Install New Software and enter

http://download.eclipse.org/releases/neon

as update site.

If getting an error loke this:

Unable to read repository at http://download.eclipse.org/releases/neon.
Unable to read repository at http://download.eclipse.org/releases/neon.
Unable to read repository at http://download.eclipse.org/releases/neon/201703141400.
Input is not in the XZ format
Unable to read repository

Unable to read repository

Then the following fix worked for me:

  1. Close Eclipse
  2. Delete the following folder: <eclipse installation folder>\p2\org.eclipse.equinox.p2.core\cache
  3. Delete the following folder: <eclipse installation folder>\p2\org.eclipse.equinox.p2.repository\cache
  4. Start Eclipse

Then install the ‘TM Terminal’ plugin:

TM Terminal Plugin Installation

TM Terminal Plugin Installation

To have the COM ports showing up, I have to install as well the RxTx plugins from

http://rxtx.qbang.org/eclipse/
rxtx runtime

rxtx runtime

Restart Eclipse, and this completes the installation.

Usage

Use the menu Window > Show View > Terminal to open a Terminal view:

Show View Terminal

Show View Terminal

In the Terminal view, use the ‘Open a Terminal’ button:

Open a terminal

Open a terminal

In the dialog, select ‘Serial Terminal’ and configure the serial port with baud rate.

Launch Terminal

Launch Terminal

Press OK, and it opens a connection.

I recommend to use the ‘Toggle Command Input’ button which adds an edit box to enter text:

Toggle Command Input

Toggle Command Input

The field has a ‘history’ function: using cursor-up or down I can go through the previous commands:

Terminal Command Output

Terminal Command Output

Use the close connection button to close a connection:

Summary

With Eclipse Oxygen a serial terminal connection using a COM port works out of the box. For earlier Eclipse versions I have to install extra plugins plus the RxTx plugin. With this, I’m able to use a terminal connection to my boards within Eclipse without the need for an extra terminal program.

Happy COMmunicating 🙂

Links

 

Advertisements

4 thoughts on “Using Serial Terminal and COM Support in Eclipse Oxygen and Neon

  1. I used this for a while, but eventually found I liked using PuTTY better. Not that PuTTY is my favorite – SecureCRT has a nicer interface IMO but my old copy can’t handle 250,000 baud. A while back I started using ANSI color codes in my debug output, too, and I don’t think the build-in terminal does color.

    Like

    • Yes, other terminal programs have more features and this built-in one in Eclipse is a rather basic one. For example it does not support the ANSI colors or other fancy features. Using PuTTY/etc has the other advantage that they can be used outside of Eclipse (e.g. if I’m not developing with it). But for smaller things the build-in comes handy.

      Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s