Using Serial Terminal and COM Support in Eclipse Oxygen and Neon
Wish you had a terminal connection to your board within Eclipse without the need for an extra terminal program? Here's how to do it with Eclipse Oxygen and Neon.
Join the DZone community and get the full member experience.
Join For FreeMost of the time, I use a dedicated terminal program like Termite or PuTTY to connect to a board using a 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 with my target device:
Traditionally, adding Serial Terminal support to Eclipse seems to be an endless source of pain (see the links at the end of this article). That's 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 versions, 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!
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 the update site.
If you get an error like 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
...then the following fix worked for me:
- Close Eclipse
- Delete the following folder: <eclipse installation folder>\p2\org.eclipse.equinox.p2.core\cache
- Delete the following folder: <eclipse installation folder>\p2\org.eclipse.equinox.p2.repository\cache
- Start Eclipse
Then install the ‘TM Terminal’ plugin:
To have the COM ports showing up, I also have to install the RxTx plugins from:
http://rxtx.qbang.org/eclipse/
Restart Eclipse, and this completes the installation.
Usage
Use the menu Window > Show View > Terminal to open a Terminal view:
In the Terminal view, use the ‘Open a Terminal’ button:
In the dialog, select ‘Serial Terminal’ and configure the serial port with baud rate.
Press OK, and it opens a connection.
I recommend using the ‘Toggle Command Input’ button, which adds an edit box to enter text:
The field has a ‘history’ function: using cursor-up or down, I can go through the previous commands:
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
Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments