J-Link / J-Trace (UM08001) © 2004-2014 SEGGER Microcontroller GmbH & Co. KG
17
5.2.2 Input indicator ...................................................................................... 139
5.2.3 Output indicator .................................................................................... 139
5.3 JTAG interface....................................................................................... 140
5.3.1 Multiple devices in the scan chain ............................................................ 140
5.3.2 Sample configuration dialog boxes ........................................................... 140
5.3.3 Determining values for scan chain configuration......................................... 143
5.3.4 JTAG Speed .......................................................................................... 144
5.4 SWD interface ....................................................................................... 145
5.4.1 SWD speed........................................................................................... 145
5.4.2 SWO .................................................................................................... 145
5.5 Multi-core debugging ............................................................................. 147
5.5.1 How multi-core debugging works ............................................................. 147
5.5.2 Using multi-core debugging in detail ........................................................ 148
5.5.3 Things you should be aware of ................................................................ 149
5.6 Connecting multiple J-Links / J-Traces to your PC ...................................... 151
5.6.1 How does it work? ................................................................................. 151
5.7 J-Link control panel................................................................................ 153
5.7.1 Tabs .................................................................................................... 153
5.8 Reset strategies .................................................................................... 159
5.8.1 Strategies for ARM 7/9 devices................................................................ 159
5.8.2 Strategies for Cortex-M devices ............................................................... 161
5.9 Using DCC for memory access ................................................................. 164
5.9.1 What is required? .................................................................................. 164
5.9.2 Target DCC handler ............................................................................... 164
5.9.3 Target DCC abort handler ....................................................................... 164
5.10 J-Link script files ................................................................................... 165
5.10.1 Actions that can be customized ............................................................... 165
5.10.2 Script file API functions .......................................................................... 165
5.10.3 Global DLL variables .............................................................................. 169
5.10.4 Global DLL constants.............................................................................. 172
5.10.5 Script file language ................................................................................ 173
5.10.6 Script file writing example ...................................................................... 174
5.10.7 Executing J-Link script files ..................................................................... 174
5.11 Command strings .................................................................................. 176
5.11.1 List of available commands ..................................................................... 176
5.11.2 Using command strings .......................................................................... 181
5.12 Switching off CPU clock during debug ....................................................... 183
5.13 Cache handling...................................................................................... 184
5.13.1 Cache coherency ................................................................................... 184
5.13.2 Cache clean area ................................................................................... 184
5.13.3 Cache handling of ARM7 cores................................................................. 184
5.13.4 Cache handling of ARM9 cores................................................................. 184
5.14 Virtual COM Port (VCOM) ........................................................................ 185
5.14.1 Configuring Virtual COM Port ................................................................... 185
6 Flash download............................................................................................................187
6.1 Introduction.......................................................................................... 188
6.2 Licensing .............................................................................................. 189
6.3 Supported devices ................................................................................. 190
6.4 Setup for various debuggers (internal flash) .............................................. 191
6.4.1 IAR Embedded Workbench...................................................................... 191
6.4.2 Keil MDK .............................................................................................. 191
6.4.3 Mentor Sourcery CodeBench ................................................................... 194
6.4.4 J-Link GDB Server ................................................................................. 194
6.4.5 J-Link Commander................................................................................. 195
6.4.6 J-Link RDI ............................................................................................ 196
6.5 Setup for various debuggers (CFI flash).................................................... 197
6.5.1 IAR Embedded Workbench / Keil MDK ...................................................... 197
6.5.2 J-Link GDB Server ................................................................................. 198
6.5.3 J-Link commander ................................................................................. 198
6.6 Using the DLL flash loaders in custom applications ..................................... 200