J-Link / J-Trace
User Guide
Document: UM08001
Software Version: 6.22
Revision: 0
Date: December 14, 2017
A product of SEGGER Microcontroller GmbH & Co. KG
www.segger.com
2
Disclaimer
Specifications written in this document are believed to be accurate, but are not guaranteed to
be entirely free of error. The information in this manual is subject to change for functional or
performance improvements without notice. Please make sure your manual is the latest edition.
While the information herein is assumed to be accurate, SEGGER Microcontroller GmbH & Co.
KG (SEGGER) assumes no responsibility for any errors or omissions. SEGGER makes and you
receive no warranties or conditions, express, implied, statutory or in any communication with you.
SEGGER specifically disclaims any implied warranty of merchantability or fitness for a particular
purpose.
Copyright notice
You may not extract portions of this manual or modify the PDF file in any way without the prior
written permission of SEGGER. The software described in this document is furnished under a
license and may only be used or copied in accordance with the terms of such a license.
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG, Hilden / Germany
Trademarks
Names mentioned in this manual may be trademarks of their respective companies.
Brand and product names are trademarks or registered trademarks of their respective holders.
Contact address
SEGGER Microcontroller GmbH & Co. KG
In den Weiden 11
D-40721 Hilden
Germany
Tel.
Fax.
E-mail:
Internet:
+49 2103-2878-0
+49 2103-2878-28
support@segger.com
www.segger.com
J-Link / J-Trace (UM08001)
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
3
Manual versions
This manual describes the current software version. If you find an error in the manual or a
problem in the software, please report it to us and we will try to assist you as soon as possible.
Contact us for further information on topics or functions that are not yet documented.
Print date: December 14, 2017
Manual
Revision
version
Date
By
Description
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”: Added new command strings to set base
addresses of coresight components for tracing
e.g.
CORESIGHT_SetETBBaseAddr.
* Section “J-Link script files”: Added new function GetSWOBaseClock();.
Chapter “J-Link software and documentation package”
* Section “J-Link SWO Viewer”: Updated picture of new SWO Viewer GUI
interface with additional explanation of SWO clock setting.
Chapter “Related Software”
* Section “JTAGLoad”: PIO commands was listed as supported even though
it is not. Fixed.
* Section “JTAGLoad”: PIOMAP commands was listed as supported even
though it is not. Fixed.
Chapter “Monitor Mode Debugging”
* Section “Enable Monitor Debugging”: Updated
Chapter “Working with J-Link and J-Trace”
* Section “J-Link script files”: Updated
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”: Updated
Updated links to SEGGER wiki:
Low power mode debugging
J-Link script files
J-Link command strings
Chapter “Working with J-Link and J-Trace”
* Section “Script file API functions”: Added the following functions:
JLINK_C2_WriteData()
JLINK_C2_ReadData()
JLINK_C2_WriteAddr()
JLINK_C2_ReadAddr()
JLINK_CORESIGHT_ReadDAP()
JLINK_GetPinState()
JLINK_GetTime()
JLINK_JTAG_ReadWriteBits()
JLINK_JTAG_StartDR()
JLINK_PIN_Override()
JLINK_SelectTIF()
JLINK_SetDevice()
JLINK_SWD_ReadWriteBits()
JLINK_TARGET_IsHalted()
JLINK_TARGET_Halt()
JLINK_TIF_ActivateTargetReset()
JLINK_TIF_ReleaseTargetReset()
JLINK_TIF_SetSpeed()
JLINK_TIF_SetClrTCK()
JLINK_TIF_SetClrTMS()
JLINK_TIF_SetClrTDI()
Chapter “Working with J-Link and J-Trace”
* Section “Script file API functions”: Added return values for various func-
tions
Chapter “Open Flashloader”
* Section “Add. Info / Considerations / Limitations”: Updated
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”: Updated
Added new command string “EnableLowPowerHandlingMode”
Chapter “Open Flashloader”
Added “AlwaysPresent” as new attribute to the <FlashBankInfo>
Chapter “Working with J-Link and J-Trace”
* Section “J-Link scriptfiles”: Updated
6.22
0
171214
NV
6.20
8
171123
AG
6.20
7
171025
EL
6.20
6
171013
EL
6.20
5
171011
NG
6.20
4
171011
NG
6.20
6.20
6.20
6.16
6.14
3
2
1
0
6
171006
171005
170922
170320
170407
NG
EL
NG
EL
NV
J-Link / J-Trace (UM08001)
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
4
Manual
Revision
version
6.14
5
Date
By
Chapter “J-Flash SPI”
Updated screenshots
Description
“
JLINK_ExecCommand()”
description
170320
EL
6.14
4
170317
NV
Chapter “Working with J-Link and J-Trace”
* Section “J-Link scriptfiles”:
Added: “
JLINK_ExecCommand()”
Section “Keil MDK-ARM” added for Command string execution
Chapter “Working with J-Link and J-Trace”
* Section “J-Link scriptfiles”:
Added: “OnTraceStart()” and “
JLINK_TRACE_Portwidth”
Chapter “Trace”
* Added crossreference to “JLINK_TRACE_Portwidth”
Chapter “Introduction”
*Added Subsubsection “Software and Hardware
Features Overview” to all device Subsections.
*Edited Subsection “”J-Trace ARM.
*Section “Target interfaces and adapters”:
edited “RESET” to “nRESET” and updated description.
Chapter “Working with J-Link and J-Trace”
* Section “Exec Commands”: Updated
SetResetPulseLen
TraceSampleAdjust
Chapter “Trace”
* Section “Tracing via trace pins”: Updated
Chapter “Working with J-Link”
* Section “Exec Commands”: Updated
SelectTraceSource
SetRAWTRACEPinDelay
ReadIntoTraceCache
Chapter “Trace” added.
Chapter “Working With J-Link”
* Section “Exec Commands”: Updated ExcludeFlashCacheRanges.
Chapter “Introduction”
* Removed “Model Feature Lists”
Chapter “Adding Support for New Devices”:
renamed to “Open Flash Loader”
Chapter “Open Flash Loader” updated.
Chapter “J-Flash SPI”
* Added chapter “Custom Command Sequences”
Chapter “Adding Support for New Devices” added.
Chapter “Related Software”
* Section “J-Link RTT Viewer” updated and moved from section “RTT”.
Chapter “Working with J-Link and J-Trace”
* Section “J-Link script files” updated.
Chapter “Working with J-Link and J-Trace”
* Section “J-Link script files” updated.
Chapter “Related Software”
* Section “J-Link Commander”
Typo fixed.
Chapter “Related Software”
* Section “J-Link Commander”
Commands and commandline options added.
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”
Command “SetRTTTelnetPort” added.
Chapter “Flash Download”
* Section “Debugging applications that change flash contents at runtime”
added.
Chapter “Monitor Mode Debugging”
* Section “Target application performs reset” added.
Chapter “Monitor Mode Debugging”
* Section “Enable Monitor Debugging” updated.
* Section “Forwarding of Monitor Interrupts” added.
6.14
3
170220
NV
6.14
2
170216
NV
6.14
1
170210
NV
6.14
0
170201
AG
6.10a
0
160820
EL
6.00i
0
160802
EL
6.00
6.00
5.12f
5.12d
5.12d
5.12c
1
0
0
1
0
0
160617
160519
160503
160427
160425
160413
EL
AG
AB
AG
AG
NG
5.12c
1
160418
NG
5.10u
5.10t
0
0
160317
160314
AG
AG
J-Link / J-Trace (UM08001)
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG
5
Manual
Revision
version
5.10
5.10
5.10
5.10
5.02m
5.02l
5.02i
3
2
1
0
0
0
1
Date
160309
160215
151204
151127
151125
151123
151106
By
EL
AG
AG
NG
AG
AG
RH
Chapter “J-Flash SPI” updated.
Chapter “RTT” updated.
Chapter “RDI” updated.
Chapter “Semihosting” added.
Chapter “Related Software”
* Section “J-Scope” removed.
Description
Chapter “Working with J-Link and J-Trace”
* Section “The J-Link settings file” added.
Chapter “Low Power Debugging” added.
Various Chapters
* Some typos corrected.
Chapter “J-Flash SPI”
* Section “Send custom commands” added.
Chapter “Related Software”
* Section “J-Link Commander”
exec command added.
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”
New commands added.
Chapter “Related Software”
* Section “J-Scope” updated.
Chapter “Target interfaces and adapters”
* Section “Reference voltage (VTref)” added.
Chapter “Working with J-Link and J-Trace”
* Section “J-Link script files” updated.
Chapter “Working with J-Link and J-Trace”
* Section “J-Link script files” updated
Chapter “Licensing”
* Section “Original SEGGER products” updated.
Chapter “Flash download”
* Section “Setup for various debuggers (CFI flash)” updated.
Chapter “Flash download”
* Section “Setup for various debuggers (SPIFI flash)” added.
Chapter “Introduction”
* Section “J-Link / J-Trace models” updated.
* Section “Supported OS”
Added Windows 10
Chapter “Monitor Mode Debugging” added.
Chapter “Working with J-Link and J-Trace”
* Section “Command strings”
“DisableCortexMXPSRAutoCorrectTBit” added.
Chapter “Monitor Mode Debugging” added.
Chapter “Related Software”
* Section “J-Link Commander”
Sub-Section “Command line options” updated.
Chapter “Flash download”
* Section “QSPI flash support” added.
Chapter “Flash breakpoints”
* Section “Flash Breakpoints in QSPI flash” added
Chapter “J-Flash SPI”
* Initial version added
Chapter “Related Software”
* Section “J-Link STM32 Unlock”
Added command line options
Chapter “Target interfaces and Adapters”
Chapter “20-pin J-Link connector”, section “Pinout for SPI” added.
Chapter “Related Software”
* Section “Configure SWO output after device reset” updated.
Chapter “Licensing”
5.02i
0
151105
RH
5.02f
5.02f
5.02f
5.02e
1
1
0
0
151022
151022
151007
151001
NG
EL
RH
AG
5.02c
1
150925
NG
5.02c
0
150916
RH
5.02c
5.02a
5.02
5.02
5.00
0
0
0
0
1
150914
150903
150820
150813
150728
RH
AG
AG
AG
NG
5.00
0
150609
AG
5.00
4.99b
4.99a
4.98d
4.98b
0
0
0
0
0
150520
150520
150429
150427
150410
EL
EL
AG
EL
AG
J-Link / J-Trace (UM08001)
© 2004-2017 SEGGER Microcontroller GmbH & Co. KG