Nearly all of my projects have built-in command line support: using a serial connection, I can send commands or inspect the system status. For this I have my command line Shell which works over serial-to-Bluetooth, serial-to-USB, USB CDC or with a physical serial (COM) port. But what I need on the host system is a Terminal program: I can use either an external program. There are many ones available (Tera Term, PuTTY, …) where Termite is my favorite one. But it is possible to extend Eclipse so it has its own Terminal view too :-).
Host Support, and a Warning
A note of warning here: It looks like Serial Terminal support in Eclipse can be challenging! I’m using Windows 7 64bit, but I was not able to get it working with the 64bit Eclipse Kepler. It worked (with some UI issues) in 32bit Eclipse on Windows 7 64bit. It seems that only the 32bit Eclipse on a 32bit Windows platform works smoothly with the Terminal view. Even Linux is not free of problems: if you want to use the Terminal view in Linux, please check out this post by Karibe: http://karibe.co.ke/2014/03/eclipse-kepler-terminal-plugin-serial-port-console-in-linux/
Use the menu Help > Install New Software and enter
as update site. Under ‘Mobile and Device Development’, select ‘Target Management Terminal’:
Then go through the installation process, and at the end you are asked to restart Eclipse.
There is a second download needed to have the Terminal working with serial ports.
Because recently that site has been often down, I have put a mirror on Sourceforge:
💡 This mirror has a .zip file so you can download install it from your local machine.
Alternatively, this Eclipse Update Site can be used:
Then go through the installation process, with a restart of Eclipse at the end.
Using the Terminal View
To open/add the new Terminal view, use the menu Window > Show View > Other. Select the Terminal view under the Terminal group:
❗ Don’t select the ‘Terminals’ (with ‘s’) view: that’s something different.
This opens a Terminal view:
💡 You can open as many views as you want.
To configure the connection, click on the Settings button:
Change the settings to use a Serial connection:
Then you can configure your connection settings:
❗ I have several seconds delay on Windows 7 64bit (with 32bit Eclipse) until the dialog shows up. The other thing I think is problematic are high COM port numbers (I things like COM80): using lower COM port numbers (below 20?) seems to cause less issues.
There is a button to toggle the command input field. Alternatively I can (blindly) type text into the view and hit enter:
❗ Under 64bit somehow the command input field was not showing up at the bottom of the view, but on the right side instead?
Having a terminal view inside Eclipse is a very useful thing, so no other terminal program is needed. On the other end, you might find specialized external terminals still valuable, as they offer different sets of options and features. As the Terminal view is not working for me inside the 64bit Eclipse version, I continue to use an external terminal for my serial connections. But for 32bit users the built-in one in Eclipse can be a good alternative.
Happy Terminaling 🙂