UM08001 J-Link / J-Trace User Guide

From SEGGER Wiki
Revision as of 16:14, 19 June 2020 by Leon (talk | contribs) (Working with J-Link and J-Trace)
Jump to: navigation, search

This is the user documentation for owners of SEGGER debug probes, J-Link and J-Trace. This manual documents the software which with the J-Link Software and Documentation Package as well as advanced features of J-Link and J-Trace, like Real Time Transfer ( RTT), J-Link Script Files or Trace.

Note: This wiki page is work in progress. Until this wiki page is finished, please refer to UM08001.pdf for additional information.

J-Link software and documentation package

The J-Link Software and Documentation Pack, available for download on the SEGGER homepage, includes applications to be used with J-Link and J-Trace and in some cases Flasher.
It also comes with USB-drivers for J-Link, J-Trace and flasher, as well as documentation in PDF format.

Software overview

Software Description
J-Link Commander Command-line tool with basic functionality for target analysis.
J-Link GDB Server The J-Link GDB Server is a server connecting to the GNU Debugger (GDB) via TCP/IP. It is required for toolchains using the GDB protocol to connect to J-Link.
J-Link GDB Server CL Command line version of the J-Link GDB Server. Same functionality as the GUI version.
J-Link Remote Server Utility which provides the possibility to use J-Link / J-Trace remotely via TCP/IP.
J-Mem Target memory viewer. Shows the memory content of a running target and allows editing as well.
J-Flash1 Stand-alone flash programming application.
J-Flash Lite Stand-alone flash programming application with reduced feature set of J-Flash.
J-Link RTT Viewer Displays the terminal output of the target using RTT. Can be used in parallel with a debugger or stand-alone.
J-Link SWO Viewer Displays the terminal output of the target using the SWO pin. Can be used in parallel with a debugger or stand-alone.
J-Link SWO Analyzer Command line tool that analyzes SWO RAW output and stores it into a file.
JTAGLoad Command line tool that opens an svf file and sends the data in it via J-Link / J-Trace to the target.
J-Link Configurator GUI-based configuration tool for J-Link. Allows configuration of USB identification as well as TCP/IP identification of J-Link debug probes.
RDI support (JLinkRDI.dll)1 Provides Remote Debug Interface (RDI) support. This allows the user to use J-Link with any RDI-compliant debugger.
J-Link STR91x Commander Command line tool for handling specific STR91x processors.
J-Link STM32 Unlock Command line tool for handling specific STM32 processors.
J-Run Command line utility for automated tests.

1: Full-featured J-Link (PLUS, PRO, ULTRA+) or an additional license for J-Link Base model required.

Troubleshooting

If you have troubles downloading or installing the J-Link Software and Documentation pack, please refer to the following section.

Windows Defender under Windows 10

For some versions of the J-Link Software Pack, Windows Defender under Windows 10 triggered a false positive alarm for "Trojan:Win32/Tulim.C!plock" which disabled the download of the software package. This has been recently fixed by Microsoft via new virus definitions. Please make sure that Windows Defender virus definitions are up to date when downloading the package and are at least at the following version: Antivirus definition: 1.213.5588.0

Working with J-Link and J-Trace

TBD

JTAG interface

JTAG Speed

Fixed JTAG speed

The target is clocked at a fixed clock speed. The maximum JTAG speed the target can handle depends on the target itself. In general CPU cores without JTAG synchronization logic (such as ARM7-TDMI) can handle JTAG speeds up to the CPU speed, ARM cores with JTAG synchronization logic (such as ARM7-TDMI-S, ARM946E-S, ARM966EJ-S) can handle JTAG speeds up to 1/6 of the CPU speed. JTAG speeds of more than 10 MHz are not recommended.

Automatic JTAG speed

Selects the maximum JTAG speed handled by the TAP controller.

Note:
On ARM cores without synchronization logic, this may not work reliably, because the CPU core may be clocked slower than the maximum JTAG speed.

Adaptive clocking

If the target provides the RTCK signal, select the adaptive clocking function to synchronize the clock to the processor clock outside the core. This ensures there are no synchronization problems over the JTAG interface.

Note:
If you use the adaptive clocking feature, transmission delays, gate delays, and synchronization requirements result in a lower maximum clock frequency than with non-adaptive clocking.

J-Link WiFi setup

J-Link WiFi can be set up in multiple ways.

1) Using J-Link Commander:

  • Connect J-Link WiFi to your computer via USB
  • Start J-Link Commander (JLink.exe)
  • Set up the SSID of your wireless network with the following command: SetWifi SSID <your_wifi_ssid>
  • Set up the password to your wireleass network with the following command: SetWifi Pass <your_wifi_password>
  • After a few seconds, J-Link WiFi should be connected to your wireless network (the green WiFi LED should be always on).

To get the IP address:

  • After performing the steps listed above, issue the following command in J-Link Commander: USB
  • J-Link WiFi will reconnect via USB and provide its IP address, e.g.: IP-Addr: 10.1.1.114 (DHCP)
  • When connecting to J-Link WiFi later on via IP, use this IP address to establish the connection

2) Using J-Link Configurator:

  • Connect J-Link WiFi to your computer via USB
  • Start J-Link Configurator (JLinkConfig.exe)
  • Right-click on the J-Link WiFi in the list of connected J-Links and select 'Configure'
  • In the WiFi configuration section, enter the SSID and the password of your wireless network
  • Click OK
  • Unplug and reconnect your J-Link WiFi
  • Click OK
  • After a few seconds, J-Link WiFi should be connected to your wireless network (the green WiFi LED should be always on).

To get the IP address:

  • Start J-Link Commander (JLink.exe)
  • J-Link WiFi will connect via USB and provide its IP address, e.g.: IP-Addr: 10.1.1.114 (DHCP)
  • When connecting to J-Link WiFi later on via IP, use this IP address to establish the connection

J-Link WiFi in J-Link Configurator

JLink WiFi will only be shown in the Configurator if connected via USB. This is because the Configurator uses UDP broadcast packets to find J-Links in the network. However, most routers have UDP broadcast and UDP multicast packets disabled for WiFi networks.

JTAG interface

Determining values for scan chain configuration

TBD

J-Link script files

TBD

Semihosting

TBD

Enabling semihosting in J-Link GDBServer

TBD

Contacting support

Before contacting support, make sure you tried to solve the problem by following the steps outlined in the J-Link troubleshooting guide.
Please also try your J-Link / J-Trace with another PC and if possible with another target system to see if it works there.
If the device functions correctly, the USB setup on the original machine or your target hardware is the source of the problem, not J-Link / J-Trace.
If you require support and your poduct is still within valid support period, or you encountered a bug, please contact us via the contact form on the SEGGER homepage.
Otherwise, feel free to ask your questions in the SEGGER community forum.

Please make sure to provide:

  • A detailed description of the problem.
  • J-Link/J-Trace serial number.
  • A screenshot of the entire J-Link Commander output.
  • Your findings of the signal analysis.
  • Information about your target hardware (processor, board, etc.).

J-Link / J-Trace is sold directly by SEGGER or as OEM-product by other vendors. Please note that SEGGER can only support official SEGGER products.