Debugging an ARM core which is not 1st on JTAG chain
Technical Note 17681
Architectures:
Arm
Component:
debugger
Updated:
2022/5/17 8:08
Introduction
This technical note provides information about how to debug a device that is not first in the JTAG chain.
Discussion
When the device is not first in the JTAG chain, C-SPY® needs information about the preceding devices. Use an I-jet® probe and the EmuDiag.exe
tool to collect such information.
Example of a JTAG chain
A chain of connected JTAG devices is created by consecutively connecting TDO on one device to TDI on thenext device, and so on.
This schematic shows two devices connected in a JTAG chain.
Which device is the first device?
The first device (for this purpose), is the device where TDO
is connected to the debug probe. Note that:
- The first device will be given the ID
TAP0 (zero)
. - When debugging the first device, there is no need to make extra settings.
Debugging a device that is not first in the JTAG chain
These steps are needed to debug a device that is not first in the JTAG chain. (In this example the JTAG chain consists of a Toshiba TMPM320-SK board and an ST STM32F207ZG board.)
- Connect the I-jet probe.
- Start IAR Embedded Workbench for Arm®, and choose I-jet > EmuDiag.
- In
EmuDiag.exe
clikc the Test JTAG button. (This displays the JTAG Configuration dialog box.) - Click the Autodetect button to see this JTAG chain:
- Note down this information:
- The ST STM32F207ZG has the ID TAP1
- The device at TAP0 (the Toshiba TMPM320) has IR=4. In other words, four preceding bits.
- Close
EmuDiag.exe
- In Embedded Workbench for Arm, open the project for ST STM32F207ZG, and choose Project > Options > Debugger > I-jet > Interface
- Make these settings:
- Set Probe config to Explicit
- Multitarget debug system
- Set Target number to 1
- JTAG scan chain contains non-Arm devices
- Set Preceding bits to 4
- Click the Setup tab to select the Reset strategy:
- For Cortex select Core reset.
- For ARM 7/9 select Software reset.
- It is important to choose a reset strategy that does not use TRST to reset, because such a reset will reset all cores.
More reading
- For I-jet and
EmuDiag.exe
there is more information about the JTAG chain in\arm\bin\jet\emudiag.pdf
. - For J-Link, read
\arm\doc\JLink_J-TraceARM.pdf
.
Typical path is
C:\Program Files\IAR Systems\Embedded Workbench x.y\
Where x.y stands for version of the common components.
Conclusion
The I-jet probe can connect to any device in a JTAG chain. Connect the I-jet, use the EmuDiag.exe
tool to collect information about the JTAG chain and enter that information in C-SPY Debugger Options dailog box.
All product names are trademarks or registered trademarks of their respective owners.