Page 1
J-Link / J-Trace User guide of the JTAG emulators for ARM Cores Manual Rev. 73 Date: July 3, 2009 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
For further information on topics or routines not yet specified, please contact us. Revision Date Explanation Chapter "Introduction" * Section "J-Link and J-Trace models" added * Sections "Model comparison chart" & "J-Link bundle comparison chart"added Chapter "J-Link and J-Trace models" removed 090701 Chapter "Hardware"...
Page 4
090108 updated. * Section "Target board design for SWD" added. Chapter "Working with J-Link Pro" 090105 * Section "Connecting J-Link Pro the first time" updated. Chapter "Working with J-Link Pro" * Section "Introduction" updated. * Section "Configuring J-Link Pro 081222 via web interface"...
Page 5
Revision Date Explanation Chapter "Flash download and flash breakpoints" updated. 080630 Chapter "J-Link status window" renamed to "J-Link control panel" Various corrections. Chapter "Flash download and flash breakpoints" Section "Licensing" updated. 080627 Section "Using flash download and flash breakpoints with different debuggers" updated.
Page 6
070312 "Differences between different versions" supplemented. Chapter "J-Link / J-Trace related software": 070307 "J-Link GDB Server" licensing updated. Chapter "J-Link / J-Trace related software" updated and reorganized. 070226 Chapter "Hardware" "List of OEM products" updated Chapter "Device specifics" added 070221 Subchapter "Command strings"...
Page 7
060117 Screenshots updated. 051208 Chapter Working with J-Link: Sketch added. Chapter Working with J-Link: "Connecting multiple J-Links to your PC" added. Chapter Working with J-Link: "Multi core debug- 051118 ging" added. Chapter Background information: "J-Link firm- ware" added. 051103 Chapter Setup: "JTAG Speed" added.
Page 9
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:...
Page 10
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 for debug access to ARM cores.
2.6.5 IAR J-Trace..................... 40 J-Link OBs ....................41 Illegal Clones ..................42 3 Setup..........................43 Installing the J-Link ARM software and documentation pack ......44 3.1.1 Setup procedure..................44 Setting up the USB interface ..............47 3.2.1 Verifying correct driver installation ............. 47 Uninstalling the J-Link USB driver ..............
Page 12
5.6.1 How does it work? ................... 89 5.6.2 Configuring multiple J-Links / J-Traces ............90 5.6.3 Connecting to a J-Link / J-Trace with non default USB-Address...... 91 J-Link control panel ................. 92 5.7.1 Tabs...................... 92 Reset strategies ..................98 5.8.1 Strategies for ARM 7/9 devices ..............
Page 14
Code tracing and data tracing ..............173 9.4.3 J-Trace integration example - IAR EWARM ..........173 Embedded Trace Buffer (ETB) ..............177 Flash programming ................178 9.6.1 How does flash programming via J-Link / J-Trace work? ......178 9.6.2 Data download to RAM ................178 9.6.3 Data download via DCC................178 9.6.4 Available options for flash programming ............178...
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.
Page 19
FlashDL works, please refer to Flash download and flash breakpoints on page 113. 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 num- ber of breakpoints even if the application program is not located in RAM, but in flash memory.
RDI interface available, which allows using J-Link with RDI compliant software * = Supported by J-Link hardware version 6 ** = Measured with J-Link Rev.5, ARM7 @ 50 MHz, 12MHz JTAG speed. 1.1.3.2 Specifications* USB powered <50mA if target power is Power Supply off.
Page 22
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.
• 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.1.4.2 Download speed The following table lists performance values (Kbytes/s) for writing to memory (RAM):...
ARM, please refer to UM08007, Flasher ARM User’s Guide. 1.1.7 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.
J-Trace for Cortex-M3 is a JTAG/SWD emulator designed for Cortex-M3 cores which includes trace (ETM) support. J-Trace for Cortex-M3 can also be used as a J-Link and it also supports ARM7/9 cores. Tracing on ARM7/9 targets is not supported. 1.1.8.1 Additional features •...
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 •...
Requirements Host System To use J-Link or J-Trace you need a host system running Windows 2000, Windows XP, Windows 2003, or Windows Vista. Target System An ARM7/ARM9/ARM11 or Cortex-M3 target system is required. The system should have a standardized 20-pin connector as defined by ARM Ltd. for a simple JTAG con- nection.
J-Link functionality can be enhanced by the features J-Flash, RDI, flash download (J- Link ARM FlashDL) and flash breakpoints (FlashBP). These features do not come with J-Link and need additional licenses. In the following the licensing options of the software will be explained.
For more information about J-Flash licensing procedure / license types, please refer to the J-Flash User Guide (UM08003), chapter Licensing. In the following the licensing procedure and license types of J-Link ARM FlashDL and FlashBP are explained J-Link / J-Trace (UM08001)
Key-based license This type of license is used if you already have a J-Link, but want to enhance its func- tionality by using J-Link ARM FlashDL and FlashBP. In addition to that, the key- based license is used for trial licenses.
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.
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.
CHAPTER 2 Licensing Original SEGGER products The following products are original SEGGER products for which the use of the J-Link software is allowed: 2.5.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 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.
J-Link OBs J-Link OBs (J-Link On Board) are single chip versions of J-Link which are used on var- ious eval boards. 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: •...
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.
Chapter 3 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 and J-Trace related software on page 55 for an overview about the J-Link software and documentation pack. 3.1.1...
Page 48
The J-Link software and documentation pack is successfully installed on your PC. 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.
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"...
Page 50
Setup Right-click on the driver to open a context menu which contains the command Prop- erties. 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 187 for help.
Uninstalling the J-Link USB driver If J-Link / J-Trace is not properly recognized by Windows and therefore does not enu- merate, it make 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.
Connecting J-Link only via Ethernet and read out the IP via the DHCP IP Assign- ment table of your DHCP Server. In the following, both ways to get the IP address assigned to J-Link via DHCP, are explained. 3.4.1.1 Connecting via USB and Ethernet When using JLink.exe in order to read out the IP address, J-Link has to be con-...
By default, J-Link is configured to receive an IP address and a subnet mask via DHCP. It is also possible to assign a fixed IP address to it. Setting up J-Link can be done via JLink.exe or via web interface. In the following, both configuration methods are described.
Page 54
Setup Assigning an IP address manually If you do not want J-Link to be configured via DHCP, you can assign an IP address and a subnet mask (optional) manually. This is done via the ipaddr command in JLink.exe. This command can be used in four different ways, which are explained in...
This chapter describes Segger’s J-Link / J-Trace related software portfolio, which cov- ers 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 and J-Trace related software J-Link related software 4.1.1 J-Link software and documentation package 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. Software Description JLinkARM.dll...
Command line tool that opens an svf file and sends the data in JTAGLoad it via J-Link / J-Trace to the target. J-Link Software The J-Link Software Developer Kit is needed if you want to Developer Kit write your own program with J-Link / J-Trace. (SDK) J-Link Flash Soft- An enhanced version of the JLinkARM.DLL, which contains...
4.2.1 J-Link Commander (Command line tool) J-Link Commander (JLink.exe) is a tool that can be used for verifying proper instal- lation 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.
4.2.2 J-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 •...
4.2.3 J-Link STM32 Commander (Command line tool) 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.
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.
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.
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.
GDB is freely available from the GNU committee under: http://www.gnu.org/software/gdb/download/ J-Link GDB Server is distributed as "free for evaluation and non commercial use". The software can be used free of charge for educational and nonprofit purposes without additional license.
If you want to use the dedicated flash programming utilities for commercial and production pur- poses, you need to obtain a license from SEGGER. SEGGER also offers to create ded- icated flash programming utilities for custom hardware. When starting a dedicated...
If you want to use dedicated flash programming utilities for production and commer- cial 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: •...
Q: I want to use the dedicated flash programming utilities with my own hardware. Is that possible? 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...
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...
Determining which DLL is used by a program on page 71. 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 Work- bench, in a simple way.
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 78
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 come with additional input/output Indica- tors. 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 appli- cation 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.
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.1.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 83 whereas the max.
Page 86
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 ARM core on your target.
The product id (PID) for J-Link / J-Trace #2 is 102 and so on. A different PID means that J-Link / J-Trace is identified as a different device, requir- ing a new driver. The driver for a new J-Link device will be installed automatically.
12. 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 drivers as a node below "Universal Serial Bus controllers"...
Connecting to a J-Link / J-Trace with non default USB- Address Restart JLink.exe and type usb 1 to connect to J-Link / J-Trace #1. You may connect other J-Links / J-Traces to your PC and connect to them as well. To connect to an unconfigured J-Link / J-Trace (with default address "0"), restart...
J-Link features such as J-Link ARM FlashDL, FlashBP and ARM instruction set simulation. The J-Link control panel win- dow 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 95
Save settings, otherwise they are lost when the debug session is closed. Section: Flash download In this section, settings for the use of the J-Link ARM FlashDL feature and related settings can be configured. When a license for J-Link ARM FlashDL is found, the color indicator is green and "License found"...
Page 96
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 97
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 99
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 101
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;...
5.8.2.3 Type 2: ResetPin J-Link pulls its RESET pin low to reset the core and the peripherals. This normally causes the CPU RESET pin of the target device to go low as well, resulting in a reset of both CPU and peripherals.
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.
Working with J-Link and J-Trace 5.10 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 106
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.10.1.7 map indirectread This command can be used to read a memory area indirectly.
Page 108
SetResetType = <value> Example SetResetType = 0 5.10.1.14SetRestartOnClose This command specifies whether the J-Link restarts target execution on close. The default is to restart target execution. This can be disabled by using this command. Syntax SetRestartOnClose = 0 | 1...
Page 109
SetDbgPowerDownOnClose = 0 // Disables debug power-down on close. 5.10.1.16SetSysPowerDownOnIdle When using this command, the target CPU is powered-down when no transmission between J-Link and the target CPU was performed for a specific time. When the next command is given, the CPU is powered-up. Note: This command works only for Cortex-M3 devices.
Example SupplyPowerDefault = 1 5.10.2 Using command strings 5.10.2.1 J-Link Commander The J-Link command strings can be tested with the J-Link Commander. Use the com- mand exec supplemented by one of the command strings. Example exec SupplyPower = 1 exec map reset exec map exclude 0x10000000-0x3FFFFFFF 5.10.2.2 IAR Embedded Workbench...
Because ARM7 cores have a unified cache, there is no need to handle the caches dur- ing debug. 5.12.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:...
RDI software, until now. Both features require an additional license. For more information about flash download and flash breakpoints, please refer to J-Link RDI User’s Guide (UM08004), chapter Flash download and chapter Breakpoints in flash memory.
ARM FlashDL) or flash breakpoints (FlashBP), but the standard J-Link does not come with a built-in license. You will need to obtain a license for every J-Link. For more information about the different license types, please refer to License types on page 32.
It is customer’s responsibility to make sure that the device he wants to use flash programming with is supported. In case of doubt, you should con- tact SEGGER and ask for a trial license. The device is selected by its device identifier.
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 J-Link ARM FlashDL the IAR flashloader has to be disabled (the FlashBP fea- ture can also be used when IAR flashloader is enabled). To disable the IAR flashlo- ader the checkbox Use flash loader(s) at Project->Options->Debugger-...
If you use the IAR project for the first time, the use of J-Link ARM FlashDL and FlashBPs is set to Auto, which is the default value. For more information about dif- ferent configurations for J-Link ARM FlashDL and FlashBPs please refer to Settings on page 93.
Page 128
CHAPTER 6 Flash download and flash breakpoints Then J-Link / J-Trace has to be selected as debugger. To select J-Link / J-Trace as debugger simply choose J-Link / J-Trace from the list box which can be found at Project->Options for Target->Debug.
6.4.3 J-Link GDB Server The configuration for the J-Link GDB Server is done by the .gdbinit file. The follow- ing commands has to be added to the .gdbinit file to enable J-Link ARM FlashDL and FlashBPs: monitor flash device <DeviceID>...
CHAPTER 7 Device specifics Analog Devices J-Link has been tested with the following MCUs from Analog Devices, but should work with any ARM7/9 and Cortex-M3 device: • ADuC7020x62 • ADuC7020x62 • ADuC7021x32 • ADuC7021x32 • ADuC7021x62 • ADuC7021x62 • ADuC7022x32 •...
CHAPTER 7 Device specifics ATMEL J-Link has been tested with the following ATMEL devices, but should work with any ARM7/9 and Cortex-M3 device: • AT91SAM7A3 • AT91SAM7S32 • AT91SAM7S321 • AT91SAM7S64 • AT91SAM7S128 • AT91SAM7S256 • AT91SAM7S512 • AT91SAM7SE32 •...
Page 135
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. •...
Freescale J-Link has been tested with the following Freescale devices, but should work with any ARM7/9 and Cortex-M3 device: • MAC7101 • MAC7106 • MAC7111 • MAC7112 • MAC7116 • MAC7121 • MAC7122 • MAC7126 • MAC7131 • MAC7136 •...
CHAPTER 7 Device specifics Luminary Micro J-Link has been tested with the following Luminary Micro devices, but should work with any ARM7/9 and Cortex-M3 device: • LM3S101 • LM3S102 • LM3S301 • LM3S310 • LM3S315 • LM3S316 • LM3S317 •...
7.4.1 Stellaris LM3S100 Series These device are Cortex-M3 based. All devices of this family are supported by J-Link. 7.4.2 Stellaris LM3S300 Series These device are Cortex-M3 based. All devices of this family are supported by J-Link. 7.4.3 Stellaris LM3S600 Series These device are Cortex-M3 based.
CHAPTER 7 Device specifics J-Link has been tested with the following NXP devices, but should work with any ARM7/9 and Cortex-M3 device: • LPC1111 • LPC1113 • LPC1311 • LPC1313 • LPC1342 • LPC1343 • LPC1751 • LPC1751 • LPC1752 •...
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.
Page 142
PC (R15) manually, after reset in order to debug the application. LPC288x flash programming In order to use the LPC288x devices in combination with J-Link FlashDL the applica- tion you are trying to debug, should be linked to the original flash @ addr 0x10400000.
J-Link has been tested with the following OKI devices, but should work with any ARM7/9 and Cortex-M3 device: • ML67Q4002 • ML67Q4003 • ML67Q4050 • ML67Q4051 • ML67Q4060 • ML67Q4061 If you experience problems with a particular device, do not hesitate to contact Seg- ger.
CHAPTER 7 Device specifics ST Microelectronics J-Link has been tested with the following ST Microelectronics devices, but should work with any ARM7/9 and Cortex-M3 device: • STR710FZ1 • STR710FZ2 • STR711FR0 • STR711FR1 • STR711FR2 • STR712FR0 • STR712FR1 •...
All devices of this family are supported by J-Link. 7.7.4.1 Flash erasing The devices have 3 TAP controllers built-in. When starting J-Link.exe, it reports 3 JTAG devices. A special tool, J-Link STR9 Commander (JLinkSTR91x.exe) is available to directly access the flash controller of the device. 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.
Page 146
Disabling the hardware watchdog In order to disable the hardware watchdog the option bytes have to be re-pro- grammed. 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 Commander (Command line tool) on page 60.
Texas Instruments J-Link has been tested with the following Texas Instruments devices, but should work with any ARM7/9 and Cortex-M3 device: • TMS470R1A64 • TMS470R1A128 • TMS470R1A256 • TMS470R1A288 • TMS470R1A384 • TMS470R1B512 • TMS470R1B768 • TMS470R1B1M • TMS470R1VF288 •...
RESET pin of the target CPU, which is typically called "nRST", "nRESET" or "RESET". This pin is not connected in J-Link. It is reserved for com- patibility with other equipment to be used as a debug DBGRQ request signal to the target system. Typically connected to DBGRQ if available, otherwise left open.
Page 151
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. 8.1.1.1 Target board design We strongly advise following the recommendations given by the chip manufacturer.
Not con- This pin is not connected in J-Link. nected This pin is not used by J-Link. If the device may also be Not Used NC accessed via JTAG, this pin may be connected to nTRST, otherwise leave open.
Page 153
152. Table 8.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 154
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...
TRACECLK 5V-Supply TRACEDATA[0] TRACEDATA[1] TRACEDATA[2] TRACEDATA[3] The following table lists the J-Link / J-Trace SWD pinout. SIGNAL TYPE Description This is the target reference voltage. It is used to check if the target has power, to create the logic-level reference...
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...
8.4.1 JTAG isolator J-Link JTAG Isolator can be connected between J-Link and any ARM target that uses the standard 20-pin JTAG-ARM connector to provide electrical isolation. This is essen- tial when the development tools are not connected to the same ground as the appli- cation.
Flat cable 8.4.2 JTAG 14 pin adapter An adapter is available to use J-Link / J-Trace with targets using this 14 pin 0.1" mat- ing JTAG connector. The following table shows the mapping between the 14 pin adapter and the standard 20 pin JTAG interface.
JTAG probes) to 5V. Most targets have JTAG signals at voltage levels between 1.2V and 3.3V for J-Link and 3.0V up to 3.6V for J-Trace. These targets can be used with J-Link / J-Trace without a 5V adapter. Higher voltages are common primarily in the automotive sector.
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.
Background information Flash programming J-Link / J-Trace comes with a DLL, which allows - amongst other functionalities - reading and writing RAM, CPU registers, starting and stopping the CPU, and setting breakpoints. The standard DLL does not have API functions for flash programming.
Page 181
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 JLink.exe is unable to read the target processor’s core ID you should analyze the communication between your target and J-Link / J-Trace with a logic analyzer or oscilloscope.
Page 192
CHAPTER 11 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 section 11.2.1. J-Link / J-Trace (UM08001)
J-Link / J-Trace and the target device. 11.3.1 Start sequence This is the signal sequence output by J-Link / J-Trace at start of JLink.exe . It should be used as reference when tracing potential J-Link / J-Trace related hardware prob- lems.
General procedure on page 189. 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 196
Registers on ARM 7 / ARM 9 targets I’m running J-Link.exe in parallel to my debugger, on an ARM 7 target. I can read memory okay, but the processor registers are different. Is this normal? If memory on an ARM 7/9 target is read or written the processor registers are modified.
Page 198
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 200
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 201
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