JTAG Debugging – Hardware Box

The JTAG debugging hardware box commonly includes Lauderbatch and ARM’s DStreamer, with prices for licenses ranging from thousands of dollars:JTAG Debugging - Hardware Box A more affordable option is the Flyswatter, priced at a few hundred dollars. Let’s discuss further:JTAG Debugging - Hardware Box Inside the box is actually a USB to serial FTDI FT2232 chip. After connecting to the PC via USB, the system displays the following messages:

[589267.559221] usb 1-14: USB disconnect, device number 3[589268.856301] usb 1-14: new high-speed USB device number 12 using xhci_hcd[589268.986201] usb 1-14: New USB device found, idVendor=0403, idProduct=6010, bcdDevice= 7.00[589268.986207] usb 1-14: New USB device strings: Mfr=1, Product=2, SerialNumber=3[589268.986210] usb 1-14: Product: Flyswatter2[589268.986212] usb 1-14: Manufacturer: TinCanTools[589268.986213] usb 1-14: SerialNumber: FS20000

The output of lsub shows the device as follows, indicating that there is a USB chip inside the box:

Bus 001 Device 012: ID 0403:6010 Future Technology Devices International, Ltd FT2232C/D/H Dual UART/FIFO IC

The JTAG connector connects to the SoC development board and is a 20 PIN connector, with the pin definitions as follows:JTAG Debugging - Hardware Box The main connections are TRST, TDI, TDO, TMS, and TCK. The entire debugging environment is set up as follows:JTAG Debugging - Hardware Box The openocd on the host has a driver file ftdi.c, and the programming interface for the FT2232 chip is implemented through libusb, sending JTAG programming sequences to realize the JTAG communication protocol. This chip does not require a driver under Linux; instead, the default ftdi_sio kernel module needs to be disabled. However, under Windows, it needs to be replaced with the generic winusb driver so that openocd can communicate with it through libusb. The steps are as follows:1. Select the Flyswatter deviceJTAG Debugging - Hardware Box2. Replace with the winusb driverJTAG Debugging - Hardware Box

Leave a Comment