Specifications written in this document are believed to be accurate, but are not guaranteed to be entirely free of error. The information in this manual is subject to
change for functional or performance improvements without notice. Please make sure
your manual is the latest edition. While the information herein is assumed to be
accurate, SEGGER Microcontroller GmbH & Co. KG (the manufacturer) assumes no
responsibility for any errors or omissions. The manufacturer makes and you receive
no warranties or conditions, express, implied, statutory or in any communication with
you. The manufacturer specifically disclaims any implied warranty of merchantability
or fitness for a particular purpose.
Copyright notice
You may not extract portions of this manual or modify the PDF file in any way without
the prior written permission of the manufacturer. The software described in this document is furnished under a license and may only be used or copied in accordance
with the terms of such a license.
Chapter "Support and FAQs"
Section "Frequently Asked Questions" updated
38080618AG
Chapter "Reset strategies"
Section "Cortex-M3 specific reset strategies"
updated.
Chapter "Reset strategies"
37080617AG
Section "Cortex-M3 specific reset strategies"
updated.
Chapter "Hardware"
Section "Differences between different versions"
36080530AG
updated.
Chapter "Working with J-Link and J-Trace"
Section "Cortex-M3 specific reset strategies"
added.
Chapter "J-Link and J-Trace related software"
35080215AG
Section "J-Link software and documentation
package in detail" updated.
Chapter "J-Link and J-Trace related software"
Section "J-Link TCP/IP Server (Remote J-Link /
J-Trace use)" updated.
Chapter "Working with J-Link and J-Trace"
34080212AG
Section "Command strings" updated.
Chapter "Flash download and flash breakpoints"
Section "Introduction" updated.
Section "Licensing" updated.
Section "Using flash download and flash
breakpoints with different debuggers" updated.
Chapter "Flash download and flash breakpoints"
added
"Installating the J-Link USB driver" removed.
"Installing the J-Link software and documentation
pack" added.
Subchapter "List of OEM products" updated.
"OS support" updated
This document describes J-Link and J-Trace. It provides an overview over the major
features of J-Link and J-Trace, gives you some background information about JTAG,
ARM and Tracing in general and describes J-Link and J-Trace related software packages available from Segger. Finally, the chapter Support and FAQs on page 259 helps
to troubleshoot common problems.
11
For simplicity, we will refer to J-Link ARM as J-Link in this manual.
For simplicity, we will refer to J-Link ARM Pro as J-Link Pro in this manual.
Typographic conventions
This manual uses the following typographic conventions:
StyleUsed for
BodyBody text.
Keyword
ReferenceReference to chapters, tables and figures or other documents.
GUIElementButtons, dialog boxes, menu names, menu commands.
Table 1.1: Typographic conventions
Text that you enter at the command-prompt or that appears on the
display (that is system functions, file- or pathnames).
SEGGER Microcontroller GmbH & Co. KG develops
and distributes software development tools and ANSI C
software components (middleware) for embedded systems in several industries such as telecom, medical
technology, consumer electronics, automotive industry
and industrial automation.
SEGGER’s intention is to cut software development
time for embedded applications by offering compact flexible and easy to use middleware,
allowing developers to concentrate on their application.
Our most popular products are emWin, a universal graphic software package for embedded applications, and embOS, a small yet efficient real-time kernel. emWin, written
entirely in ANSI C, can easily be used on any CPU and most any display. It is complemented by the available PC tools: Bitmap Converter, Font Converter, Simulator and
Viewer. embOS supports most 8/16/32-bit CPUs. Its small memory footprint makes it
suitable for single-chip applications.
Apart from its main focus on software tools, SEGGER develops and produces programming
tools for flash microcontrollers, as well as J-Link, a JTAG emulator to assist in development, debugging and production, which has rapidly become the industry standard for
debug access to ARM cores.
Corporate Office:
http://www.segger.com
EMBEDDED SOFTWARE
(Middleware)
emWin
Graphics software and GUI
emWin is designed to provide an efficient, processor- and display controller-independent graphical user
interface (GUI) for any application that
operates with a graphical display.
Starterkits, eval- and trial-versions are
available.
embOS
Real Time Operating System
embOS is an RTOS designed to offer
the benefits of a complete multitasking
system for hard real time applications
with minimal resources. The profiling
PC tool embOSView is included.
emFile
File system
emFile is an embedded file system with
FAT12, FAT16 and FAT32 support.
emFile has been optimized for minimum memory consumption in RAM and
ROM while maintaining high speed.
Various Device drivers, e.g. for NAND
and NOR flashes, SD/MMC and CompactFlash cards, are available.
United States Office:
http://www.segger-us.com
SEGGER TOOLS
Flasher
Flash programmer
Flash Programming tool primarily for microcontrollers.
J-Link
JTAG emulator for ARM cores
USB driven JTAG interface for ARM cores.
J-Trace
JTAG emulator with trace
USB driven JTAG interface for ARM cores with
Trace memory. supporting the ARM ETM (Embedded Trace Macrocell).
J-Link / J-Trace Related Software
Add-on software to be used with SEGGER’s industry standard JTAG emulator, this includes flash
programming software and flash breakpoints.
emUSB
USB device stack
A USB stack designed to work on any
embedded system with a USB client
controller. Bulk communication and
most standard device classes are supported.
To use J-Link or J-Trace you need a host system running Windows 2000 or later. For a
list of all operating systems which are supported by J-Link, please refer to SupportedOS on page 21.
Target System
A target system with a supported CPU is required.
You should make sure that the emulator you are looking at supports your target CPU.
For more information about which J-Link features are supported by each emulator,
please refer to Model comparison on page 23.
J-Link / J-Trace is available in different variations, each designed for different purposes / target devices. Currently, the following models of J-Link / J-Trace are available:
•J-Link ARM
•J-Link Ultra
•J-Link ARM Pro
•J-Trace ARM
•J-Trace for Cortex-M
In the following, the different J-Link / J-Trace models are described and the changes
between the different hardware versions of each model are listed. To determine the
hardware version of your J-Link / J-Trace, the first step should be to look at the label
at the bottom side of the unit. J-Links / J-Traces have the hardware version printed
on the back label.
If this is not the case with your J-Link / J-Trace, start JLink.exe. As part of the initial
message, the hardware version is displayed.
Software features are features implemented in the software primarily on the host.
Software features can either come with the J-Link or be added later using a license
string from Segger.
Most IDEs come with its own flashloaders, so in most cases this feature is not
essential for debugging your applications in flash. The J-Link flash download
(FlashDL) feature is mainly used in debug environments where the debugger does
not come with an own flashloader (for example, the GNU Debugger). For more information about how flash download via FlashDL works, please refer to Flash download
on page 143.
2
In order to use the flash breakpoints with J-Link no additional license for flash
download is required. The flash breakpoint feature allows setting an unlimited number of breakpoints even if the application program is not located in RAM, but in flash
memory. Without this feature, the number of breakpoints which can be set in flash is
limited to the number of hardware breakpoints (typically two for ARM 7/9, up to six
for Cortex-M) For more information about flash breakpoints, please refer to Flashbreakpoints on page 155.
J-Link is a JTAG emulator designed for ARM cores. It connects
via USB to a PC running Microsoft Windows 2000 or later. For a
complete list of all operating systems which are supported,
please refer to Supported OS on page 21. J-Link has a built-in
20-pin JTAG connector, which is compatible with the standard
20-pin connector defined by ARM.
1.3.2.1Additional features
•Direct download into flash memory of most popular microcontrollers supported
•Full-speed USB 2.0 interface
•Serial Wire Debug supported *
•Serial Wire Viewer supported *
•Download speed up to 720 KBytes/second **
•JTAG speed up to 12 MHz
•RDI interface available, which allows using J-Link with RDI
compliant software
The following table gives an overview about the specifications (general, mechanical,
electrical) for J-Link ARM. All values are valid for J-Link ARM hardware version 8.
General
For a complete list of all operating sys-
Supported OS
Electromagnetic compatibility (EMC)EN 55022, EN 55024
Operating temperature+5°C ... +60°C
Storage temperature-20°C ... +65 °C
Relative humidity (non-condensing)Max. 90% rH
Mechanical
Size (without cables)100mm x 53mm x 27mm
Weight (without cables)70g
Available interfaces
USB interfaceUSB 2.0, full speed
Target interface
JTAG/SWD Interface, Electrical
Power supply
Target interface voltage (V
Target supply voltage4.5V ... 5V (if powered with 5V on USB)
Target supply currentMax. 300mA
Reset Type
Reset low level output voltage (V
For the whole target voltage range (1.2V <= VIF <= 5V)
Table 1.1: J-Link ARM specifications
IF
)
)V
OL
tems which are supported, please refer
to Supported OS on page 21.
Identical to version 5.0 with the following exception:
•Target interface: RESET is open drain
Version 5.3
Identical to version 5.2 with the following exception:
•5V target supply current limited
5V target supply (pin 19) of Kick-Start versions of J-Link is current monitored
and limited. J-Link automatically switches off 5V supply in case of over-current to
protect both J-Link and host computer. Peak current (<= 10 ms) limit is 1A,
operating current limit is 300mA.
Version 5.4
Identical to version 5.3 with the following exception:
•Supports 5V target interfaces.
Version 6.0
Identical to version 5.4 with the following exception:
•Outputs can be tristated (Effectively disabling the JTAG interface)
•Supports SWD interface.
•SWD speed: Software implementation. 4 MHz maximum SWD speed.
•J-Link supports SWV (Speed limited to 500 kHz)
Version 7.0
Identical to version 6.0 with the following exception:
•Uses an additional pin to the UART unit of the target hardware for SWV support
(Speed limited to 6 MHz).
Version 8.0
Identical to version 7.0 with the following exception:
J-Link Ultra is a JTAG/SWD emulator designed for ARM/Cortex
and other supported CPUs. It is fully compatible to the standard
J-Link and works with the same PC software. Based on the
highly optimized and proven J-Link, it offers even higher speed
as well as target power measurement capabilities due to the
faster CPU, built-in FPGA and High speed USB interface. It connects via USB to a PC running Microsoft Windows 2000 or later.
For a complete list of all operating systems which are supported, please refer to Supported OS on page 19.. J-Link Ultra
has a built-in 20-pin JTAG/SWD connector.
1.3.3.1Additional features
•Fully compatible to the standard J-Link
•Very high performance for all supported CPU cores
•Hi-Speed USB 2.0 interface
•JTAG speed up to 25 MHz
•Serial Wire Debug (SWD) supported
•Serial Wire Viewer (SWV) supported
•SWV: UART and Manchester encoding supported
•SWO sampling frequencies up to 25 MHz
•Target power can be supplied
•Target power consumption can be measured with high accuracy. External ADC
can be connected via SPI
27
1.3.3.2Specifications
The following table gives an overview about the specifications (general, mechanical,
electrical) for J-Link Ultra. All values are valid for J-Link Ultra hardware version 1.
Note:Some specifications, especially speed, are likely to be improved in the
future with newer versions of the J-Link software (freely available).
General
For a complete list of all operating sys-
Supported OS
Electromagnetic compatibility (EMC)EN 55022, EN 55024
Operating temperature+5°C ... +60°C
Storage temperature-20°C ... +65 °C
Relative humidity (non-condensing)Max. 90% rH
Mechanical
Size (without cables)100mm x 53mm x 27mm
Weight (without cables)73g
Available interfaces
USB interfaceUSB 2.0, Hi-Speed
Target interfaceJTAG/SWD 20-pin
External (SPI) analog power measure-
J-Link Pro is a JTAG emulator designed for ARM cores. It is fully
compatible to J-Link and connects via Ethernet/USB to a PC
running Microsoft Windows 2000 or later. For a complete list of
all operating systems which are supported, please refer to Supported OS on page 19. Additional support for Cortex-R4 and
Cortex-R8 cores will be available in the near future. J-Link Pro
comes with licenses for all J-Link related SEGGER software
products which allows using J-Link Pro "out-of-the-box".
1.3.4.1Additional features
•Fully compatible to J-Link ARM
•More memory for future firmware extensions (ARM11, XScale, Cortex R4 and Cortex A8)
•Additional LEDs for power and RESET indication
•Comes with web interface for easy TCP/IP configuration
(built-in web server)
•Built-in GDB Server (planned to be implemented in the near
future)
•Download speed up to 720 KBytes/second ** (higher download speeds will be
available in the near future)
•DCC speed up to 800 Kbytes/second **
•Comes with licenses for: J-Link ARM RDI, J-Link ARM FlashBP, J-Link ARM
FlashDL, J-Link ARM GDB Server and J-Flash ARM.
•Embedded Trace Buffer (ETB) support
•Galvanic isolation from host via Ethernet
•RDI interface available, which allows using J-Link with RDI compliant software
** = Measured with J-Link Pro Rev. 1.1, ARM7 @ 50 MHz, 12MHz JTAG speed.
1.3.4.2Download speed
The following table lists performance values (Kbytes/s) for writing to memory (RAM):
29
Hardware
Rev. 1 via USB
Rev. 1 via TCP/IP
Table 1.4: Download speed differences between hardware revisions
All tests have been performed in the testing environment which is described on Measuring download speed on page 260.
The actual speed depends on various factors, such as JTAG/SWD, clock speed, host
CPU core etc.
720 Kbytes/s
(12 MHz JTAG)
720 Kbytes/s
(12 MHz JTAG)
ARM7
via JTAG
550 Kbytes/s
(12 MHz JTAG)
550 Kbytes/s
(12 MHz JTAG)
ARM9
via JTAG
Cortex-M3
via SWD
190 Kbytes/s
(12 MHz SWD)
190 Kbytes
(12 MHz SWD)
1.3.4.3Hardware versions
Version 1.1
Compatible to J-Link ARM.
•Provides an additional Ethernet interface which allows to communicate with JLink via TCP/IP.
1.3.5J-Link ARM Lite
J-Link ARM Lite is a fully functional OEM-version of J-Link ARM.
If you are selling evaluation-boards, J-Link ARM Lite is an inexpensive emulator solution for you. Your customer receives a
widely acknowledged JTAG-emulator which allows him to start
right away with his development.
The following table gives an overview about the specifications (general, mechanical,
electrical) for J-Link ARM Lite. All values are valid for J-Link ARM hardware version 8.
General
For a complete list of all operating sys-
Supported OS
Electromagnetic compatibility (EMC)EN 55022, EN 55024
Operating temperature+5°C ... +60°C
Storage temperature-20°C ... +65 °C
Relative humidity (non-condensing)Max. 90% rH
Size (without cables)28mm x 26mm x 7mm
Weight (without cables)6g
Mechanical
USB interfaceUSB 2.0, full speed
Target interface
JTAG/SWD Interface, Electrical
Power supply
Target interface voltage (V
IF
)
Target supply voltage4.5V ... 5V (if powered with 5V on USB)
Target supply currentMax. 300mA
LOW level input voltage (V
)Max. 40% of V
IL
HIGH level input voltage (VIH)Min. 60% of V
JTAG/SWD Interface, Timing
Data input rise time (T
Data input fall time (T
Data output rise time (T
Data output fall time (T
Clock rise time (T
Clock fall time (T
Table 1.5: J-Link ARM Lite specifications
)
rc
)
fc
rdi
fdi
)
rdo
fdo
)
)
)
tems which are supported, please refer
to Supported OS on page 21.
JTAG 20-pin
(14-pin adapter available)
USB powered
Max. 50mA + Target Supply current.
3.3V
IF
IF
Max. 20ns
Max. 20ns
Max. 10ns
Max. 10ns
Max. 10ns
Max. 10ns
1.3.6J-Link Lite Cortex-M
J-Link Lite Cortex-M is a specific OEM-version of SEGGER J-Link
Lite which is designed to be used with Cortex-M devices. If you
are selling evaluation-boards, J-Link Lite CortexM is an inexpensive emulator solution for you. Your customer receives a
widely acknowledged JTAG/SWD-emulator which allows him to start right away with
his development.
J-Trace is a JTAG emulator designed for ARM cores which
includes trace (ETM) support. It connects via USB to a PC running Microsoft Windows 2000 or later. For a complete list of all
operating systems which are supported, please refer to Supported OS on page 19. J-Trace has a built-in 20-pin JTAG connector and a built in 38-pin JTAG+Trace connector, which are
compatible to the standard 20-pin connector and 38-pin connector defined by ARM.
J-Trace for Cortex-M is a JTAG/SWD emulator designed for Cortex-M cores which includes trace (ETM) support. J-Trace for
Cortex-M can also be used as a J-Link and it also supports
ARM7/9 cores. Tracing on ARM7/9 targets is not supported.
1.3.8.1Additional features
•Has all the J-Link functionality
•Supports tracing on Cortex-M targets
1.3.8.2Specifications
The following table gives an overview about the specifications (general, mechanical,
electrical) for J-Trace for Cortex-M. All values are valid for the latest hardware version of J-Trace for Cortex-M.
General
For a complete list of all operating sys-
Supported OS
tems which are supported, please refer
to Supported OS on page 19.
Electromagnetic compatibility (EMC)EN 55022, EN 55024
Operating temperature+5°C ... +60°C
Storage temperature-20°C ... +65 °C
Relative humidity (non-condensing)Max. 90% rH
Size (without cables)123mm x 68mm x 30mm
Weight (without cables)120g
Mechanical
USB interfaceUSB 2.0, Hi-Speed
JTAG/SWD 20-pin
Target interface
(14-pin adapter available)
JTAG/SWD + Trace 19-pin
JTAG/SWD Interface, Electrical
Power supply
Target interface voltage (V
IF
)
USB powered
Max. 50mA + Target Supply current.
1.2V ... 5V
Target supply voltage4.5V ... 5V (if powered with 5V on USB)
Target supply currentMax. 300mA
LOW level input voltage (V
Flasher ARM is a programming tool for microcontrollers with onchip or external Flash memory and ARM core. Flasher ARM is
designed for programming flash targets with the J-Flash software or stand-alone. In addition to that Flasher ARM has all of
the J-Link functionality. For more information about Flasher
ARM, please refer to UM08007, Flasher ARM User’s Guide.
1.3.9.1Specifications
The following table gives an overview about the specifications
(general, mechanical, electrical) for Flasher ARM.
General
For a complete list of all operating sys-
Supported OS
Mechanical
USB interfaceUSB 2.0, full speed
Target interfaceJTAG/SWD 20-pin
JTAG Interface, Electrical
Power supply
Target interface voltage (V
IF
)
Target supply voltage4.5V ... 5V (if powered with 5V on USB)
Target supply currentMax. 300mA
For the whole target voltage range (1.8V <= V
LOW level input voltage (V
)Max. 40% of V
IL
HIGH level input voltage (VIH)Min. 60% of V
For 1.8V <= VIF <= 3.6V
tems which are supported, please refer
to Supported OS on page 19.
USB powered
Max. 50mA + Target Supply current.
1.2V ... 5V
<= 5V)
IF
IF
IF
LOW level output voltage (V
) with a
OL
load of 10 kOhm
HIGH level output voltage (VOH) with a
load of 10 kOhm
For 3.6 <= VIF <= 5V
LOW level output voltage (V
) with a
OL
load of 10 kOhm
HIGH level output voltage (VOH) with a
load of 10 kOhm
SWD Interface, Electrical
Power supply
Target interface voltage (V
IF
)
Target supply voltage4.5V ... 5V (if powered with 5V on USB)
Target supply currentMax. 300mA
LOW level input voltage (V
HIGH level input voltage (V
LOW level output voltage (V
load of 10 kOhm
HIGH level output voltage (V
load of 10 kOhm
Table 1.11: Flasher ARM specifications
IL
IH
)
)
OL
OH
) with a
) with a
Max. 0.8V
Min. 2.0V
Max. 0.5V
Min. 2.85V
1.3.10J-Link ColdFire
J-Link ColdFire is a BDM emulator designed for ColdFire® cores.
It connects via USB to a PC running Microsoft Windows 2000,
Windows XP, Windows 2003, or Windows Vista. J-Link ColdFire
has a built-in 26-pin BDM connector, which is compatible to the
standard 26-pin connector defined by Freescale. For more information about J-Link ColdFire BDM 26, please refer to UM08009,J-Link ColdFire BDM26 User’s Guide.
•USB 2.0 interface (Full-Speed/Hi-Speed, depends on J-Link model)
•Any ARM7/9/11 (including thumb mode), Cortex-A5/A8, Cortex-M0/M1/M3/M4,
Cortex-R4 core supported
•Automatic core recognition
•Maximum JTAG speed 12/25 MHz (depends on J-Link model)
•Seamless integration into the IAR Embedded Workbench® IDE
•No power supply required, powered through USB
•Support for adaptive clocking
•All JTAG signals can be monitored, target voltage can be measured
•Support for multiple devices
•Fully plug and play compatible
•Standard 20-pin JTAG/SWD connector, 19-pin JTAG/SWD and Trace connector,
standard 38-pin JTAG+Trace connector
•USB and 20-pin ribbon cable included
•Memory viewer (J-Mem) included
•TCP/IP server included, which allows using J-Trace via TCP/IP networks
•RDI interface available, which allows using J-Link with RDI compliant software
•Flash programming software (J-Flash) available
•Flash DLL available, which allows using flash functionality in custom applications
•Software Developer Kit (SDK) available
•Full integration with the IAR C-SPY® debugger; advanced debugging features
available from IAR C-SPY debugger.
•14-pin JTAG adapter available
•J-Link 19-pin Cortex-M Adapter available
•J-Link 9-pin Cortex-M Adapter available
•Adapter for 5V JTAG targets available for hardware revisions up to 5.3
•Optical isolation adapter for JTAG/SWD interface available
•Target power supply via pin 19 of the JTAG/SWD interface (up to 300 mA to target with overload protection), alternatively on pins 11 and 13 of the Cortex-M
19-pin trace connector
J-Link / J-Trace has been tested with the following cores, but should work with any
ARM7/9/11, Cortex-M0/M1/M3/M4 and Cortex-A5/A8/A9/R4 core. If you experience
problems with a particular core, do not hesitate to contact Segger.
In general, there are two ways to support a CPU-core in the J-Link software:
1.Intelligence in the J-Link firmware
2.Intelligence on the PC-side (DLL)
Having the intelligence in the firmware is ideal since it is much more powerful and
robust. The J-Link PC software automatically detects which implementation level is
supported for the connected CPU-core. If Intelligence in the firmware is available, it
is used. If you are using a J-Link that does not have intelligence in the firmware and
only PC-side intelligence is available for the connected CPU, a warning message is
shown.
1.6.1Intelligence in the J-Link firmware
On newer J-Links, the intelligence for a new CPU-core is also available in the J-Link
firmware which means, for these J-Links the target sequences are no longer generated on the PC-side but directly inside the J-Link. Having the intelligence in the firmware leads to improved stability and higher performance.
1.6.2Intelligence on the PC-side (DLL)
This is the basic implementation level for support of a CPU-core. This implementation
is not J-Link model dependend, since no intelligence for the CPU-core is necessary in
the J-Link firmware. This means, all target sequences (JTAG/SWD/...) are generated
on the PC-side and the J-Link simply sends out these sequences and sends the result
back to the DLL. Using this way of implementation also allows old J-Links to be used
with new CPU cores as long as a DLL-Version is used which has intelligence for the
CPU.
But there is one big disadvantage of implementing the CPU core support on the DLLside: For every sequence which shall be send to the target a USB or Ethernet transaction is triggered. The long latency especially on a USB connection significantly
affects the performance of J-Link. This is true especially, when performing actions
where J-Link has to wait for the CPU frequently. An example is a memory read/write
operation which needs to be followed by status read operations or repeated until the
memory operation is completed. Performing this kind of task with only PC-side intelligence will have to either make some assumption like: Operation is completed after
a given number of cycles or will have to make a lot of USB/Ethernet transactions. The
first option (fast mode) will not work under some circumstances such as low CPU
speeds, the second (slow mode) will be more reliable but very slow due to the high
number of USB/Ethernet transactions. It simply boils down to: The best solution is
having intelligence in the emulator itself!
•Instability, especially on slow targets
Due to the fact that a lot of USB transactions would cause a very bad performance of J-Link, on PC-side implementations the assumption is made that the
CPU/Debug interface is fast enough to handle the commands/requests without
the need of waiting. So, when using the PC-side-intelligence, stability can not be
guaranteed in all cases, especially if the target interface speed (JTAG/SWD/...) is
significantly higher than the CPU speed.
•Poor performance
Since a lot more data has to be transferred over the host interface (typ. USB),
the resulting download speed is typically much lower than for implementations
with intelligence in the firmware, even if the number of transactions over the
host interface is limited to a minimum (fast mode).
•No support
Please understand that we can not give any support if you are running into problems when using a PC-side implementation.
Note:Due to these limitations, we recommend to use PC-side implementations
for evaluation only.
There are different models of J-Link / J-Trace which have built-in intelligence for different CPU-cores. In the following, we will give you an overview about which model
of J-Link / J-Trace has intelligence for which CPU-core.
1.6.3.1Current models
The table below lists the firmware CPU support for J-Link & J-Trace models currently
available.
Version
J-Link / J-Trace
model
J-Link8
J-Link Pro3
J-Link Ultra1
J-Link Lite8
J-Link Lite Cortex-M 8
J-Link Lite RX8
ARM
7/9
JTAGJTAGJTAGJTAGSWDJTAG
ARM11Cortex-
A/R
Cortex-M
Renesas
RX600
!!!!!!
!!!!!!
!!!!!!
!!!!!!
"""
"""""
!!
"
!
J-Trace ARM1
J-Trace for Cortex-M 3
Table 1.12: Built-in intelligence of current J-Links
J-Link / J-Trace can be used with different IDEs. Some IDEs support J-Link directly,
for other ones additional software (such as J-Link RDI) is necessary in order to use JLink. The following tables list which features of J-Link / J-Trace can be used with the
different IDEs.
ARM7/9
IDE
Debug
support
4
download
Flash
Flash
breakpoints
Trace
support
3
IAR EWARMyesyesyesyes
Keil MDKyesyesyesno
Rowleyyesyesnono
CodeSourceryyesnonono
Yargato (GDB)yesyesyesno
RDI compliant
toolchains such as
yes
1
yes
1
yes
1
no
RVDS/ADS
ARM Cortex-M3
IDE
Debug
support
4
Flash
download
Flash
breakpoints
IAR EWARMyesyesyesyesyes
Keil MDKyesyesyesyesyes
Rowleyyesyesnonono
CodeSourceryyesnononono
Yargato (GDB)yesyesyesnono
Trace
support
3
support
SWO
ARM11
ARM11 has currently been tested with IAR EWARM only.
IDE
Debug
support
4
IAR EWARMyes
Rowleyyes
Yargato ( GD B )yes
1
Requires J-Link RDI license for download of more than 32KBytes
2
Coming soon
3
Requires emulator with trace support
4
Debug support includes the following: Download to RAM, memory read/write, CPU
Flash
download
2
no
2
no
2
no
Flash
breakpoints
2
no
nono
2
no
register read/write, Run control (go, step, halt), software breakpoints in RAM and
hardware breakpoints in flash memory.
This chapter describes the different license types of J-Link related software and the
legal use of the J-Link software with original SEGGER and OEM products.
J-Link functionality can be enhanced by the features J-Flash, RDI, flash download and
flash breakpoints (FlashBP). The flash breakpoint feature does not come with J-Link
and need an additional license. In the following the licensing options of the software
will be explained.
For each of the software components which require an additional license, there are
three types of licenses:
Built-in License
This type of license is easiest to use. The customer does not need to deal with a
license key. The software automatically finds out that the connected J-Link contains
the built-in license(s). This is the type of license you get if you order J-Link and the
license at the same time, typically in a bundle.
Key-based license
This type of license is used if you already have a J-Link, but want to enhance its functionality by using flash breakpoints. In addition to that, the key-based license is used
for trial licenses. To enable this type of license you need to obtain a license key from
SEGGER. Free trial licenses are available upon request from www.segger.com. This
license key has to be added to the J-Link license management. How to enter a license
key is described in detail in Licensing on page 157. Every license can be used on different PCs, but only with the J-Link the license is for. This means that if you want to
use flash breakpoints with other J-Links, every J-Link needs a license.
Device-based license
The device-based license comes with the J-Link software and is available for some
devices. For a complete list of devices which have built-in licenses, please refer to
Device list on page 50. The device-based license has to be activated via the debugger. How to activate a device-based license is described in detail in the section Acti-vating a device-based license on page 50.
2.3.1Built-in license
This type of license is easiest to use. The customer does not need to deal with a
license key. The software automatically finds out that the connected J-Link contains
the built-in license(s). To check what licenses the used J-Link have, simply open the
J-Link commander (JLink.exe). The J-Link commander finds and lists all of the JLink’s licenses automatically, as can be seen in the screenshot below.
This J-Link for example, has built-in licenses for RDI, J-Link ARM FlashDL and
FlashBP.
2.3.2Key-based license
When using a key-based license, a license key is required in order to enable the JLink flash breakpoint feature. License keys can be added via the license manager.
How to enter a license via the license manager is described in Licensing on page 157.
Like the built-in license, the key-based license is only valid for one J-Link, so if
another J-Link is used it needs a separate license.
The easiest way to enter a license is the following:
Open the J-Link control panel window, go to the General tab and choose License.
Now the J-Link license manager will open and show all licenses, both key-based and
built-in licenses of J-Link.
49
Now choose Add license to add one or more new licenses. Enter your license(s) and
choose OK. Now the licenses should have been added.
2.3.3Device-based license
The device-based license is a free license, available for some devices. It’s already
included in J-Link, so no keys are necessary to enable this license type. To activate a
device based license, the debugger needs to select a supported device.
In order to activate a device-based license, the debugger needs to select a supported
device. To check if the debugger has selected the right device, simply open the J-Link
control panel and check the device section in the General tab.
2.3.3.2Device list
The following list contains all devices which are supported by the device-based
license
The software consists of proprietary programs of SEGGER, protected under copyright
and trade secret laws. All rights, title and interest in the software are and shall
remain with SEGGER. For details, please refer to the license agreement which needs
to be accepted when installing the software. The text of the license agreement is also
available as entry in the start menu after installing the software.
Use of software
SEGGER J-Link software may only be used with original SEGGER products and authorized OEM products. The use of the licensed software to operate SEGGER product
clones is prohibited and illegal.
2.4.1Use of the software with 3rd party tools
For simplicity, some components of the J-Link software are also distributed from
partners with software tools designed to use J-Link. These tools are primarily debugging tools, but also memory viewers, flash programming utilities but also software
for other purposes. Distribution of the software components is legal for our partners,
but the same rules as described above apply for their usage: They may only be used
with original SEGGER products and authorized OEM products. The use of the licensed
software to operate SEGGER product clones is prohibited and illegal.
The following products are original SEGGER products for which the use of the J-Link
software is allowed:
2.5.1J-Link
J-Link is a JTAG emulator designed for ARM cores. It connects
via USB to a PC running Microsoft Windows 2000, Windows XP,
Windows 2003, Windows Vista or Windows 7. J-Link has a builtin 20-pin JTAG connector, which is compatible with the standard
20-pin connector defined by ARM.
Licenses
Comes with built-in licenses for flash download and flash breakpoints for some devices. For a complete list of devices which
are supported by the built-in licenses, please refer to Devicelist on page 50.
53
2.5.2J-Link Ultra
J-Link Ultra is a JTAG/SWD emulator designed for ARM/Cortex
and other supported CPUs. It is fully compatible to the standard
J-Link and works with the same PC software. Based on the
highly optimized and proven J-Link, it offers even higher speed
as well as target power measurement capabilities due to the
faster CPU, built-in FPGA and High speed USB interface.
It connects via USB to a PC running Microsoft Windows 2000,
Windows XP, Windows 2003, Windows Vista or Windows 7.
J-Link Ultra has a built-in 20-pin JTAG/SWD connector.
Licenses
Comes with built-in licenses for flash download and flash breakpoints for some devices. For a complete list of devices which are
supported by the built-in licenses, please refer to Device list on
page 50.
J-Link Pro is a JTAG emulator designed for ARM cores. It connects via USB or Ethernet to a PC running Microsoft Windows
2000, Windows XP, Windows 2003, Windows Vista or Windows
7. J-Link has a built-in 20-pin JTAG connector, which is compatible with the standard 20-pin connector defined by ARM.
Licenses
Comes with built-in licenses for all J-Link related software products: J-Link ARM FlashDL, FlashBP, RDI, J-Link GDB Server and
J-Flash.
2.5.4J-Trace
J-Trace is a JTAG emulator designed for ARM cores which
includes trace (ETM) support. It connects via USB to a PC running Microsoft Windows 2000, Windows XP, Windows 2003,
Windows Vista or Windows 7. J-Trace has a built-in 20-pin JTAG
connector and a built in 38-pin JTAG+Trace connector, which is
compatible with the standard 20-pin connector and 38-pin connector defined by ARM.
Licenses
Comes with built-in licenses for flash download and flash breakpoints for some devices. For a complete list of devices which
are supported by the built-in licenses, please refer to Device list
on page 50.
J-Trace for Cortex-M is a JTAG/SWD emulator designed for Cortex-M cores which include trace (ETM) support. J-Trace for Cortex-M can also be used as a regular J-Link and it also supports
ARM7/9 cores. Please note that tracing on ARM7/9 targets is
not supported by J-Trace for Cortex-M. In order to use ETM
trace on ARM7/9 targets, a J-Trace is needed.
Licenses
Comes with built-in licenses for flash download and flash
breakpoints for some devices. For a complete list of devices
which are supported by the built-in licenses, please refer to
Device list on page 50.
55
2.5.6Flasher ARM
Flasher ARM is a programming tool for microcontrollers with onchip or external Flash memory and ARM core. Flasher ARM is
designed for programming flash targets with the J-Flash software or stand-alone. In addition to that Flasher ARM has all of
the J- Link functionality. Flasher ARM connects via USB or via
RS232 interface to a PC, running Microsoft Windows 2000, Windows XP, Windows 2003 or Windows Vista. Flasher ARM has a
built-in 20-pin JTAG connector, which is compatible with the
standard 20-pin connector defined by ARM.
There are several different OEM versions of J-Link on the market. The OEM versions
look different, but use basically identical hardware. Some of these OEM versions are
limited in speed, some of these can only be used with certain chips and some of
these have certain add-on features enabled, which normally requires license. In any
case, it should be possible to use the J-Link software with these OEM versions. However, proper function cannot be guaranteed for OEM versions. SEGGER Microcontroller does not support OEM versions; support is provided by the respective OEM.
2.6.1Analog Devices: mIDASLink
mIDASLink is an OEM version of J-Link, sold by Analog Devices.
Limitations
mIDASLink works with Analog Devices chips only. This limitation
can NOT be lifted; if you would like to use J-Link with a device
from an other manufacturer, you need to buy a separate J-Link.
Licenses
Licenses for RDI, J-Link ARM FlashDL and FlashBP are included.
Other licenses can be added.
2.6.2Atmel: SAM-ICE
SAM-ICE is an OEM version of J-Link, sold by Atmel.
Limitations
SAM-ICE works with Atmel devices only. This limitation can NOT
be lifted; if you would like to use J-Link with a device from an
other manufacturer, you need to buy a separate J-Link.
Licenses
Licenses for RDI and GDB Server are included. Other licenses can
be added.
Digi JTAG Link is an OEM version of J-Link, sold by Digi International.
Limitations
Digi JTAG Link works with Digi devices only. This limitation can
NOT be lifted; if you would like to use J-Link with a device from an
other manufacturer, you need to buy a separate J-Link.
Licenses
License for GDB Server is included. Other licenses can be added.
57
2.6.4IAR: J-Link / J-Link KS
IAR J-Link / IAR J-Link KS are OEM versions of J-Link, sold by IAR.
Limitations
IAR J-Link / IAR J-Link KS can not be used with Keil MDK. This limitation can NOT be lifted; if you would like to use J-Link with Keil
MDK, you need to buy a separate J-Link. IAR J-Link does not support kickstart power.
Licenses
No licenses are included. All licenses can be added.
2.6.5IAR: J-Link Lite
IAR J-Link Lite is an OEM version of J-Link, sold by IAR.
Limitations
IAR J-Link Lite can not be used with Keil MDK. This limitation can
NOT be lifted; if you would like to use J-Link with Keil MDK, you
need to buy a separate J-Link.
JTAG speed is limited to 4 MHz.
Licenses
No licenses are included. All licenses can be added.
Note:IAR J-Link is only delivered and supported as part of Starter-Kits. It is not
sold to end customer directly and not guaranteed to work with custom hardware.
IAR J-Trace is an OEM version of J-Trace, sold by IAR.
Limitations
IAR J-Trace can not be used with Keil MDK. This limitation can NOT
be lifted; if you would like to use J-Trace with Keil MDK, you need
to buy a separate J-Trace.
Licenses
No licenses are included. All licenses can be added.
2.6.7NXP: J-Link Lite LPC Edition
J-Link Lite LPC Edition is an OEM version of J-Link, sold by NXP.
Limitations
J-Link Lite LPC Edition only works with NXP devices. This limitation can NOT be lifted; if you would like to use J-Link with a
device from an other manufacturer, you need to buy a separate
J-Link.
Licenses
No licenses are included.
2.6.8SEGGER: J-Link Lite
J-Link ARM Lite is a fully functional OEM-version of SEGGER J-Link
ARM. If you are selling evaluation-boards, J-Link ARM Lite is an
inexpensive emulator solution for you. Your customer receives a
widely acknowledged JTAG-emulator which allows him to start
right away with his development.
Limitations
JTAG speed is limited to 4 MHz
Licenses
No licenses are included. All licenses can be added.
Note
J-Link ARM Lite is only delivered and supported as part of Starter Kits. It is not sold
to end customer and not guaranteed to work with custom hardware.
J-Link OBs (J-Link On Board) are single chip versions of J-Link which are used on various evalboards. It is legal to use J-Link software with these boards, provided that
the eval board manufacturer has obtained a license from SEGGER. The following list
shows the eval board manufacturer which are allowed to use J-Link OBs:
Clones are copies of SEGGER products which use the copyrighted SEGGER Firmware
without a license. It is strictly prohibited to use SEGGER J-Link software with illegal
clones of SEGGER products. Manufacturing and selling these clones is an illegal act
for various reasons, amongst them trademark, copyright and unfair business practise
issues.
The use of illegal J-Link clones with this software is a violation of US, European and
other international laws and is prohibited.
If you are in doubt if your unit may be legally used with SEGGER J-Link software,
please get in touch with us.
End users may be liable for illegal use of J-Link software with clones.
This chapter describes Segger’s J-Link / J-Trace related software portfolio, which covers nearly all phases of the development of embedded applications. The support of
the remote debug interface (RDI) and the J-Link GDBServer allows an easy J-Link
integration in all relevant toolchains.
J-Link is shipped with a bundle of applications. Some of the applications require an
additional license, free trial licenses are available upon request from www.seg-ger.com.
SoftwareDescription
JLinkARM.dllDLL for using J-Link / J-Trace with third-party programs.
JLink.exe
JLinkSTR91x
JLinkSTM32
J-Link TCP/IP
Server
J-Mem memory
viewer
J-Flash
RDI support
Free command-line tool with basic functionality for target analysis.
Free command-line tool to configure the ST STR91x cores. For
more information please refer to J-Link STR91x Commander (Command line tool) on page 65
Free command-line tool for STM32 devices. Can be used to disable the hardware watchdog and to unsecure STM32 devices
(override read-protection).
Free utility which provides the possibility to use J-Link / J-Trace
remotely via TCP/IP.
Free target memory viewer. Shows the memory content of a
running target and allows editing as well.
Stand-alone flash programming application. Requires an additional license. For more information about J-Flash please refer
to J-Flash ARM User’s Guide (UM08003).
Provides Remote Debug Interface (RDI) support. This allows
the user to use J-Link with any RDI-compliant debugger. (Additional license required)
GUI-based configuration tool for J-Link. Allows configuration of
USB identification as well as TCP/IP identification of J-Link. For
more information about the J-Link Configurator, please refer to
J-Link Configurator on page 89.
The J-Link GDB Server is a remote server for the GNU Debugger (GDB). For more information about J-Link GDB Server,
please refer to J-Link GDB Server User’s Guide (UM08005).
Command line version of the J-Link GDB Server. Same functionality as the GUI version.
Free dedicated flash programming utilities for the following
eval boards: Cogent CSB737, ST MB525, Toshiba TOPAS 910.
2004-2012 SEGGER Microcontroller GmbH & Co. KG
Page 63
3.1.2List of additional software packages
The software packages listed below are available upon request from www.segger.com.
3.2J-Link software and documentation package in
detail
The J-Link / J-Trace software documentation package is supplied together with J-Link
/ J-Trace and may also be downloaded from www.segger.com.
3.2.1J-Link Commander (Command line tool)
J-Link Commander (JLink.exe) is a tool that can be used for verifying proper installation of the USB driver and to verify the connection to the ARM chip, as well as for
simple analysis of the target system. It permits some simple commands, such as
memory dump, halt, step, go and ID-check, as well as some more in-depths analysis
of the state of the ARM core and the ICE breaker module.
3.2.1.1Using command script files
J-Link commander can also be used in script mode which allows the user to use JLink commander for batch processing and without user interaction. When using JLink commander in script mode, the path to a script file is passed to it. The syntax in
the script file is the same as when using regular commands in J-Link commander
(one line per command).
Example
JLink.exe C:\script.jlink
Contents of script.jlink:
r
h
exec device = STM32F103ZE
loadbin C:\firmware.bin,0x08000000
SWO Analyzer (SWOAnalyzer.exe) is a tool that analyzes SWO output. Status and
summary of the analysis are output to standard out, the details of the analysis are
stored in a file.
Usage
SWOAnalyzer.exe <SWOfile>
This can be achieved by simply dragging the SWO output file created by the J-Link
DLL onto the executable.
65
Creating an SWO output file
In order to create the SWO output file, which is th input file for the SWO Analyzer,
the J-Link config file needs to be modified.
It should contain the following lines:
[SWO]
SWOLogFile="C:\TestSWO.dat"
3.2.3J-Link STR91x Commander (Command line tool)
J-Link STR91x Commander (JLinkSTR91x.exe) is a tool that can be used to configure
STR91x cores. It permits some STR9 specific commands like:
•Set the configuration register to boot from bank 0 or 1
•Erase flash sectors
•Read and write the OTP sector of the flash
•Write-protect single flash sectors by setting the sector protection bits
•Prevent flash from communicate via JTAG by setting the security bit
All of the actions performed by the commands, excluding writing the OTP sector and
erasing the flash, can be undone. This tool can be used to erase the flash of the controller even if a program is in flash which causes the ARM core to stall.
When starting the STR91x commander, a command sequence will be performed
which brings MCU into Turbo Mode.
"While enabling the Turbo Mode, a dedicated test mode signal is set and controls the
GPIOs in output. The IOs are maintained in this state until a next JTAG instruction is
send." (ST Microelectronics)
Enabling Turbo Mode is necessary to guarantee proper function of all commands in
the STR91x Commander.
J-Link STM32 Commander (JLinkSTM32.exe) is a free command line tool which can
be used to disable the hardware watchdog of STM32 devices which can be activated
by programming the option bytes. Moreover the J-Link STM32 Commander unsecures
a read-protected STM32 device by re-programming the option bytes.
Note:Unprotecting a secured device or will cause a mass erase of the flash
memory.
3.2.5J-Link TCP/IP Server (Remote J-Link / J-Trace use)
The J-Link TCP/IP Server allows using J-Link / J-Trace remotely via TCP/IP. This
enables you to connect to and fully use a J-Link / J-Trace from another computer.
Performance is just slightly (about 10%) lower than with direct USB connection.
The J-Link TCP/IP Server also accepts commands which are passed to the J-Link TCP/
IP Server via the command line.
3.2.5.1List of available commands
The table below lists the commands accepted by the J-Link TCP/IP Server
CommandDescription
port
usbSelects a usb port for communication with J-Link.
Table 3.3: Available commands
Selects the IP port on which the J-Link TCP/IP Server is
listening.
3.2.5.2port
Syntax
-port <Portno.>
Example
To start the J-Link TCP/IP Server listening on port 19021 the command should look
as follows:
-port 19021
3.2.5.3usb
Syntax
-usb <USBIndex>
Example
Currently usb 0-3 are supported, so if the J-Link TCP/IP Server should connect to the
J-Link on usb port 2 the command should look as follows:
J-Mem displays memory contents of ARM-systems and allows modifications of RAM
and SFRs (Special Function Registers) while the target is running. This makes it possible to look into the memory of an ARM chip at run-time; RAM can be modified and
SFRs can be written. You can choose between 8/16/32-bit size for read and write
accesses. J-Mem works nicely when modifying SFRs, especially because it writes the
SFR only after the complete value has been entered.
J-Flash ARM is a software running on Windows 2000, Windows XP, Windows 2003 or
Windows Vista systems and enables you to program your flash EEPROM devices via
the JTAG connector on your target system.
J-Flash ARM works with any ARM7/9 system and supports all common external
flashes, as well as the programming of internal flash of ARM microcontrollers. It
allows you to erase, fill, program, blank check, upload flash content, and view memory functions of the software with your flash devices.
J-Flash requires a additional license from Segger. Even without a license key you can
still use J-Flash ARM to open project files, read from connected devices, blank check
target memory, verify data files and so on. However, to actually program devices via
J-Flash ARM and J-Link / J-Trace you are required to obtain a license key from us.
Evaluation licenses are available free of charge. For further information go to our
website or contact us directly.
Features
•Works with any ARM7/ARM9 chip
•ARM microcontrollers (internal flash) supported
•Most external flash chips can be programmed
•High-speed programming: up to 300 Kbytes/second (depends on flash device)
•Very high-speed blank check: Up to 16 Mbytes/sec (depends on target)
•Smart read-back: Only non-blank portions of flash transferred and saved
•Easy to use, comes with projects for standard eval boards.
The J-Link RDI software is an remote debug interface for J-Link. It makes it possible
to use J-Link with any RDI compliant debugger. The main part of the software is an
RDI-compliant DLL, which needs to be selected in the debugger. There are two additional features available which build on the RDI software foundation. Each additional
features requires an RDI license in addition to its own license. Evaluation licenses are
available free of charge. For further information go to our website or contact us
directly.
Note:The RDI software (as well as flash breakpoints and flash downloads) do
not require a license if the target device is an LPC2xxx. In this case the software verifies that the target device is actually an LPC 2xxx and have a device-based license.
3.2.8.1Flash download and flash breakpoints
Flash download and flash breakpoints are supported by J-Link RDI. For more information about flash download and flash breakpoints, please refer to J-Link RDI User’sGuide (UM08004), chapter Flash download and chapter Breakpoints in flash memory.
GDB Server is a remote server for the GNU Debugger GDB. GDB and GDB Server
communicate via a TCP/IP connection, using the standard GDB remote serial protocol. The GDB Server translates the GDB monitor commands into J-Link commands.
The GNU Project Debugger (GDB) is a freely available debugger, distributed under
the terms of the GPL. It connects to an emulator via a TCP/IP connection. It can connect to every emulator for which a GDB Server software is available. The latest Unix
version of the GDB is freely available from the GNU committee under:
3.3Dedicated flash programming utilities for J-Link
The SEGGER J-Link comes with dedicated flash programming utilities (DFPU) for a
number of popular Eval boards. These utilities are designed to program a .bin file into
the flash memory of the target hardware, with J-Link. Each dedicated flash programming utility works only with the Eval board it was designed for.
73
Data
File
PC
USB
JTAG
J-Link
CPU
Target
Flash
Memory
3.3.1Introduction
Using the dedicated flash programming utilities which come with J-Link, is permitted
for development purposes only. As long as the dedicated flash programming tools are
used for development purposes only, no additional license is required. If you want to
use the dedicated flash programming utilities for commercial and production purposes, you need to obtain a license from SEGGER. SEGGER also offers to create dedicated flash programming utilities for custom hardware. When starting a dedicated
flash programming utility, a message box appears which tells the user about the purpose of the dedicated flash programming utility:
3.3.2Supported Eval boards
The list below shows the Eval boards for which dedicated flash programming utilities
have been already developed. Simple flash programming utilities for other, popular
Eval boards are on the schedule.
Typically 32 MB external
NAND flash (ST
NAND256R3A)
Page 74
74CHAPTER 3J-Link and J-Trace related software
3.3.3Supported flash memories
The dedicated flash programming utilities for J-Link can be created for the following
flash memories:
• External NOR flash
• Internal flash
• NAND flash
• Data flash
• SPI flash
In order to use external NOR flash, a CFI compliant flash memory has to be used
because the flash programming utilities use the CFI information to detect the flash
size and sectorization.
3.3.4How to use the dedicated flash programming utilities
The dedicated flash programming utilities are very simple to use. Every tool expects
a path to a data file (*.bin) passed as a command line parameter, on startup. If no
path is passed the flash programming utility searches for a data in the Samples\directory. This .bin file has to be named as shown in the table above. For example,
for the Cogent CSB737 Eval board this file is named: CogentCSB737.bin.
3.3.5Using the dedicated flash programming utilities for pro-
duction and commercial purposes
If you want to use dedicated flash programming utilities for production and commercial purposes you need to obtain a license from SEGGER. In order to obtain a license
for a dedicated flash programming utility, there are two options:
•Purchasing the source code of an existing dedicated flash programming utility
•Purchasing the source code of a dedicated flash programming utility for custom
hardware
The source code can be compiled using a Microsoft Visual C++ V6 or newer compiler.
It contains code which is executed on the target device (RAMCODE). This RAMCODE
may not be used with debug probes other than J-Link.
3.3.5.1Purchasing the source code of an existing dedicated flash programming utility
Purchasing the source code of an existing dedicated flash programming utility
(described above) allows you to use the dedicated flash programming utility for production and commercial purposes. Making the resulting executable publicly available
is not permitted.
For more information about the pricing for the source code of existing dedicated flash
programming utilities, please refer to the price list on our website
http://www.segger.com/pricelist_jlink.html#8.20.01.
3.3.5.2Purchasing the source code of a dedicated flash programming
utility for custom hardware
SEGGER also offers to design dedicated flash programming utilities for custom hardware for which you will also need to obtain a license. The resulting executable may
be used for organization internal purposes only.
3.3.6F.A.Q.
Q:Q: Can the dedicated flash programming utilities be used for commercial pur-
poses?
A:A: Yes, you can buy the source code of one or more of the flash programming util-
ities which makes it possible to use them for commercial and production purposes.
Q:Q: I want to use the dedicated flash programming utilities with my own hardware.
Is that possible?
A:A: The free dedicated flash programming utilities which come with J-Link do not
support custom hardware.mIn order to use your own hardware with a dedicated
flash programming utility, SEGGER offers to create dedicated flash programming
utilities for custom hardware
Q:Q: Do I need a license to use the dedicated flash programming utilities?
A:A: As long as you use the dedicated flash programming utilities, which come with
J-Link, for development purposes only, you do not need an additional license. In
order to use them for commercial and/or production purposes you need to obtain a
license from SEGGER.
75
Q:Q: Which file types are supported by the dedicated flash programming utilities?
A:A: Currently, the dedicated flash programming utilities support *.bin files.
Q:Q: Can I use the dedicated flash programming utilities with other debug probes
than J-Link?
A:A: No, the dedicated flash programming utilities only work with J-Link
The packages described in this section are not available for download. If you wish to
use one of them, contact SEGGER Microcontroller Systeme directly.
3.4.1JTAGLoad (Command line tool)
JTAGLoad is a tool that can be used to open an svf (Serial vector format) file. The
data in the file will be sent to the target via J-Link / J-Trace.
3.4.2J-Link Software Developer Kit (SDK)
The J-Link Software Developer Kit is needed if you want to write your own program
with J-Link / J-Trace. The J-Link DLL is a standard Windows DLL typically used from C
programs (Visual Basic or Delphi projects are also possible). It makes the entire
functionality of J-Link / J-Trace available through its exported functions, such as halting/stepping the ARM core, reading/writing CPU and ICE registers and reading/writing memory. Therefore it can be used in any kind of application accessing an ARM
core. The standard DLL does not have API functions for flash programming. However,
the functionality offered can be used to program flash. In this case, a flash loader is
required. The table below lists some of the included files and their respective purpose.
FilesContents
GLOBAL.h
JLinkARMDLL.h
JLinkARM.libA Library that contains the exports of the JLink DLL.
JLinkARM.dllThe DLL itself.
Main.cSample application, which calls some JLinkARM DLL functions.
JLink.dsp
Header files that must be included to use the DLL functions.
These files contain the defines, typedef names, and function declarations.
Project files of the sample application. Double click JLink.dsw to
open the project.
3.4.3J-Link Flash Software Developer Kit (SDK)
This is an enhanced version of the JLinkARM.DLL which contains additional API functions for flash programming. The additional API functions (prefixed
JLINKARM_FLASH_) allow erasing and programming of flash memory. This DLL comes
with a sample executable, as well as with source code of this executable and a
Microsoft Visual C/C++ project file. It can be an interesting option if you want to
write your own programs for production purposes.
The J-LinkARM.dll is a standard Windows DLL typically used from C or C++, but
also Visual Basic or Delphi projects. It makes the entire functionality of the J-Link / JTrace available through the exported functions.
The functionality includes things such as halting/stepping the ARM core, reading/
writing CPU and ICE registers and reading/writing memory. Therefore, it can be used
in any kind of application accessing an ARM core.
3.5.2Updating the DLL in third-party programs
The JLinkARM.dll can be used by any debugger that is designed to work with it. Some
®
debuggers, like the IAR C-SPY
already installed. Anyhow it may make sense to replace the included DLL with the
latest one available, to take advantage of improvements in the newer version.
3.5.2.1Updating the JLinkARM.dll in the IAR Embedded Workbench for
ARM (EWARM)
debugger, are usually shipped with the JLinkARM.dll
It’s recommended to use the J-Link DLL updater to update the JLinkARM.dll in the
IAR Embedded Workbench. The IAR Embedded Workbench IDE is a high-performance
integrated development environment with an editor, compiler, linker, debugger. The
compiler generates very efficient code and is widely used. It comes with the J-LinkARM.dll in the arm\bin subdirectory of the installation directory. To update this
DLL, you should backup your original DLL and then replace it with the new one.
Typically, the DLL is located in C:\Program Files\IAR Systems\Embedded Work-bench 6.n\arm\bin\.
After updating the DLL, it is recommended to verify that the new DLL is loaded as
described in Determining which DLL is used by a program on page 78.
J-Link DLL updater
The J-Link DLL updater is a tool which comes with the J-Link software and allows the
user to update the JLinkARM.dll in all installations of the IAR Embedded Workbench, in a simple way. The updater is automatically started after the installation of a
J-Link software version and asks for updating old DLLs used by IAR. The J-Link DLL
updater can also be started manually. Simply enable the checkbox left to the IAR
installation which has been found. Click Ok in order to update the JLinkARM.dll
used by the IAR installation.
To determine which version of the JLinkARM.dll you are facing, the DLL version can
be viewed by right clicking the DLL in explorer and choosing Properties from the
context menu. Click the Version tab to display information about the product version.
3.5.4Determining which DLL is used by a program
To verify that the program you are working with is using the DLL you expect it to use,
you can investigate which DLLs are loaded by your program with tools like Sysinternals’ Process Explorer. It shows you details about the DLLs, used by your program,
such as manufacturer and version.
Process Explorer is - at the time of writing - a free utility which can be downloaded
from www.sysinternals.com.
This chapter describes the setup procedure required in order to work with J-Link / JTrace. Primarily this includes the installation of the J-Link software and documentation package, which also includes a kernel mode J-Link USB driver in your host system.
4.1Installing the J-Link ARM software and documentation pack
J-Link is shipped with a bundle of applications, corresponding manuals and some
example projects and the kernel mode J-Link USB driver. Some of the applications
require an additional license, free trial licenses are available upon request from
www.segger.com.
Refer to chapter J-Link and J-Trace related software on page 61 for an overview
about the J-Link software and documentation pack.
4.1.1Setup procedure
To install the J-Link ARM software and documentation pack, follow this procedure:
Note:We recommend to check if a newer version of the J-Link software and documentation pack is available for download before starting the installation. Check
therefore the J-Link related download section of our website:
http://www.segger.com/download_jlink.html
1.Before you plug your J-Link / J-Trace into your computer's USB port, extract the
setup tool Setup_JLinkARM_V<VersionNumber>.zip. The setup wizard will
install the software and documentation pack that also includes the certified JLink USB driver. Start the setup by double clicking Setup_JLinkARM_V<Version-Number>.exe. The license Agreement dialog box will be opened. Accept the
terms with the Yes button.
2.The Welcome dialog box is opened. Click Next > to open the Choose Destination Location dialog box.
3.Accept the default installation path C:\Program Files\SEGGER\JLinkARM_V<VersionNumber> or choose an alternative location. Confirm
your choice with the Next > button.
4.The Choose options dialog is opened. The Create entry in start menu and the
Add shortcuts to desktop option are preselected. Accept or deselect the
options and confirm the selection with the Next > button.
6.The Installation Complete dialog box appears after the copy process. Close the
installation wizard with the Finish > button.
The J-Link software and documentation pack is successfully installed on your PC.
7.Connect your J-Link via USB with your PC. The J-Link will be identified and after
a short period the J-Link LED stops rapidly flashing and stays on permanently.
After installing the J-Link ARM software and documentation package it should not be
necessary to perform any additional setup sequences in order to configure the USB
interface of J-Link.
4.2.1Verifying correct driver installation
To verify the correct installation of the driver, disconnect and reconnect J-Link / JTrace to the USB port. During the enumeration process which takes about 2 seconds,
the LED on J-Link / J-Trace is flashing. After successful enumeration, the LED stays
on permanently.
Start the provided sample application JLink.exe, which should display the compilation time of the J-Link firmware, the serial number, a target voltage of 0.000V, a
complementary error message, which says that the supply voltage is too low if no
target is connected to J-Link / J-Trace, and the speed selection. The screenshot below
shows an example.
83
In addition you can verify the driver installation by consulting the Windows device
manager. If the driver is installed and your J-Link / J-Trace is connected to your computer, the device manager should list the J-Link USB driver as a node below "Universal Serial Bus controllers" as shown in the following screenshot:
Right-click on the driver to open a context menu which contains the command Properties. If you select this command, a J-Link driver Properties dialog box is opened
and should report: This device is working properly.
If you experience problems, refer to the chapter Support and FAQs on page 259 for
help. You can select the Driver tab for detailed information about driver provider,
version, date and digital signer.
4.2.2Uninstalling the J-Link USB driver
If J-Link / J-Trace is not properly recognized by Windows and therefore does not enumerate, it makes sense to uninstall the J-Link USB driver.
This might be the case when:
•The LED on the J-Link / J-Trace is rapidly flashing.
•The J-Link / J-Trace is recognized as Unknown Device by Windows.
To have a clean system and help Windows to reinstall the J-Link driver, follow this
procedure:
1.Disconnect J-Link / J-Trace from your PC.
2.Open the Add/Remove Programs dialog (Start > Settings > Control Panel> Add/Remove Programs) and select Windows Driver Package - Segger
Some emulators of the J-Link family have (or future members will have) an additional
Ethernet interface, to communicate with the host system. These emulators will also
come with a built-in web server which allows configuration of the emulator via web
interface. In addition to that, you can set a default gateway for the emulator which
allows using it even in large intranets. For simplicity the setup process of J-Link Pro
(referred to as J-Link) is described in this section.
4.3.1Configuring J-Link using J-Link Configurator
The J-Link software and documentation package comes with a free GUI-based utility
called J-Link Configurator which auto-detects all J-Links that are connected to the
host PC via USB & Ethernet. The J-Link Configurator allows the user to setup the IP
interface of J-Link. For more information about how to use the J-Link Configurator,
please refer to J-Link Configurator on page 89.
4.3.2Configuring J-Link using the webinterface
All emulators of the J-Link family which come with an Ethernet interface also come
with a built-in web server, which provides a web interface for configuration. This
enables the user to configure J-Link without additional tools, just with a simple web
browser. The Home page of the web interface shows the serial number, the current
IP address and the MAC address of the J-Link.
The Network configuration page allows configuration of network related settings
(IP address, subnet mask, default gateway) of J-Link. The user can choose between
automatic IP assignment (settings are provided by a DHCP server in the network)
and manual IP assignment by selecting the appropriate radio button.
Normally, no configuration is required, especially when using J-Link via USB. For special cases like: having multiple older J-Links connected to the same host PC in parallel, they need to be re-configured to be identified by their real serial number when
enumerating on the host PC. This is the default identification method for current JLinks (J-Link with hardware version 8 or later). For re-configuration of old J-Links or
for configuration of the IP settings (use DHCP, IP address, subnet mask, ...) of a JLink supporting the Ethernet interface, SEGGER provides a GUI-based tool, called JLink Configurator. The J-Link Configurator is part of the J-Link software and documentation package and can be used free of charge.
89
4.5.1Configure J-Links using the J-Link Configurator
A J-Link can be easily configured by selecting the appropriate J-Link from the emulator list and using right click -> Configure.
In order to configure a J-Link to use the new USB identification method (reporting
the real serial number) simply select "Real SN" as USB identification method and
click the OK button. The same dialog also allows configuration of the IP settings of
the connected J-Link if it supports the Ethernet interface.
Note:When re-configuring older J-Links which use the old enumeration method
(USB identification: USB 0 - USB 3) you can only have 1 J-Link connected which uses
the old method at the same time. So re-configuration has to be done one at a time.
In general, when using USB, there are two ways in which a J-Link can be identified:
•By serial number
•By USB address
Default configuration of J-Link is: Identification by serial number. Identification via
USB address is used for compatibility and not recommended.
Background information
"USB address" really means changing the USB-Product Id (PID).
The following table shows how J-Links enumerate in the different identification
modes.
IdentificationPIDSerial number
Serial number (default)0x0101
USB address 0 (Deprecated)0x0101123456
USB address 1 (Deprecated)0x0102123456
USB address 2 (Deprecated)0x0103123456
USB address 3 (Deprecated)0x0104123456
Table 4.1: J-Link enumeration in different identification modes
Serial number is real serial number of the
J-Link or user assigned.
91
4.6.1Connecting to different J-Links connected to the same
host PC via USB
In general, when having multiple J-Links connected to the same PC, the J-Link to
connect to is explicitly selected by its serial number. Most software/debuggers provide an extra field to type-in the serial number of the J-Link to connect to:
The following screenshot shows the connection dialog of the J-Flash software:
The following screenshot shows the connection dialog of IAR EWARM:
For debuggers / software which does not provide such a functionality, the J-Link DLL
automatically detects that mutliple J-Links are connected to the PC and shows a
selection dialog which allows the user to select the appropriate J-Link he wants to
connect to.
So even in IDEs which do not have an selection option for the J-Link, it is possible to
connect to different J-Links.
In general, J-Link / J-Trace should be powered on before connecting it with the target
device. That means you should first connect J-Link / J-Trace with the host system via
USB and then connect J-Link / J-Trace with the target device via JTAG. Power-on the
device after you connected J-Link / J-Trace to it.
5.1.2Verifying target device connection
If the USB driver is working properly and your J-Link / J-Trace is connected with the
host system, you may connect J-Link / J-Trace to your target hardware. Then start
JLink.exe which should now display the normal J-Link / J-Trace related information
and in addition to that it should report that it found a JTAG target and the target’s
core ID. The screenshot below shows the output of JLink.exe. As can be seen, it
reports a J-Link with one JTAG device connected.
5.1.3Problems
If you experience problems with any of the steps described above, read the chapter
Support and FAQs on page 259 for troubleshooting tips. If you still do not find appropriate help there and your J-Link / J-Trace is an original SEGGER product, you can
contact SEGGER support via e-mail. Provide the necessary information about your
target processor, board etc. and we will try to solve your problem. A checklist of the
required information together with the contact information can be found in chapter
Support and FAQs on page 259 as well.
J-Link uses indicators (LEDs) to give the user some information about the current
status of the connected J-Link. All J-Links feature the main indicator. Some newer JLinks such as the J-Link Pro / Ultra come with additional input/output Indicators. In
the following, the meaning of these indicators will be explained.
5.2.1Main indicator
For J-Links up to V7, the main indicator is single color (Green). J-Link V8 comes with
a bi-color indicator (Green & Red LED), which can show multiple colors: green, red
and orange.
5.2.1.1Single color indicator (J-Link V7 and earlier)
Indicator statusMeaning
GREEN, flashing at 10 Hz Emulator enumerates.
Emulator is in operation. Whenever the emulator is executing a command, the LED is switched off temporarily.
GREEN, flickering
GREEN, constantEmulator has enumerated and is in Idle mode.
Flickering speed depends on target interface speed. At
low interface speeds, operations typically take longer and
the "OFF" periods are typically longer than at fast
speeds.
GREEN, switched off for
10ms once per second
GREEN, flashing at 1 Hz
Table 5.1: J-Link single color main indicator
J-Link heart beat. Will be activated after the emulator
has been in idle mode for at least 7 seconds.
Emulator has a fatal error. This should not normally happen.
5.2.1.2Bi-color indicator (J-Link V8)
Indicator statusMeaning
GREEN, flashing at 10 Hz Emulator enumerates.
Emulator is in operation. Whenever the emulator is executing a command, the LED is switched off temporarily.
GREEN, flickering
GREEN, constantEmulator has enumerated and is in Idle mode.
Flickering speed depends on target interface speed. At
low interface speeds, operations typically take longer and
the "OFF" periods are typically longer than at fast
speeds.
GREEN, switched off for
10ms once per second
ORANGEReset is active on target.
RED, flashing at 1 Hz
Table 5.2: J-Link single color LED main color indicator
J-Link heart beat. Will be activated after the emulator
has been in idle mode for at least 7 seconds.
Emulator has a fatal error. This should not normally happen.
2004-2012 SEGGER Microcontroller GmbH & Co. KG
Page 97
5.2.2Input indicator
Some newer J-Links such as the J-Link Pro/Ultra come with additional input/output
Indicators. The input indicator is used to give the user some information about the
status of the target hardware.
5.2.2.1Bi-color input indicator
Indicator statusMeaning
GREENTarget voltage could be measured. Target is connected.
97
ORANGE
RED
Table 5.3: J-Link bi-color input indicator
Target voltage could be measured. RESET is pulled low
(active) on target side.
RESET is pulled low (active) on target side. If no target is
connected, reset will be also active on target side.
5.2.3Output indicator
Some newer J-Links such as the J-Link Pro/Ultra come with additional input/output
Indicators. The output indicator is used to give the user some information about the
emulator-to-target connection.
5.2.3.1Bi-color output indicator
Indicator statusMeaning
OFFTarget power supply via Pin 19 is not active.
GREENTarget power supply via Pin 19 is active.
ORANGE
Target power supply via Pin 19 is active. Emulator pulls
RESET low (active).
By default, only one ARM device is assumed to be in the JTAG scan chain. If you have
multiple devices in the scan chain, you must properly configure it. To do so, you have
to specify the exact position of the ARM device that should be addressed. Configuration of
the scan is done by the target application. A target application can be a debugger
such as the IAR C-SPY® debugger, ARM’s AXD using RDI, a flash programming application such as SEGGER’s J-Flash, or any other application using J-Link / J-Trace. It is
the application’s responsibility to supply a way to configure the scan chain. Most
applications offer a dialog box for this purpose.
5.3.1Multiple devices in the scan chain
J-Link / J-Trace can handle multiple devices in the scan chain. This applies to hardware where multiple chips are connected to the same JTAG connector. As can be seen
in the following figure, the TCK and TMS lines of all JTAG device are connected, while
the TDI and TDO lines form a bus.
Device 1Device 0
TDITDITDOTDO
TMS
TRST
TCK
TCK
TMS
TDI
TRST
TMS
TRST
TCK
TDO
JTAG
Currently, up to 8 devices in the scan chain are supported. One or more of these
devices can be ARM cores; the other devices can be of any other type but need to
comply with the JTAG standard.
5.3.1.1Configuration
The configuration of the scan chain depends on the application used. Read JTAG
interface on page 98 for further instructions and configuration examples.
5.3.2Sample configuration dialog boxes
As explained before, it is responsibility of the application to allow the user to configure the scan chain. This is typically done in a dialog box; some sample dialog boxes
are shown below.
This dialog can be found under RDI|Configure for example in IAR Embedded Workbench®. For detailed information check the IAR Embedded Workbench user guide.
IAR J-Link configuration dialog box
This dialog box can be found under Project|Options.