7590 views|1 replies

3836

Posts

19

Resources
The OP
 

The difference between various debugging interfaces (SWD, JTAG, Jlink, Ulink, STlink) [Copy link]

I have been engaged in embedded development and ARM development for half my life, and debugging programs is inevitable. I have come into contact with so many debugging specifications, debugging tools, and debugging methods, but the relationship between them is not particularly clear. Today, let's sort it out:

JTAG Protocol

JTAG (Joint Test Action Group) is an international standard test protocol (IEEE 1149.1 compatible), mainly used for internal chip testing. Most advanced devices now support the JTAG protocol, such as ARM, DSP, FPGA devices, etc. The standard JTAG interface is 4 lines: TMS, TCK, TDI, TDO, which are mode selection, clock, data input and data output lines respectively. The definition of the relevant JTAG pins is:

TMS: Test mode selection, TMS is used to set the JTAG interface to a certain test mode;
TCK: Test clock input;
TDI: Test data input, data is input into the JTAG interface through the TDI pin;
TDO: Test data output, data is output from the JTAG interface through the TDO pin;
When the JTAG protocol was defined, the parallel port was defined for the computer end because computers (PCs) at that time generally had parallel ports. Today, let alone laptops, there are very few parallel ports on desktop computers, and more and more USB interfaces have replaced them. Therefore, it is rarely seen on the market.

SWD Interface

Serial Wire Debug should be considered a debugging mode different from JTAG, and the debugging protocol used should also be different, so it is most directly reflected in the debugging interface. Compared with JTAG's 20 pins, SWD only needs 4 (or 5) pins, and has a simple structure, but its scope of use is not as wide as JTAG. The SWD debugging mode was added to mainstream debuggers later.

The difference between SWD and traditional debugging methods:

SWD mode is more reliable than JTAG in high-speed mode. In the case of large amounts of data, JTAG download programs will fail, but the probability of SWD happening is much smaller. Basically, you can use SWD mode directly when using JTAG simulation mode, as long as your emulator supports it, so it is recommended that you use this mode.
When you are missing one GPIO, you can use SWD simulation, which supports fewer pins.
It is recommended to use SWD mode when the size of your board is limited. It requires fewer pins, and of course, less PCB space is required! For example, you can choose a very small 2.54 spacing 5-pin terminal as the simulation interface.


RDI Interface

Remote Debug Interface is a standard debugging interface proposed by ARM, mainly used for ARM chip simulation. Since the debugging interfaces used by various IDE manufacturers are independent of each other, cross-platform debugging of hardware is not possible. Now many IDE manufacturers are gradually adopting standard RDI as the debugging interface of ARM emulator, thus making cross-platform hardware debugging possible. Since EasyJTAG uses the standard RDI debugging interface, it can be used in any IDE debugging environment that uses the standard RDI interface, such as ARM's ADS1.2/IAR's EWARM 3.30.

JLink Emulator

J-Link is a JTAG-based emulator launched by German company SEGGER. Simply put, it is a JTAG protocol conversion box, that is, a small USB to JTAG conversion box, which connects to the computer via the USB interface, and uses the JTAG protocol inside the target board. It completes the conversion from software to hardware.

JLINK is a general development tool that can be used on platforms such as KEIL, IAR, and ADS. It has good speed, efficiency, and functions, and is said to be the most powerful among many simulators.

ULink Simulator

ULINK is an emulator launched by ARM/KEIL. Currently, its upgraded versions, ULINK2 and ULINK Pro, are available online. ULINK/ULINK2 can be used with Keil software to realize emulation functions, and can only be used on Keil software, adding serial debugging (SWD) support, return clock support and real-time proxy functions. Development engineers can easily perform on-chip debugging (using on-chip JTAG, SWD and OCDS) and Flash programming on the target hardware by combining the RealView MDK debugger and ULINK2.

However, it should be noted that ULINK is an emulator developed by KEIL and is specifically designed for use under the KEIL platform. It cannot be used under ADS or IAR.

ST-Link Emulator

T-LINK is an emulator specifically for STMicroelectronics STM8 and STM32 series chips. ST-LINK /V2 specifies the SWIM standard interface and JTAG / SWD standard interface. Its main functions are:

Programming function: can burn FLASH ROM, EEPROM, AFR, etc.;
Simulation function: supports various debugging methods such as full-speed operation, single-step debugging, breakpoint debugging, etc., and can view IO status, variable data, etc.;
Simulation performance: uses USB2.0 interface for simulation debugging, single-step debugging, breakpoint debugging, and fast response speed;
Programming performance: uses USB2.0 interface for SWIM/JTAG/SWD download, and the download speed is fast;

This post is from Microcontroller MCU

Latest reply

Is there any general JTAG tool? As long as it can send IR DR raw command, it will be fine.   Details Published on 2020-9-25 12:04
 

9

Posts

0

Resources
2
 

Is there any general JTAG tool? As long as it can send IR DR raw command, it will be fine.

This post is from Microcontroller MCU
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list