Debugging an ARM core which is not 1st on JTAG chain

Technical Note 17681

Arkitekturer:

Arm

Komponent:

debugger

Uppdaterad:

2022-05-17 08: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.)

  1. Connect the I-jet probe.
  2. Start IAR Embedded Workbench for Arm®, and choose I-jet > EmuDiag.
  3. In EmuDiag.exe clikc the Test JTAG button. (This displays the JTAG Configuration dialog box.)
  4. Click the Autodetect button to see this JTAG chain:

  5. Note down this information:
    1. The ST STM32F207ZG has the ID TAP1
    2. The device at TAP0 (the Toshiba TMPM320) has IR=4. In other words, four preceding bits.
  6. Close EmuDiag.exe
  7. In Embedded Workbench for Arm, open the project for ST STM32F207ZG, and choose Project > Options > Debugger > I-jet > Interface

  8. Make these settings:
    1. Set Probe config to Explicit
    2. Multitarget debug system
    3. Set Target number to 1
    4. JTAG scan chain contains non-Arm devices
    5. Set Preceding bits to 4
  9. 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.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.