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?
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):
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:
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:
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?
I can copy the content of the folder into the ‘segger’ folder of my Kinetis Design Studio folder:
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}
Two variables can be inspected with pressing the ‘Variables…’ button in that dialog:
Using the ‘Edit Variables’ button shows me the details:
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:
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
- Segger J-Link Downloads: https://www.segger.com/jlink-software.html
- Kinetis Design Studio: http://www.freescale.com/kds
- Command Line Programming with Segger GDB: Command Line Programming and Debugging with GDB
- Batch Programming with Segger GDB: Batch Programming with GDB: Segger J-Link and P&E Multilink
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?
LikeLike
Hi Liviu,
no, that panel does not exist for KDS (it does if I install your latest plugin e.g. in Mars). Currently your latest plugin version cannot be installed in KDS due a dependency on a patch :-(.
LikeLike
> dependency on a patch…
didn’t you fix it yet?
LikeLike
No, it is not fixed.
LikeLike
As a side note: can a kwickstick K40 board be used as j-link programmer?
LikeLike
Hi Alex,
yes, it could, at least I have seen some articles I think in the Freescale forums. But I have not done that myself with the one I have.
Erich
LikeLike
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.
LikeLike
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.
LikeLike
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.
LikeLike