Serial Terminal View with Eclipse Kepler

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 TermPuTTY, …) where Termite is my favorite one. But it is possible to extend Eclipse so it has its own Terminal view too :-).

Eclipse Terminal View

Eclipse Terminal View

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/

Installation

Use the menu Help > Install New Software and enter

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

as update site. Under ‘Mobile and Device Development’, select ‘Target Management Terminal’:

Installing Target Management Terminal

Installing 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.

http://rxtx.qbang.org/eclipse

Because recently that site has been often down, I have put a mirror on Sourceforge:

https://sourceforge.net/projects/mcuoneclipse/files/Eclipse%20Plugins/RxTx/

💡 This mirror has a .zip file so you can download install it from your local machine.

Alternatively, this Eclipse Update Site can be used:

archive.eclipse.org/tm/updates/rxtx/
Installing RXTX Plugins

Installing RXTX Plugins

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:

Opening Terminal View

Opening Terminal View

❗ Don’t select the ‘Terminals’ (with ‘s’) view: that’s something different.

This opens a Terminal view:

Terminal View

Terminal View

💡 You can open as many views as you want.

To configure the connection, click on the Settings button:

Terminal View Settings

Terminal View Settings

Change the settings to use a Serial connection:

Changing Settings to Serial

Changing Settings to Serial

Then you can configure your connection settings:

Terminal Connection Settings

Terminal 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:

Toggle Command File Input

Toggle Command File Input

❗ Under 64bit somehow the command input field was not showing up at the bottom of the view, but on the right side instead?

Problem under 64bit

Problem under 64bit

Summary

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 🙂

32 thoughts on “Serial Terminal View with Eclipse Kepler

  1. Slightly off topic, but not completely off topic: it would be very convenient (next time you visit the shell code) to add a feature such that the tab key repeated the previous command… to save typing, of course.

    Like

    • Hi Charles,
      I think this is not a feature of the target (the Shell component running on the microprocessor), but a feature of the terminal on the host? For example my Termite Terminal program already does this.

      Like

      • Hi Erich

        I have just downloaded Termite, and see it has a good command replay feature. I will play with it.

        I have used Tera Term for a long time. It does not have this feature, AFAIK, but other features I would be reluctant to do without. So I am not convinced that a basic “repeat last line” feature would not be a useful addition to Shell…

        Regards – Charles

        Like

  2. Hi Erich,
    I am not able to download the S/W from the first website, Can you help me out with the problem

    I am getting an error saying that

    Cannot complete the install because of a conflicting dependency.
    Software being installed: Target Management Terminal 3.3.100.201308290741 (org.eclipse.tm.terminal.sdk.feature.group 3.3.100.201308290741)
    Software currently installed: Remote System Explorer End-User Runtime 3.3.1.FSL_b22_4085-A1 (org.eclipse.rse.feature.group 3.3.1.FSL_b22_4085-A1)

    Like

      • Hi Erich,
        CW is throwing me an Error saying

        Some sites could not be found. See the error log for more detail.
        Unknown Host: rxtx.qbang.org/eclipse/content.xml
        rxtx.qbang.org
        No repository found at github.com/ErichStyger/mcuoneclipse/tree/master/EclipsePlugins/RxTx.

        Help me in deselecting the Source files.

        Like

    • Yes, on the microcontroller side you can use any baudrate, as long it is in the +/- 1.5% accuracy, and your microcontroller clock is fast enough. So for the KL25Z, make sure that you run with miximum clock speed (48 MHz).
      On the host side, make sure that you have a terminal program which allows to use such a unusual baud rate, e.g. putty.

      I hope this helps,
      Erich

      Like

      • Hi. My basic problem is I need a interrupt driven serial communications in KDS with PE but NOT using KSDK. Is it possible to modify ConsoleIO to use interrupts? I have installed the 03-FEB-2015 version of your PE components. Any suggestions on adding interrupt based communications?

        Thanks

        Like

        • Hi dale,
          I’m using the AsynchroSerial component, and this one offers interrupt capability. Basically the application sends data to to a buffer, and then this buffer is sent with interrupts, and data is received with interrupts. Make sure you allocate a buffer large enough for your application needs. You might look at my ‘Shell’ example projects on GitHub which is using that.

          Like

  3. Pingback: Serial Terminal View in Eclipse Luna | MCU on Eclipse

  4. This also worked on Luna (Windows) for me but the Luna repository (http://download.eclipse.org/releases/luna) lists under Mobile and Device Development:

    Target Management Terminal (Core SDK)
    Target Management Terminal (Deprecated)

    and I could only get it to work with the latter – the Deprecated version.
    When I chose the Core SDK version and installed RXTX no Terminal node appeared in the Show View treeview.
    I wonder if/when it might work with the non deprecated/Core SDK version because I presume that the deprecated version will disappear at some stage…?

    Like

  5. Dear Erich
    As always, we were very delighted to be in your presentation in the FTF
    Now we are trying to reproduce all you teach to us, with our students, and I have some questions
    I am using TASK LIST freertos, but I can’t see the runtime column, its blank.
    Do I need to do something extra?
    What are the steps to change the USB_MOUSE example to the FRDM K64 Board ?
    Thanks and regards from CD MEX
    RAUL

    Like

    • Hi Raul,
      in order to see the runtime statistics, you need to enable configUSE_TRACE_FACILITY plus configGENERATE_RUN_TIME_STATS.
      In my example I’m using the SysTick as the performance counter with
      #define configGENERATE_RUN_TIME_STATS_USE_TICKS 1 /* 1: Use the RTOS tick counter as runtime counter. 0: use extra timer */
      #define configGENERATE_RUN_TIME_STATS 1 /* 1: generate runtime statistics; 0: no runtime statistics */
      #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() /* nothing */ /* default: use Tick counter as runtime counter */
      unsigned int ulMainGetRunTimeCounterValue(void); /* prototype */
      #define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue() /* default: use Tick counter as runtime counter */
      and
      void vMainConfigureTimerForRunTimeStats(void) {
      }

      unsigned int ulMainGetRunTimeCounterValue(void) {
      return xTaskGetTickCountFromISR();
      }

      As for a USB example for the K64F board: I plan to write an article about this, but have not found the time yet.
      Erich

      Like

  6. Hi,
    thanks for the post.

    This bug: “Under 64bit somehow the command input field was not showing up at the bottom of the view, but on the right side instead?” seems to still exists, like two years later?

    I’m running a 4.5.0.v20150603 org.eclipse.platform…

    -arch
    x86_64

    Maybe it’s supposed to look like that.

    Kind regards

    Like

  7. Pingback: Using Serial Terminal and COM Support in Eclipse Oxygen and Neon | MCU on Eclipse

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.