1. JTAG Protocol
JTAG (Joint Test Action Group) is an international standard testing protocol (IEEE 1149.1 compatible), primarily used for internal chip testing. Most advanced devices today support the JTAG protocol, such as ARM, DSP, and FPGA devices. The standard JTAG interface consists of 4 lines: TMS, TCK, TDI, and TDO, which correspond to test mode select, clock, data input, and data output lines, respectively. The definitions of the related JTAG pins are:
-
TMS: Test Mode Select, used to set the JTAG interface to a specific test mode; -
TCK: Test Clock Input; -
TDI: Test Data Input, data is input to 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, computers (PCs) commonly had parallel ports, thus it was defined to use the parallel port for the computer connection. Today, it is rare to find a desktop computer with a parallel port, let alone a laptop. Instead, USB interfaces are becoming increasingly common. Therefore, it is seldom seen in the market now.
2. SWD Interface
Serial Wire Debug (SWD) can be considered a different debugging mode from JTAG, as it uses a different debugging protocol. The most direct difference is in the debugging interface; compared to JTAG’s 20 pins, SWD requires only 4 (or 5) pins, making it simpler, but its usage is not as widespread as JTAG, and mainstream debuggers have only recently added SWD debugging mode.
The differences between SWD and traditional debugging methods are:
-
SWD mode is more reliable than JTAG in high-speed modes. In cases of large data volumes, JTAG may fail to download programs, while the chances of failure with SWD are significantly lower. If you are using JTAG emulation mode, you can directly use SWD mode as long as your emulator supports it, so it is recommended to use this mode.
-
When GPIO pins are limited, SWD emulation can be used, which requires fewer pins.
-
SWD mode is recommended when the board size is limited, as it requires fewer pins, thus reducing PCB space! For example, you can choose a very small 2.54 pitch 5-pin terminal for the emulation interface.
3. RDI Interface
The Remote Debug Interface (RDI) is a standard debugging interface proposed by ARM, primarily used for ARM chip emulation. Since various IDE vendors use independent debugging interfaces, hardware debugging across platforms is not possible.
Many IDE manufacturers are gradually adopting the standard RDI as the debugging interface for ARM emulators, making cross-platform hardware debugging possible. EasyJTAG uses the standard RDI debugging interface, allowing it to work in any IDE debugging environment that uses the standard RDI interface, such as ARM’s ADS 1.2/IAR’s EWARM 3.30.
4. JLink Emulator
J-Link is a JTAG-based emulator launched by the German company SEGGER. In simple terms, it is a JTAG protocol converter box, a small USB to JTAG converter box that connects to the computer via USB while connecting to the target board using the JTAG protocol. It completes the conversion from software to hardware.
JLINK is a universal development tool that can be used on platforms like KEIL, IAR, and ADS. Its speed, efficiency, and functionality are excellent, and it is said to be one of the most powerful emulators available.
5. ULink Emulator
ULINK is an emulator launched by ARM/KEIL, with its upgraded versions ULINK2 and ULINK Pro available online. ULINK/ULINK2 can work with Keil software to achieve emulation functionality and can only be used with Keil software, adding support for Serial Wire Debug (SWD), return clock support, and real-time proxy features.
Development engineers can conveniently perform on-chip debugging (using on-chip JTAG, SWD, and OCDS) and Flash programming on target hardware by combining the RealView MDK debugger with ULINK2. However, it should be noted that ULINK is an emulator developed by KEIL and is specifically designed for use on the KEIL platform; it cannot be used on ADS or IAR.
6. ST-Link Emulator
ST-LINK is an emulator specifically designed for STMicroelectronics’ STM8 and STM32 series chips. The ST-LINK /V2 specifies the SWIM standard interface and JTAG/SWD standard interfaces, with the following main functions:
-
Programming function: can write FLASH ROM, EEPROM, AFR, etc.; -
Emulation function: supports full-speed operation, single-step debugging, breakpoint debugging, and various debugging methods, allowing for the viewing of IO states, variable data, etc.; -
Emulation performance: uses USB 2.0 interface for emulation debugging, single-step debugging, breakpoint debugging, with fast response speed; -
Programming performance: uses USB 2.0 interface for SWIM/JTAG/SWD downloading, with fast download speed;
