A GUI tool for the Segger J-Link debugger
JLinkprogrammer is a GUI tool to facilitate using Segger's excellent
J-Link ARM/Renesas RX debugger and programmer on Apple Mac OS and Linux. For non-Windows users, Segger provides a bare-bones command line interface.Although it is functional and useable, it requires typing long init commands every time you want to debug.To make life a little easier, I wrote a GUI wrapper called JLinkProgrammer around Segger's libraries.
The tool is available for :
With JLinkProgrammer you can:
- write a .bin,.hex or .elf file to a Cortex M/A/R - Renesas RX - Microchip Pic32 target.
- erase the target flash.
- reset, start or halt the target
- start or stop the J-Link GDB server process. GDB (arm-none-eabi-gdb) itself must be run separately.
You can either start it from the command line, or wrap it up in DDD. Also, you will need to initialise it with
settings pertaining to the target and the J-Link GDB server. An example startup script for starting gdb
through DDD for debugging a STM32F207 target can be found here,
whereas an example arm-none-eabi-gdb init script can be found here.
These two scripts are complementary, ie the first script will indicate gdb to load and process the second
script at startup. (Re)connecting and resetting the target is done with the 'armtarget' command, and 'res(et)'
can be used to reset the target.
- start or stop the J-Link SWO viewer process, and redirection of the SWO output.
In order to use JLinkProgrammer, you must own a Segger J-Link. For non-commercial useage, a JLink-EDU will only cost you around EUR 50. Also, some development kits have a J-Link built-in. For example, the Energy Micro EFM32GG-STK3700 kit has a built in J-Link. Another development kit that has a Segger J-Link included is the Renesas RX63N Demonstration Kit. The Segger serial number, which is necessary for connecting, can be retrieved from inspecting the USB Host driver. On Apple, go to "about this Mac" and select "more information". My EFM32GG-STK3700 kit shows up like this and has a JLink serial number "440005949" :
On Linux, using "lsusb" produces a similar result.
When using J-Link, you must obtain and install the J-Link drivers from Segger separately.
Update 29-04-2016 Recently, Segger released support for modifiying the STLink V2 debugger (the debugger found on all STM32 development kits) to a J-Link debugger! This is great news, since now STM32 kits can be used (through J-Link) on Mac and Linux hosts with direct usage of the STLink interface.
The GNU GCC Toolchain for ARM Cortex-MJLinkProgrammer needs an object copy tool in order to convert .elf files into .bin files. It works with GCC's objcopy tool to perform this operation. Therefore, it is recommended (though not required to run JLinkProgrammer) to install a GCC based toolchain.
The best GCC-based toolchain for ARM Cortex is ARM's own GCC version, which can be downloaded without cost at GNU Tools for ARM Embedded Processors. Contrary to other toolchains such as Yagarto, Codesourcery or others, this toolchain WILL actually compile C/C++ floating point operations into ARM Cortex-M4 Floating Point instructions! The other tools will silently resort to soft float emulation, which defeats the whole purpose of using a Cortex-M4F.
The toolchain is available for Linux,Mac OS X and Windows. It will also run without any problems on FreeBSD through the Linux emulation layer.
Renesas RX600A good Renesas GNU toolchain can be found at KPIT GNU Tools.
Download and source code
JLinkProgrammer was tested with a J-Link EDU.
Installers can be downloaded from this location.
The source code files for this project cannot be made public due to the restricted nature of using Segger's SDK product. However, should you have questions regarding the usage of the SDK and you are a licensed SDK owner, I will be more than happy to answer any questions.
Release history :
01.04.2014 : 1.0 Initial release
20.06.2014 : 1.1 Bugfixes
25.07.2014 : 1.2 Bugfixes
30.08.2014 : 1.3 More bugfixes
10.09.2014 : 1.4 Incorporated new Segger drivers
22.10.2014 : 1.5 Starting DDD/GDB server method incorporated. Windows 7 x64 build added.
25.11.2014 : 1.6 STM32 chip id database expanded with L0 and F429/F439 series.
21.03.2015 : 1.7 Linked against 4.98 dylib. Toolbar added. Conversion between (elf/bin/hex) formats is now possible. Tested with Renesas RX63N Board. Serial Number field converted to a ComboBox for easier navigation.
27.07.2015 : 1.8 Uploading files to any memory location is now possible. Added support for STM32F746 target identification.
04.12.2015 : 1.9 Linked against 5.10b dylib/dll/so. Added support for STM32L476. Listing of targets and serial ids are now alphabetical. Added support for SWO frequency finder.
15.01.2016 : 2.0 Linked against 5.10g dylib/dll/so. Mac OS X version compiled for 10.9 (Mavericks) and up, for older Macs please use an older version. Folded the info ctrls into the notebook ctrl. Revamped support for SWO, which seems tricky on mac os x. Added support for non.localhost or localhost connections.
02.02.2016 : 2.1 Linked against 5.10i dylib/dll/so. Reworked the Linux installers, Debian .deb files are now correct. Also work on Locale settings, buttons now have system language settings instead of Dutch ones.
29.04.2016 : 2.2 Linked against 5.12.4 dylib/dll/so. Incorporated a J-Link finder function for adding J-Link serial numbers dynamically. Tested Segger J-Link support for STM32 STLink-V2 support with various STM32 Discovery boards with success.
13.09.2016: 2.3 Linked against 6.x.x dylib/dll/so. Improved recognition of jlink units (descriptions added) and editing and support for managing various programmers. Improved connection and file transfer functions. Reset handlers time setting option introduced. Various (smaller) bugs fixed.
13.10.2016: 2.3 Minor improvements introduced regarding STM32 unique ID number readout. (Mac/Linux) STM32Unlock routine can now be started from the GUI.
19.04.2017: 2.4 Added support for STM32F301x and STM32F412. Linked against 6.14 dll/so. Mac version not updated.