Updating Segger Tools in Eclipse Kinetis Design Studio

Segger releases often new application and firmware updates. If I install an IDE like the Freescale Kinetis Design Studio, it comes with that firmware version available at that time. How to take advantage of a new Segger release?

Segger Download Page

Segger Download Page

Outline

When Kinetis Design Studio was released back in May 2015, it included the Segger version V4.98b of Segger firmware and tools. This article is about to update to a newer version. The same approach works as well for other Eclipse IDE’s using the GNU ARM Eclipse plugins.

J-Link Download and Installation

To to https://www.segger.com/jlink-software.html and download the latest version (Windows, Mac, Linux) (v5.02 at the time of this writing):

J-Link Download (Windows)

J-Link Download (Windows)

Then run the setup with the default settings. It is possible to have multiple versions of the Segger software installed, each will be in its own sub-folder. E.g. for V5.02 on Windows it is

C:\Program Files (x86)\SEGGER\JLink_V502

On Windows, the Segger J-Link installer is able to detect various tool installations. To my knowledge it checks entries in the Windows Registry to know the installations. In that dialog, I can select which ones I would like to update:

Segger J-Link Toolchain Detection

Segger J-Link Toolchain Detection

Manually Updating Segger Files

On non-windows machines or if that thing with the registry variable does not work, it is still very easy to update KDS. Or use the following approach if you want to keep multiple versions.

The Segger files are in the ‘segger’ directory of the Kinetis Design Studio Installation:

Segger Files inside KDS

Segger Files inside KDS

So I can update that folder with a new Segger version. I recommend to make a backup of the folder first.

Remember the path where the Segger J-Link installer has installed the files?

Segger Files in Default Installation Folder

Segger Files in Default Installation Folder

I can copy the content of the folder into the ‘segger’ folder of my Kinetis Design Studio folder:

Updated Segger Files

Updated Segger Files

Eclipse

Using the GNU ARM Eclipse plugins, how does the plugin find the Segger GDB binaries? By default, the following path to executable using Eclipse variables is used in the launch configuration settings of the debugger:

${jlink_path}/${jlink_gdbserver}
Path to Segger Executable

Path to Segger Executable

Two variables can be inspected with pressing the ‘Variables…’ button in that dialog:

Variables View

Variables View

Using the ‘Edit Variables’ button shows me the details:

jlink_gdbserver and jlink_path

jlink_gdbserver and jlink_path

Here again I can see that it is using the ‘segger’ folder inside my Eclipse installation  as ${eclipse_home} points to the ‘eclipse’ sub-folder of my KDS.

If for whatever reason I would like to use the earlier version of the Segger GDB, I can create a new variable or using my backup folder that way:

Using my backup version

Using my backup version

Summary

Sometimes I want to use a newer version of the Segger J-Link software. It is easy to update an existing Eclipse IDE installation. For Kinetis Design Studio, the ‘segger’ sub-folder of the KDS installation folder does need to get updated.

Happy Seggering 🙂

Links

9 thoughts on “Updating Segger Tools in Eclipse Kinetis Design Studio

  1. Manually updating string variables was made obsolete by a new Preferences -> Run/Debug -> SEGGER J-Link page. Could you check if this works properly in KDS too?

    Like

  2. BTW, are the advantages of using a custom install folder for SEGGER below the KDS_x.y.z folder really worth the effort of further maintaining it?

    For future KDS releases I would suggest to re-consider the option of leaving the SEGGER install in it’s original location.

    FYI, the latest version of the J-Link/OpenOCD/QEMU debug plug-ins (which you cannot currently use because of the wrong KDS dependency), have a more elaborate mechanism to automatically configure the install path, perhaps this might be useful for KDS too.

    Like

    • You you put together your own IDE, then yes, you obviously would install the segger tools wherever it would make sense. Having it in the default location might be a good idea for sharing the files.
      Many users especially in the automotive industry need to have the tools put into a version control system. For this, having all the tools in an IDE installation folder is what they typically want/need/do.
      Additionally, having the Segger files delivered and inside the IDE ensures that this is the setup which had been tested. Same arguments for the toolchain too, btw.

      Like

      • I think that the decision to install specific tools inside a common folder instead of the standard location should be under user responsibility. I fully understand that in special cases it is mandatory for all tools to be put into VCS, but I doubt that this is the main use case.

        if I remember right, Infineon DAVE installs some tools in the Eclipse folder, but the J-Link software is installed using the standard SEGGER setup (the DAVE setup starts the SEGGER setup as a subprocess), so the user has the choice to install it where it needs.

        A smart setup, with clear explanations of the choices and their consequences, plus standard defaults, might be more friendly for the average users, and still allow special users to create special configurations, to be put into VCS.

        I personally appreciate tools that give me reasonable choices, and hate tools that assume their authors always know my needs better than myself.

        Like

What do you think?

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