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:
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.
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
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
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 have to install as well the RxTx plugins from
Restart Eclipse, and this completes the installation.
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 to use 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:
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 🙂
Thanks for the hint Erich. Very useful !.
However I just tried with MCUXpresso 10.0 and got an error “No software site found at http://download.eclipse.org/eclipse/releases/neon. Do you wish to edit the location ?”
I checked carefully and noticed that your initial directory shown above (http://download.eclipse.org/eclipse/releases/neon) perhaps should be just http://download.eclipse.org/releases/neon ?
yes, it should read http://download.eclipse.org/releases/neon.
I was jumping around with different URLs I have found, and missed to update that one in the article. It is fixed now.
Thanks for reporting!
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.
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.
I’m using Eclipse Oxygen R 32 bit (don’t ask) and when I install TM Terminal + RXTX, restart and create a TM Terminal view the only options are Local, SSH and Telnet – no serial option. Any ideas? Thanks.
It really might be a problem with your 32bit version. I know that in the past the 32bit support in RxTx was not working or not present.
Thanks Erich. Turns out that the problem is that somewhere along the line …\eclipse\configuration\org.eclipse.osgi\104\0\.cp\os\win32\x86\serial.dll is loaded and it has a dependency on the MinGW/MSYS libgcc_s_dw2-1.dll but this DLL is not bundled with the eclipse stuff. The eclipse log helped to pinpoint this as the problem.
If I download that DLL from here http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.7.2-1/libgcc-4.7.2-1-mingw32-dll-1.tar.lzma/download and drop the DLL into my eclipse folder and try again it works. This is with TM Terminal and TM Terminal Serial Connector Extension only installed (no RXTX). This is an off the shelf eclipse oxygen R 32 bit (i.e. I’m not building it myself or anything) so it’s a bug/omission. I think that there may be an issue open against it already which I will annotate if I can find it.
BTW – RXTX was working fine for me in Eclipse Luna 32 bit but it looks like it’s not longer needed once this missing runtime DLL dependency is satisfied.
Actually this is the bug that I came across yesterday which looks similar but is claimed to be fixed so maybe what I have found is something different? I need to check oxygen 1a and see if the problem still exists there. If it does I will log a new issue.
The problem persists in Oxygen 1A 32 bit so I have logged a bug against the TM Terminal:
Do you know if there is a way to select a custom Baud Rate? The default baud rates only go up to 115200. I need to use a baud rate higher than this for one of my targets but can’t see anyway to manually enter this. In older versions of Eclipse I could input my own custom baud rate rather than a drop down box. Its a pain having to use a putty terminal outside of Eclipse just for one specific target.
as far as I can tell, the latest version only supports fixed baud rates.
I contrib’ed a couple of months ago additional baud rates since we were in the same boat. Those should make it to the O2 release. Otherwise we had some odd non-standard baud rates so I have a new contrib (pending) that will allow you to enter. So providing the underlying drivers support it, you should be fine.