Page 1
J-Link / J-Trace User Guide Software Version V4.84 Manual Rev. 0 Date: March 21, 2014 Document: UM08001 A product of SEGGER Microcontroller GmbH & Co. KG www.segger.com...
Page 2
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.
Page 3
Added command line option parameter to specify a customized scan-chain. Chapter "Working with J-Link" * Section "Virtual COM Port (VCOM) added. Chapter "Setup" * Section "Getting started with J-Link and DS-5" Chapter "Related Software" V4.82 Rev. 0 140218 * Section "GDB Server"...
For simplicity, we will refer to J-Link ARM as J-Link in this manual. For simplicity, we will refer to J-link Pro as J-Link Pro in this manual. Typographic conventions This manual uses the following typographic conventions:...
Page 14
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 develop- ment, debugging and production, which has rapidly become the industry standard debug probe for microcontrollers / microprocessors.
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 function- ality. Flasher ARM connects via USB or via RS232 interface to a PC, running Microsoft Windows 2000, Windows XP, Windows 2003 or Windows Vista.
Page 16
3.11.2 J-Link STM32 Unlock (Command line tool) ..........112 3.12 J-Link Software Developer Kit (SDK) ............114 4 Setup..........................115 Installing the J-Link software and documentation pack ........116 4.1.1 Setup procedure ..................116 Setting up the USB interface..............119 4.2.1 Verifying correct driver installation ............119 4.2.2...
Page 17
4.8.2 Using J-Link in DS-5 Development Studio ..........131 5 Working with J-Link and J-Trace..................133 Connecting the target system..............134 5.1.1 Power-on sequence................134 5.1.2 Verifying target device connection ............134 5.1.3 Problems ....................134 Indicators ..................... 135 5.2.1 Main indicator ..................135 5.2.2...
Page 18
8.4.4 Configuration dialog ................224 Semihosting ..................233 8.5.1 Overview ....................233 8.5.2 The SWI interface ..................233 8.5.3 Implementation of semihosting in J-Link RDI ..........234 8.5.4 Semihosting with AXD................234 8.5.5 Unexpected / unhandled SWIs ..............235 9 Device specifics ......................237 Analog Devices ..................238 9.1.1 ADuC7xxx .....................238...
Page 19
J-Trace integration example - IAR Embedded Workbench for ARM ....291 11.3 Embedded Trace Buffer (ETB) ..............295 11.4 Flash programming ................296 11.4.1 How does flash programming via J-Link / J-Trace work?......296 11.4.2 Data download to RAM ................296 11.4.3 Data download via DCC ................296 11.4.4 Available options for flash programming ...........
Introduction Requirements Host System 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 Supported OS on page 23. Target System A target system with a supported CPU is required.
Supported OS J-Link/J-Trace can be used on the following operating systems: • Microsoft Windows 2000 • Microsoft Windows XP • Microsoft Windows XP x64 • Microsoft Windows Vista • Microsoft Windows Vista x64 • Windows 7 • Windows 7 x64 •...
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.
A9/R4 JTAG ETM Trace Software features 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. J-Trace J-Link J-Link J-Link...
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 23. J-Link has a built-in 20-pin JTAG connector, which is compatible with the standard 20-pin connector defined by ARM.
Page 27
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.
Page 28
Identical to version 9.1 with the following exception: • Pin 1 (VTref) is used for measuring target reference voltage only. Buffers on J- Link side are no longer powered through this pin but via the J-Link internal volt- age supplied via USB. J-Link / J-Trace (UM08001)
CPU core etc. 1.3.3.2 Specifications 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).
Table 1.2: J-link ULTRA specifications 1.3.4 J-Link PRO 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, Linux or Mac OS X.
Identical to version 4 with the following exception: • Pin 1 (VTref) is used for measuring target reference voltage only. Buffers on J- Link side are no longer powered through this pin but via the J-Link internal volt- age supplied via USB. 1.3.5 J-Link Lite ARM J-Link Lite ARM is a fully functional OEM-version of J-Link.
Table 1.3: J-Link Lite specifications 1.3.6 J-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 inex- pensive emulator solution for you.
J-Trace for Cortex-M is a JTAG/SWD emulator designed for Cor- tex-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.
J-Flash soft- ware 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.1 Specifications The following table gives an overview about the specifications (general, mechanical, electrical) for Flasher ARM.
10 kOhm Table 1.9: Flasher ARM specifications 1.3.10 J-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.
Memory viewer (J-Mem) included • Remote 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 •...
Supported CPU cores 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. • ARM7TDMI (Rev 1) •...
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.
Page 43
Instability, especially on slow targets Due to the fact that a lot of USB transactions would cause a very bad perfor- mance 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.
1.6.3 Firmware intelligence per model There are different models of J-Link / J-Trace which have built-in intelligence for dif- ferent 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.
Page 45
1.6.3.2 Older models The table below lists the firmware CPU support for older J-Link & J-Trace models which are not sold anymore. Cortex- Renesas Cortex-M J-Link / J-Trace RX600 model JTAG JTAG JTAG JTAG JTAG not sup- J-Link " "...
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 J- Link. The following tables list which features of J-Link / J-Trace can be used with the different IDEs.
CHAPTER 2 Licensing Components requiring a license The following programs/features require a full-featured J-Link (PLUS, ULTRA+, PRO, J-Trace) or an additional license for the J-Link base model: • J-Flash • J-Link RDI • Flash breakpoints (FlashBP) J-Link / J-Trace (UM08001)
J-Link PLUS, J-Link ULTRA+ and J-Link Pro. Key-based license This type of license is used if you already have a J-Link, but order a license for a J- Link software component at a later time. In addition to that, the key-based license is used for trial licenses.
Use of software SEGGER J-Link software may only be used with original SEGGER products and autho- rized OEM products. The use of the licensed software to operate SEGGER product clones is prohibited and illegal.
Original SEGGER products The following products are original SEGGER products for which the use of the J-Link software is allowed: 2.4.1 J-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 ULTRA+ is a JTAG/SWD emulator designed for ARM/Cor- tex and other supported CPUs. It is fully compatible to the stan- dard 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.
J-Trace for Cortex-M is a JTAG/SWD emulator designed for Cor- tex-M cores which include trace (ETM) support. J-Trace for Cor- tex-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.
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 func- tionality. Flasher ARM connects via USB or via RS232 interface to a PC, running Microsoft Windows 2000, Windows XP, Windows 2003 or Windows Vista.
J-Flash soft- ware 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, Win- dows XP, Windows 2003 or Windows Vista.
In any case, it should be possible to use the J-Link software with these OEM versions. How- ever, proper function cannot be guaranteed for OEM versions. SEGGER Microcontrol- ler does not support OEM versions;...
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.
No licenses are included. All licenses can be added. Note J-Link Lite ARM 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 / J-Trace (UM08001)
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.
Selects a command file and starts J-Link Commander in batch mode. The batch mode of J-Link Commander is similar to the execution of a batch file. The command file is parsed line by line and one command is executed at a time.
3.2.2 Using command files J-Link commander can also be used in batch mode which allows the user to use J- Link commander for batch processing and without user interaction. Please do not confuse command file with J-Link script files (please refer to J-Link script files on page 163 for more information about J-Link script files).
IDEs like emIDE or Eclipse. J-Link GDB Server is a remote server for GDB making it possible for GDB to connect to and communicate with the target device via J-Link. GDB Server and GDB commu- nicate via a TCP/IP connection, using the standard GDB remote protocol.
3.3.2 Debugging with J-Link GDB Server With J-Link GDB Server programs can be debugged via GDB directly on the target device like a normal application. The application can be loaded into RAM or flash of the device. Before starting GDB Server make sure a J-Link and the target device are connected.
Page 68
Stay on top • Show log window • Generate logfile: If checked, a log file with the GDB <-> GDB Server <-> J-Link communication will be created. • Verify download: If checked, the memory on the target will be verified after download.
3.3.3 Supported remote (monitor) commands J-Link GDB Server comes with some functionality which are not part of the standard GDB. These functions can be called either via a gdbinit file passed to GDB Server or via monitor commands passed directly to GDB, forwarding them to GDB Server.
Page 72
-device instead. Select the target interface. interface Note: Use command line option instead. Sets the JTAG speed of J-Link / J-Trace. Note: For the initial connection speed, use com- speed mand line option instead. -speed Table 3.3: GDB remote commands Note: The remote commands are case-insensitive.
Page 75
Deprecated. Use command line option instead. Syntax interface <InterfaceIdentifier> Description Selects the target interface used by J-Link / J-Trace. 3.3.3.11 jtagconf Syntax jtagconf <IRPre> <DRPre> Description Configures a JTAG scan chain with multiple devices on it. <IRPre> is the sum of IRLens of all devices closer to TDI, where IRLen is the number of bits in the IR (Instruction Register) of one device.
Page 77
Add. information There are different reset strategies for different CPUs. Moreover, the reset strategies which are available differ from CPU core to CPU core. J-Link can perform various reset strategies and always selects the best fitting strategy for the selected device.
Page 80
<kHz>|auto|adaptive Description Sets the JTAG speed of J-Link / J-Trace. Speed can be either fixed (in kHz), automatic recognition or adaptive. In general, Adaptive is recommended if the target has an RTCK signal which is connected to the corresponding RTCK pin of the device (S-cores only).
Page 81
SWO EnableTarget <CPUFreq[Hz]> <SWOFreq[Hz]> <PortMask[0x01-0xFFFFFFFF] <Mode[0]> Description Configures the target to be able to output SWO data and starts J-Link to capture it. CPU and SWO frequency can be 0 for auto-detection. If CPUFreq is 0, J-Link will measure the current CPU speed.
Page 82
SWO GetSpeedInfo Description Prints the base frequency and the minimum divider of the connected J-Link. With this, the available SWO speeds for J-Link can be calculated and the matching one for the target CPU frequency can be selected. Example > monitor SWO GetSpeedInfo <...
3.3.4 SEGGER-specific GDB protocol extensions J-Link GDB Server implements some functionality which are not part of the standard GDB remote protocol in general query packets. These SEGGER-specific general query packets can be sent to GDB Server on the low-level of GDB, via maintanace com- mands, or with a custom client connected to GDB Server.
Page 84
Configures STRACE for usage. Configuration for example includes specification of the trace port width to be used for tracing (1-bit, 2-bit, 4-bit (default) Port- Width=%Var%. Note: For more information please refer to UM08002 (J-Link SDK user guide), chapter STRACE. Response <ReturnValue>...
Page 85
Description Read the last recently called instruction addresses. The addresses are returned LIFO, meaning the last recent address is returned first. Note: For more information please refer to UM08002 (J-Link SDK user guide), chapter STRACE. Response <ReturnValue>[<Item0><Item1>...] ReturnValue is a 4 Byte signed integer.
3.3.5 Command line options There are several command line options available for the GDB Server which allow configuration of the GDB Server before any connection to a J-Link is attempted or any connection from a GDB client is accepted. Note:...
Page 87
-notimeout Start GDB Server in single run mode. -singlerun Use a J-Link scriptfile. -scriptfile Select the interface to connect to J-Link (USB/IP). -select Select the J-Link Settings File. -settingsfile Execute a gdb file on first connection. Execute a gdb file on every connection.
Page 88
3.3.5.2 -device Description Tells GDBServer to which device J-Link is connected before the connect sequence is actually performed. It is recommended to use the command line option to select the device instead of using the remote command since for some devices J-Link already needs to know the device at the time of connecting to it since some devices need special connect sequences (e.g.
Page 89
Example jlinkgdbserver -endian little 3.3.5.4 -if Description Selects the target interface which is used by J-Link to connect to the device. The default value is JTAG. Note: Using GDB Server CL this option is mandatory to correctly connect to the target, and should be given before connection via GDB.
Page 92
3.3.5.18 -scriptfile Description Passes the path of a J-Link script file to the GDB Server. This scriptfile is executed before the GDB Server starts the debugging / identifying communication with the tar- get. J-Link scriptfiles are mainly used to connect to targets which need a special con- nection sequence before communication with the core is possible.
Page 93
3.3.5.20 -settingsfile Description Select a J-Link settings file to be used for the target device. The settings fail can con- tain all configurable options of the Settings tab in J-Link Control panel. Syntax -SettingsFile <PathToFile>...
J-Link Remote 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. Perfor- mance is just slightly (about 10%) lower than with direct USB connection.
The Remote server provides a tunneling mode which allows remote connection to a J- Link / J-Trace from any computer, even from outside the local network. To give access to a J-Link neither a remote desktop or vpn connection nor changing some difficult firewall settings are necessary.
Page 98
J-Link software and documentation package Start J-Link Remote Server in tunneling mode Connect to the J-Link / J-Trace via J-Link commander J-Link Commander can be used to verify a connection to the J-Link can be estab- lished as follows: Start J-Link Commander From within J-Link Commander enter ip tunnel:<SerialNo>...
J-Flash is an application to program data images to the flash of a target device. With J-Flash the internal flash of all J-Link supported devices can be programmed, as well as common external flashes connected to the device. Beside flash programming all other flash operations like erase, blank check and flash content verification can be done.
Commandline-only version of SWO Viewer. All commands avaible for J-Link SWO Viewer can be used with J-Link SWO Viewer Cl. Similar to the GUI Version,J-Link SWO Viewer Cl asks for a device name or CPU clock speed at startup to be able to...
3.7.2 List of available command line options J-Link SWO Viewer can also be controlled from the command line if used in a auto- mated test environment etc. When passing all necessary information to the utility via command line, the configu- ration dialog at startup is suppressed.
Page 104
Example -settingsfile "C:\Temp\Settings.jlink" 3.7.2.7 swofreq Define the SWO frequency that shall be used by J-Link SWO Viewer for sampling SWO data. Usually not necessary to define since optimal SWO speed is calculated automatically based on the CPU frequency and the capabilities of the connected J-Link.
Usage SWOAnalyzer.exe <SWOfile> This can be achieved by simply dragging the SWO output file created by the J-Link DLL onto the executable. 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.
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 addi- tional features available which build on the RDI software foundation.
Selects a command file and starts J-Link STR91x Commander in batch mode. The batch mode of J-Link Commander is similar to the execution of a batch file. The com- mand file is parsed line by line and one command is executed at a time.
To select from a list of all available emulators on Ethernet, please use * as <IPAddr>. -SelectEmuBySN Connect to a J-Link with a specific serial number via USB. Useful if multiple J-Links are connected to the same PC and multiple instances of J-Link STR91x Commander shall run and each connects to another J-Link.
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...
Chapter 4 Setup This chapter describes the setup procedure required in order to work with J-Link / J- Trace. Primarily this includes the installation of the J-Link software and documenta- tion package, which also includes a kernel mode J-Link USB driver in your host sys- tem.
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 software and documentation package on page 61 for an over- view about the J-Link software and documentation pack. 4.1.1...
Page 117
Next > button. The Choose options dialog is opened. The Install J-Link Serial Port Driver installs the driver for J-Links with CDC functionality. It is not preselected since J-Links without CDC functionality do not need this driver.
Page 118
Setup The installation process will be started. The J-Link DLL Updater pops up, which allows you to update the DLL of an installed IDE to the DLL verion which is included in the installer. For furhter infor- mation about the J-Link DLL updater, please refer to J-Link DLL updater on page 129.
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 com- puter, the device manager should list the J-Link USB driver as a node below "Univer- sal Serial Bus controllers"...
4.2.2 Uninstalling the J-Link USB driver If J-Link / J-Trace is not properly recognized by Windows and therefore does not enu- merate, it makes sense to uninstall the J-Link USB driver. This might be the case when: •...
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 125.
Page 123
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.
PC. This is the default identification method for current J- Links (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 J- Link supporting the Ethernet interface, SEGGER provides a GUI-based tool, called J- Link Configurator.
Page 126
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.
J-Link USB identification 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.
Page 128
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. J-Link / J-Trace (UM08001)
What is the JLink DLL? 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 / J- Trace available through the exported functions.
RDDI DLL in DS-5. An backup of the original DLL is made automatically. 4.8.1 Replacing the RDDI DLL manually If J-Link DLL Updater is unable to find a DS-5 installation and does not list it for updating, the RDDI DLL can always be replaced manually. For more information about...
5.1.2 Verifying 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...
5.2.1 Main 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.
Page 136
GREEN, constant Emulator has enumerated and is in Idle mode. GREEN, switched off for J-Link heart beat. Will be activated after the emulator 10ms once per second has been in idle mode for at least 7 seconds. Emulator has a fatal error. This should not normally hap- GREEN, flashing at 1 Hz pen.
5.2.2 Input 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.1 Bi-color input indicator Indicator status...
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 applica- tion’s responsibility to supply a way to configure the scan chain. Most applications offer a dialog box for this purpose.
If only one device is connected to the scan chain, the default configuration can be used. In other cases, J-Link / J-Trace may succeed in automatically recognizing the devices on the scan chain, but whether this is possible depends on the devices present on the scan chain.
Table 5.6: J-Link supported SWO input speeds 5.4.2.2 Configuring SWO speeds The max. SWO speed in practice is the max. speed which both, target and J-Link can handle. J-Link can handle the frequencies described in SWO on page 143 whereas the max.
Page 144
Example 2 Target CPU running at 10 MHz. Possible SWO output speeds are: 10MHz, 5MHz, 3.33MHz, ... J-Link V7: Supported SWO input speeds are: 6MHz / n, n>= 1: 6MHz, 3MHz, 2MHz, 1.5MHz, ... Permitted combinations are: SWO output SWO input...
Multi-core debugging J-Link / J-Trace is able to debug multiple cores on one target system connected to the same scan chain. Configuring and using this feature is described in this section. 5.5.1 How multi-core debugging works Multi-core debugging requires multiple debuggers or multiple instances of the same debugger.
Working with J-Link and J-Trace 5.5.2 Using multi-core debugging in detail Connect your target to J-Link / J-Trace. Start your debugger, for example IAR Embedded Workbench for ARM. Choose Project|Options and configure your scan chain. The picture below shows the configuration for the first CPU core on your target.
In general, it is possible to have an unlimited number of J-Links / J-Traces connected to the same PC. Current J-Link models are already factory-configured to be used in a multi-J-Link environment, older J-Links can be re-configured to use them in a multi- J-link environment.
Page 150
CHAPTER 5 Working with J-Link and J-Trace In order to re-configure a J-Link to use the new USB identification method use the J- Link Configurator which comes with the J-Link software and documentation package. For more information about the J-Link Configurator and how to use it, please refer to J-Link Configurator on page 125.
J-Link features such as flash download, flash breakpoints and instruction set simulation. The J-Link control panel window can be accessed via the J-Link tray icon in the tray icon list. This icon is available when the debug session is started.
Page 152
Section: Flash download In this section, settings for the use of the J-Link FlashDL feature and related set- tings can be configured. When a license for J-Link FlashDL is found, the color indi- cator is green and "License found" appears right to the J-Link FlashDL usage settings.
Page 153
Save settings: When this button is pushed, the current settings in the Settings tab will be saved in a configuration file. This file is created by J-Link and will be created for each project and each project configuration (e.g. Debug_RAM, Debug_Flash).
Page 154
Note: It is possible for the debugger to bypass the breakpoint functionality of the J-Link software by writing to the debug registers directly. This means for ARM7/ ARM9 cores write accesses to the ICE registers, for Cortex-M3 devices write accesses to the memory mapped flash breakpoint registers and in general simple write accesses for software breakpoints (if the program is located in RAM).
Page 156
In this section SWV information are shown. • Status: Shows the encoding and the baudrate of the SWV data received by the target (Manchester/UART, currently J-Link only supports UART encoding). • Bytes in buffer: Shows how many bytes are in the DLL SWV data buffer.
Some CPUs can actually be halted before executing any instruction, because the start of the CPU is delayed after reset release. If a pause has been specified, J-Link waits for the specified time before trying to halt the CPU. This can be useful if a bootloader which resides in flash or ROM needs to be started after reset.
Page 158
No reset is performed. Nothing happens. 5.8.1.5 Type 4: Hardware, halt with WP The hardware RESET pin is used to reset the CPU. After reset release, J-Link continu- ously tries to halt the CPU using a watchpoint. This typically halts the CPU shortly after reset release;...
It is recommended that the correct device is selected in the debugger so the debugger can pass the device name to the J-Link DLL which makes it possible for J-Link to detect what is the best reset strategy for the device. Moreover, we recom- mend that the debugger uses reset type 0 to allow J-Link to dynamically select what reset is the best for the connected device.
Page 160
Clear VC_CORERESET. This type of reset may fail if: • J-Link has no connection to the debug interface of the CPU because it is in a low power mode. • The debug interface is disabled after reset and needs to be enabled by a device internal bootloader.
Page 161
This reset strategy is only guaranteed to work on "modern" J-Links (J-Link V8, J-Link Pro, J-link ULTRA, J-Trace for Cortex-M, J-Link Lite) and if a SWD speed of min. 1 MHz is used. This reset strategy should also work for J-Links with hardware version 6, but it can not be guaranteed that these J-Links are always fast enough in disabling the watchdog.
This DCC handler typically requires less than 1 µs per call. The DCC handler, as well as the optional DCC abort handler, is part of the J-Link soft- ware package and can be found in the Samples\DCC\IAR directory of the package.
Currently this function is only used to configure if the target which is connected to J-Link has an ETB or not. For more information how to configure the existence of an ETB, please refer to Global DLL variables on page 167.
Page 166
JTAG chain), which is lost at a TAP reset. Prototype __api__ int JTAG_Reset(void); 5.10.2.17SYS_Sleep() Description Waits for a given number of miliseconds. During this time, J-Link does not communi- cate with the target. Prototype __api__ int SYS_Sleep(int Delayms); J-Link / J-Trace (UM08001)
This makes sense on targets where J-Link can not perform a auto-detection of the APs which are present of the target system. Type can only be a known global J-Link DLL AP constant. For a list of all available constants, please refer to Global DLL con- stants on page 170.
Page 168
Example JTAG_TMSPin = 0; If the connected device has an ETB and you want to use it with J-link, this variable should be set to 1. Setting this variable in another function as InitEmu() does not have any effect. EMU_ETB_IsPresent...
Page 169
CoreSight information. Example CORESIGHT_CoreBaseAddr = 0x80030000; Pre-select an AP as an AHB-AP that J-Link uses for debug communication (Cortex-M). Setting this variable is necessary for example when debugging multi-core devices where multiple AHB-APs are present (one for each device).
CHAPTER 5 Working with J-Link and J-Trace Variable Description Pre-select an AP as an APB-AP that J-Link uses for debug communication (Cortex-A/R). Setting this variable is necessary for example when debugging multi-core devices where multiple APB-APs are present (one for each device). This function can only be used if a AP-layout has been configured via CORESIGHT_AddAP().
CORESIGHT_CUSTOM_AP 5.10.5 Script file language The syntax of the J-Link script file language follows the conventions of the C-lan- guage, but it does not support all expresisons and operators which are supported by the C-language. In the following, the supported operators and expressions are listed.
5.10.6 Script file writing example In the following, a short example how a J-Link script file could look like. In this example we assume a JTAG chain with two devices on it (Cortex-A8 4 bits IRLen, cus- tom device 5-bits IRLen).
Page 173
If this file is found, it is executed instead of the standard auto detection of J-Link. If this file is not present, J-Link commander behaves as before and the normal auto- detection is performed. 5.10.7.2 In debugger IDE environment To execute a script file out of your debugger IDE, simply select the script file to exe- cute in the Settings tab of the J-Link control panel and click the save button (after the debug session has been started).
Working with J-Link and J-Trace 5.11 Command strings The behavior of the J-Link can be customized via command strings passed to the JLinkARM.dll which controls J-Link. Applications such as the J-Link Commander, but also the C-SPY debugger which is part of the IAR Embedded Workbench, allow pass- ing one or more command strings.
Page 175
To avoid stalling the debug session, a critical memory area can be excluded from access: J-Link will not try to read or write to critical memory areas and instead ignore the access silently. Some debuggers (such as IAR C-SPY) can try to access memory in such areas by dereferencing non-initialized pointers even if the debugged program (the debuggee) is working perfectly.
Page 176
0x40008000-0x7FCFFFFF Reserved 0x7FD02000-0x7FD02000 Reserved 0x80000000-0xDFFFFFFF Reserved To exclude these areas from being accessed through J-Link the map exclude com- mand should be used as follows: map exclude 0x00080000-0x3FFFFFFF map exclude 0x40008000-0x7FCFFFFF map exclude 0x7FD02000-0x7FD02000 map exclude 0x80000000-0xDFFFFFFF 5.11.1.5 map indirectread This command can be used to read a memory area indirectly.
Page 178
Working with J-Link and J-Trace 5.11.1.11 SetResetType This command selects the reset startegy which shall be used by J-Link, to reset the device. The value which is used for this command is analog to the reset type which shall be selected. For a list of all reset types which are available, please refer to Reset strategies on page 157.
SupplyPower = 1 5.11.1.16 SupplyPowerDefault This command activates power supply over pin 19 of the JTAG connector perma- nently. The KS (Kickstart) versions of J-Link have the V5 supply over pin 19 activated by default. Typical applications This feature is useful for some eval boards that can be powered over the JTAG con- nector.
Page 180
0x10000000-0x3FFFFFFF 5.11.2.2 IAR Embedded Workbench The J-Link command strings can be supplied using the C-SPY debugger of the IAR Embedded Workbench. Open the Project options dialog box and select Debugger. On the Extra Options page, select Use command line options.
Because ARM7 cores have a unified cache, there is no need to handle the caches dur- ing debug. 5.13.4 Cache handling of ARM9 cores ARM9 cores with cache require J-Link / J-Trace to handle the caches during debug. If the processor enters debug state with caches enabled, J-Link / J-Trace does the fol- lowing:...
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 enable and disable the VCOM. For more information about the J-Link Configurator, please refer to J-Link Configurator on page 125.
Moreover, the J-Link DLL also allows programming of CFI-compliant external NOR flash memory. The flash down- load feature of the J-Link DLL does not require an extra license and can be used free of charge.
CHAPTER 6 Flash download Supported devices J-Link supports download into the internal flash of a large number of microcontrol- lers. You can always find the latest list of supported devices on our website: http://www.segger.com/jlink_supported_devices.html In general, J-Link can be used with any ARM7/9/11, Cortex-M0/M1/M3/M4 and Cor- tex-A5/A8/R4 core even if it does not provide internal flash.
First, choose the right device in the project settings if not already done. The device settings can be found at Project->Options->General Options->Target. To use the J-Link flash loaders, the IAR flash loader has to be disabled. To disable the IAR flash loader, the checkbox Use flash loader(s) at Project->Options->Debug- ger->Download has to be disabled, as shown below.
Page 190
First, choose the device in the project settings if not already done. The device set- tings can be found at Project->Options for Target->Device. To enable the J-Link flash loader J-Link / J-Trace at Project->Options for Tar- get->Utilities has to be selected. It is important that "Update Target before Debug- ging"...
J-Link GDB Server The configuration for the J-Link GDB Server is done by the .gdbinit file. The follow- ing command has to be added to the .gdbinit file to enable the J-Link flash down- load feature: monitor flash device <DeviceName>...
.srec), the file needs to be converted into binary first. There are various free soft- ware utilities available which allow data file conversion. Another possibility is to use J-Flash which is part of the J-Link software and documentation package. For convert- ing data files, no J-Flash license is needed.
6.4.5 J-Link RDI The configuration for J-Link RDI is done via the J-Link RDI configuration dialog. For more information about the J-Link RDI configuration dialog please refer to UM08004, J-Link RDI User Guide, chapter Configuration dialog. J-Link / J-Trace (UM08001)
Using the J-Link flash download feature with IAR Embedded Workbench / Keil MDK is quite simple: First, start the debug session and open the J-Link Control Panel. In the tab "Settings" you will find the location of the settings file.
6.5.2 J-Link GDB Server The configuration for the J-Link GDB Server is done by the .gdbinit file. The follow- ing commands have to be added to the .gdbinit file to enable the flash download feature: monitor WorkRAM = <SAddr>-<EAddr>...
Page 196
Flash download ware utilities available which allow data file conversion. Another possibility is to use J-Flash which is part of the J-Link software and documentation package. For convert- ing data files, no J-Flash license is needed. In order to convert a hex/mot/... file into a bin file using J-Flash, the following needs...
Using the DLL flash loaders in custom applica- tions The J-Link DLL flash loaders make flash behave as RAM from a user perspective, since flash programming is triggered by simply calling the J-Link API functions for memory reading / writing. For more information about how to setup the J-Link API for flash programming please refer to UM08002 J-Link SDK documentation (available for SDK customers only).
Flash breakpoints Introduction The J-Link DLL supports a feature called flash breakpoints which allows the user to set an unlimited number of breakpoints in flash memory rather than only being able to use the hardware breakpoints of the device. Usually when using hardware break- points only, a maximum of 2 (ARM 7/9/11) to 8 (Cortex-A/R) breakpoints can be set.
In order to use the flash breakpoints feature a separate license is necessary for each J-Link. For some devices J-Link comes with a device-based license and some J-Link models also come with a full license for flash breakpoints but the normal J-Link comes without any licenses. For more information about licensing itself and which devices have a device-based license, please refer to Licensing on page 47.
CHAPTER 7 Flash breakpoints Supported devices J-Link supports flash breakpoints for a large number of microcontrollers. You can always find the latest list of supported devices on our website: http://www.segger.com/jlink_supported_devices.html In general, J-Link can be used with any ARM7/9/11, Cortex-M0/M1/M3/M4 and Cor- tex-A5/A8/R4 core even if it does not provide internal flash.
J-Link control panel: 7.4.2 Compatibility with various debuggers Flash breakpoints can be used in all debugger which use the proper J-Link API to set breakpoints. Compatible debuggers/ debug interfaces are: • IAR Embedded Workbench •...
Flash breakpoints Why can flash breakpoints not be used with Rowley Crossworks? Because Rowley Crossworks does not use the proper J-Link API to set breakpoints. Instead of using the breakpoint-API, Crossworks programs the debug hardware directly, leaving J-Link no choice to use its flash breakpoints.
CPU register set as ARM7 CPUs. This chapter describes how to use the RDI DLL which comes with the J-Link software and documentation package. The J-Link RDI DLL allows the user to use J-Link with any RDI-compliant debugger and IDE.
J-Link RDI mainly consists of a DLL designed for ARM cores to be used with any RDI compliant debugger. The J-Link DLL feature flash download and flash breakpoints can also be used with J-Link RDI.
Licensing In order to use the J-Link RDI software a separate license is necessary for each J- Link. For some devices J-Link comes with a device-based license and some J-Link models also come with a full license for J-Link RDI but the normal J-Link comes with- out any licenses.
CHAPTER 8 Setup for various debuggers The J-Link RDI software is an ARM Remote Debug Interface (RDI) for J-Link. It makes it possible to use J-Link with any RDI compliant debugger. Basically, J-Link RDI con- sists of a additional DLL ( JLinkRDI.dll ) which builds the interface between the RDI API and the normal J-Link DLL.
Page 209
( JLinkRDI.dll ) and click OK . Now an extra menu, RDI, has been added to the menu bar. Choose RDI | Configure to configure the J-Link. For more information about the generic setup of J-Link RDI, please refer to Configuration on page 224.
Page 210
ARM. Since IAR EWARM version 5.11 it is possible to use J-Link RDI for Cortex-M devices because SEGGER and IAR have been come to an agreement regarding the RDI register assignment for Cortex-M. The following table...
Page 212
CHAPTER 8 Now J-Link RDI is available in the Target Environments list. Select J-Link and press OK to connect to the target via J-Link. For more informa- tion about the generic setup of J-Link RDI, please refer to Configuration on page 224.
ARM RVDS (RealView developer suite) 8.3.3.1 Software version J-Link RDI has been tested with ARM RVDS version 2.1 and 3.0. There should be no problems with earlier versions of RVDS (up to version v3.0.1). All screenshots are taken from ARM’s RVDS version 2.1.
Page 216
224. Click the OK button in the configuration dialog. Now close the RDI Target List dialog. Make sure your target hardware is already connected to J-Link. In the Connection control dialog, expand the JLink ARM RDI Interface and select the ARM_0 Processor.
CHAPTER 8 10. A project or an image is needed for debugging. After downloading, J-Link is used to debug the target. 8.3.4 GHS MULTI 8.3.4.1 Software version J-Link RDI has been tested with GHS MULTI version 4.07. There should be no prob- lems with other versions of GHS MULTI.
Page 219
Arguments field: -config -dll <FullPathToJLinkDLLs> Note that JLinkRDI.dll and JLinkARM.dll must be stored in the same directory. If the standard J-Link installation path or another path that includes spaces has been used, enclose the path in quotation marks. Example: -config -dll "C:\Program Files\SEGGER\JLinkARM_V350g\JLinkRDI.dll"...
Page 220
The J-Link RDI Configuration dialog will be opened. For more information about the generic setup of J-Link RDI, please refer to Configuration on page 224. Click the OK button to connect to the target. Build the project and start the debugger.
8.3.5 KEIL MDK (µVision IDE) 8.3.5.1 Software version J-Link has been tested with KEIL MDK 3.34. There should be no problems with other versions of KEIL µVision. All screenshots are taken from MDK 3.34. 8.3.5.2 Configuring to use J-Link RDI Start KEIL uVision and open the project.
Page 222
Select the location of JLinkRDI.dll in Browse for RDI Driver DLL field. and click the Configure RDI Driver button. The J-Link RDI Configuration dialog will be opened.For more information about the generic setup of J-Link RDI, please refer to Configuration on page 224.
CHAPTER 8 Configuration This section describes the generic setup of J-Link RDI (same for all debuggers) using the J-Link RDI configuration dialog. 8.4.1 Configuration file JLinkRDI.ini All settings are stored in the file JLinkRDI.ini . This file is located in the same direc- tory as JLinkRDI.dll .
8.4.4.1 General tab Connection to J-Link This setting allows the user to configure how the DLL should connect to the J-Link. Some J-Link models also come with an Ethernet interface which allows to use an emulator remotely via TCP/IP connection.
Page 226
8.4.4.2 Init tab Macro file A macro file can be specified to load custom settings to configure J-Link RDI with advanced commands for special chips or operations. For example, a macro file can be used to initialize a target to use the PLL before the target application is downloaded, in order to speed up the download.
Page 228
Automatic JTAG speed • Adaptive clocking For more information about the different speed settings supported by J-Link, please refer to JTAG Speed on page 142. JTAG scan chain with multiple devices The JTAG scan chain allows to specify the instruction register organization of the tar- get system.
Page 229
Furthermore it is necessary for some chips to enter the correct CPU clock frequence. Cache flash contents If enabled, the flash contents is cached by the J-Link RDI software to avoid reading data twice and to speed up the transfer between debugger and target. Allow flash download This allows the J-Link RDI software to download program into flash.
Page 231
157. 8.4.4.7 Log tab A log file can be generated for the J-Link DLL and for the J-Link RDI DLL. This log files may be useful for debugging and evaluating. They may help you to solve a prob- lem yourself but is also needed by the support to help you with it.
• When this breakpoint is hit, J-Link RDI examines the SWI number. • If the SWI is recognized as a semihosting SWI, J-Link RDI emulates it and trans- parently restarts execution of the application. • If the SWI is not recognized as a semihosting SWI, J-Link RDI halts the processor and reports an error.
CHAPTER 9 Device specifics Analog Devices J-Link has been tested with the following MCUs from Analog Devices: • AD7160 • ADuC7020x62 • ADuC7021x32 • ADuC7021x62 • ADuC7022x32 • ADuC7022x62 • ADuC7024x62 • ADuC7025x32 • ADuC7025x62 • ADuC7026x62 • ADuC7027x62 •...
In order to work with an ATMEL AT91SAM7 device, it has to be initialized. The follow- ing paragraph describes the steps of an init sequence. An example for different soft- ware tools, such as J-Link GDB Server, IAR Workbench and RDI, is given. •...
Page 242
CHAPTER 9 Device specifics Samples GDB Sample # connect to the J-Link gdb server target remote localhost:2331 monitor flash device = AT91SAM7S256 monitor flash download = 1 monitor flash breakpoints = 1 # Set JTAG speed to 30 kHz monitor endian little...
If your device has been locked by setting the MCU security status to "secure", and mass erase via debug interface is not disabled, J-Link is able to unlock your Kinetis K40/K60 device. The device can be unlocked by using the "unlock" command in J- Link Commander.
Page 248
On later silicons, this has been corrected. This bug applies to all devices with mask 0M33Z from the 100MHz series. The J-Link software and documentation package comes with a sample project for the Kinetis K40 and K60 devices which is pre-configured for the TWR-40 and TWR-60 eval boards and ETM / ETB Trace.
If your device has been "locked" accidentially (e.g. by bad application code in flash which mis-configures the PLL) and J-Link can not identify it anymore, there is a spe- cial unlock sequence which erases the flash memory of the device, even if it can not be identified.
Indirectly reading solves the fast GPIO problem, because only direct regis- ter access corrupts the register contents. Define a 256 byte aligned area in RAM of the LPC target device with the J-Link com- mand map ram and define afterwards the memory area which should be read indirect with the command map indirectread to use the indirectly reading feature of J-Link.
All devices of the LPC43xx are dual core devices (One Cortex-M4 core and one Cor- tex-M0 core). For these devices, a J-Link script file is needed (exact file depends on if the Cortex-M4 or the Cortex-M0 shall be debugged) in order to guarantee proper functionality.
9.13 Renesas J-Link has been tested with the following Renesas devices: • R5F56104 • R5F56106 • R5F56107 • R5F56108 • R5F56216 • R5F56217 • R5F56218 • R5F562N7 • R5F562N8 • R5F562T6 • R5F562T7 • R5F562TA Currently, there are no specifics for these devices.
CHAPTER 9 Device specifics 9.14 Samsung J-Link has been tested with the following Samsung devices: • S3FN60D 9.14.1 S3FN60D On the S3FN60D the watchdog may be running after reset (depends on the content of the smart option bytes at addr. 0xC0). The watchdog keeps counting even if the CPU is in debug mode (e.g.
STR91x Commander. 9.15.1.3 Switching the boot bank The bootbank of the STR91x devices can be switched by using the J-Link STR9 Com- mander which is part of the J-Link software and documentation package. For more information about the J-Link STR9 Commander, please refer to J-Link STR91x Com- mander (Command line tool) on page 111.
Page 263
J-Link STM32 Commander (command line utility) For more information about J-Flash, please refer to UM08003, J-Flash User Guide . For more information about the J-Link STM32 Commander, please refer to J-Link STM32 Unlock (Command line tool) on page 112. Note: Unsecuring a secured device will cause a mass-erase of the internal flash memory.
SEGGER offers a free command line tool which reprograms the option bytes in order to disable the hardware watchdog. For more information about the STM32 commander, please refer to J-Link STM32 Unlock (Command line tool) on page 112. 9.15.2.5 Debugging with software watchdog enabled...
9.15.4 STM32F4xxx These device are Cortex-M4 based. All devices of this family are supported by J-Link. 9.15.4.1 ETM init The following sequence can be used to prepare STM32F4xxx devices for 4-bit ETM tracing: int v; // Enable GPIOE clock *((volatile int *)(0x40023830)) = 0x00000010;...
Link GDBServer this needs to be done automatically 9.16.1.1 Selecting the device in the IDE When using J-Link in an IDE, there is usually a way to directly select the device in the IDE, since it usually also needs this information for peripheral register view etc. The selected device is then usually automatically passed to the J-Link DLL.
Needs a J-Link script file to guarantee proper functionality. J-Link script file can be found at $JLINK_INST_DIR$\Samples\JLink\Scripts For more information about how to use J-Link script files, please refer to Executing J- Link script files on page 172. 9.16.5 TMS470M Needs a J-Link script file to guarantee proper functionality.
Needs a J-Link script file to guarantee proper functionality. J-Link script file can be found at $JLINK_INST_DIR$\Samples\JLink\Scripts For more information about how to use J-Link script files, please refer to Executing J- Link script files on page 172. 9.16.7 OMAP3550 Needs a J-Link script file to guarantee proper functionality.
Not con- This pin is not connected in J-Link. nected JTAG Reset. Output from J-Link to the Reset signal of the target JTAG port. Typically connected to nTRST of the target nTRST Output CPU.
Page 273
274. Table 10.1: J-Link / J-Trace pinout Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are GND pins connected to GND in J-Link. They should also be connected to GND in the target system. 10.1.1.1 Target board design We strongly advise following the recommendations given by the chip manufacturer.
Page 274
Pin 19 of the connector can be used to supply power to the target hardware. Supply voltage is 5V, max. current is 300mA. The output current is monitored and protected against overload and short-circuit. Power can be controlled via the J-Link com- mander. The following commands are available to control power:...
276. Table 10.3: J-Link / J-Trace SWD pinout Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are GND pins connected to GND in J-Link. They should also be connected to GND in the target system. J-Link / J-Trace (UM08001)
Page 276
Pin 19 of the connector can be used to supply power to the target hardware. Supply voltage is 5V, max. current is 300mA. The output current is monitored and protected against overload and short-circuit. Power can be controlled via the J-Link commander. The following commands are available to control power: Command...
276. Table 10.5: J-Link / J-Trace SWD pinout Pins 4, 6, 8, 10, 12, 14, 16, 18, 20 are GND pins connected to GND in J-Link. They should also be connected to GND in the target system. J-Link / J-Trace (UM08001)
Typically connected to TDI of the target CPU. For CPUs Output which do not provide TDI (SWD-only devices), this pin is not used. J-Link will ignore the signal on this pin when using SWD. Not connected inside J-Link. Leave open on target hard- ware.
Pins 11 and 13 of the connector can be used to supply power to the target hardware. Supply voltage is 5V, max. current is 300mA. The output current is monitored and protected against overload and short-circuit. Power can be controlled via the J-Link commander. The following commands are available to control power: Command...
Typically connected to TDI of the target CPU. For CPUs Output which do not provide TDI (SWD-only devices), this pin is not used. J-Link will ignore the signal on this pin when using SWD. Not connected inside J-Link. Leave open on target hard- ware.
CHAPTER 10 Target interfaces and adapters 10.5 Adapters There are various adapters available for J-Link as for example the JTAG isolator, the J-Link RX adapter or the J-Link Cortex-M adapter. For more information about the different adapters, please refer to http://www.segger.com/jlink-adapters.html.
No additional special trace port is required, so that the ETB can be read via J-Link. The trace functionality via J-Link is limited by the size of the ETB. While capturing runs, the trace information in the buffer will be overwritten every time the buffer size has been reached.
RDI, (Remote debug interface) is a standard for "debug transfer agents" such as J- Link. It allows using J-Link from any RDI compliant debugger. RDI by itself does not include download to flash. To debug in flash, you need to somehow program your application program (debuggee) into the flash.
Every time you connect to J-Link / J-Trace, JLinkARM.dll checks if its embedded firm- ware is newer than the one used the J-Link / J-Trace. The DLL will then update the firmware automatically. This process takes less than 3 seconds and does not require a reboot.
Support and FAQs This chapter contains troubleshooting tips together with solutions for common prob- lems which might occur when using J-Link / J-Trace. There are several steps you can take before contacting support. Performing these steps can solve many problems and often eliminates the need for assistance.
12. Start JLink.exe . 13. If JLink.exe displays the J-Link / J-Trace serial number and the target proces- sor’s core ID, the J-Link / J-Trace is working properly and cannot be the cause of your problem. 14. If the problem persists and you own an original product (not an OEM version), see section Contacting support on page 309.
Page 308
CHAPTER 13 Support and FAQs J-Link/J-Trace does not get any connection to the target Most likely reasons: a.) The JTAG cable is defective. b.) The target hardware is defective. Remedy: Follow the steps described in General procedure on page 307.
General procedure on page 307. You may 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.
Can J-Link / J-Trace read back the status of the JTAG pins? Yes, the status of all pins can be read. This includes the outputs of J-Link / J-Trace as well as the supply voltage, which can be useful to detect hardware problems on the target system.
Page 312
Glossary Adaptive clocking A technique in which a clock signal is sent out by J-Link / J-Trace. J-Link / J-Trace waits for the returned clock before generating the next clock pulse. The technique allows the J-Link / J-Trace interface unit to adapt to differing signal drive capabilities and differing cable lengths.
Page 314
The electronic clock signal which times data on the TAP data lines TMS, TDI, and TDO. The electronic signal input to a TAP controller from the data source (upstream). Usu- ally, this is seen connecting the J-Link / J-Trace Interface Unit to the first TAP control- ler. J-Link / J-Trace (UM08001)
Page 315
The electronic signal output from a TAP controller to the data sink (downstream). Usually, this is seen connecting the last TAP controller to the J-Link / J-Trace Inter- face Unit. Test Access Port (TAP) The port used to access a device's TAP Controller. Comprises TCK, TMS, TDI, TDO, and nTRST (optional).
Need help?
Do you have a question about the J-Link and is the answer not in the manual?
Questions and answers