/ ULINK2 User's GuideTarget ConnectorsThe ULINK2 provides five JTAG connectors that support the variouscable types needed for debugging different targets:. 20-pin connector, a narrow 0.079' (2.0 mm) pitchconnector for ARM targets. 20-pin connector, a 0.10' (2.54 mm) pitch connector forARM targets.
16-pin connector for Infineon OCDS (JTAG) targets. 14-pin connector for STMicroelectronics µPSDtargets. 10-pin connector for ARM targets (Mfgr: Don Connex P/N:C42 or ). Theis available with different options forplating, tail, shroud, and lead style.A cable for each connector is shipped with the ULINK2 StandardProduct.
If you must change cables, then make sure to line up themarker stripe on the cable with pin 1 of the connector. Pin 1 islabeled on the board.ULINK2 Adapter Connectors (cover off)ULINK2 supports both JTAG and Serial Wire Mode interfaces. Referto the appropriate pinout diagram for the ULINK2 adapter connectorsto make sure they match your target hardware.SignalConnects to.TMSTest Mode State pin — Use 100K Ohm pull-upresistor to VCC.TDOTest Data Out pin.RTCKJTAG Return Test ClocK. (see Note below)TDITest Data In pin — Use 100K Ohm pull-up resistorto VCC.TRSTTest ReSeT/ pin — Use 100K Ohm pull-up resistorto VCC. TRST is optional and not available on some devices.
Youmay leave it unconnected. This is an open-collector/open-drainoutput.TCLKTest CLocK pin — Use 100K Ohm pull-down resistorto GND.VCCPositive Supply Voltage — Power supply for JTAGinterface drivers.GNDDigital ground.RESETRSTIN/ pin — Connect this pin to the (activelow) reset input of the target CPU.
In “,” I used a SEGGER J-Link to debug an ESP32 device with JTAG. I looked at using one of the FTDI FT2232HL development boards, which are supported by OpenOCD. The FT2232HL is dual high-speed USB to UART/FIFO device, and similar FTDI devices are used on many boards as UART to USB converters. With OpenOCD, these devices can be turned into inexpensive JTAG debug probes. This article shows how to use a $10 FTDI board as a JTAG interface to program and debug the Espressif ESP32.FTDI JTAG ConnectionWe are using the TTGO ESP32 module (Espressif Pico D4) and the Wi-Fi module on the lab robot. On that robot, the NXP K22FX512 is using the ESP32 as a Wi-Fi gateway (see ““).ESP32 TTGO Module on RobotThe FT2232HL is available around $10 from different web stores or from AliExpress:FT2232HL Development BoardI’m using an Adafruit adapter board to make the connection between the FTDI and the JTAG pins. I’m using the FTDI signals from the ADBUS:Below are the signals on the 2×10 pin JTAG header:JTAG PinsOn the ESP32 , the following pins are used:.
GND. TMS: IO14. TDI: IO12. TCKL: IO13. TDO: IO15ESP32 Debug Connection PinsThe FT2232 shows up with two USB serial ports in the Windows device manager:FT2232HL in the device managerFor OpenOCD, use the on Windows to load the WinUSB Driver for the FT2232HL chip. Notice that it shows up here as ‘USB Serial Converter A’ and ‘USB Serial Converter B’. As I’m using the ADBUS, I’m configuration the A converter:USB Driver ToolOpenOCD needs a configuration file.
Jtag Serial
I’m using the one below: ## OpenOCD configuration file for the FTDI FT2232HL# evaluation board used as JTAG adapter# Please modify this file to your local setup.## Include the configuration for the JTAG adapter.# If you have a different interface, please edit this to include the# configuration file of yours.#source find interface/ftdi/mbftdi.cfginterface ftdiftdividpid 0x0403 0x6010ftdichannel 0ftdilayoutinit 0x0038 0x003b# The ESP32 only supports JTAG.transport select jtag# The speed of the JTAG interface, in KHz. If you get DSR/DIR errors (and they# do not relate to OpenOCD trying to read from a memory range without physical# memory being present there), you can try lowering this.adapterkhz 200# With no variables set, openocd will configure JTAG for the two cores of the ESP32 and# will do automatic RTOS detection. This can be adjusted by uncommenting any of the# following lines:# Only configure the PRO CPU#set ESP32ONLYCPU 1# Only configure the APP CPU#set ESP32ONLYCPU 2# Disable RTOS support# set ESP32RTOS none# Force RTOS to be FreeRTOS#set ESP32RTOS FreeRTOS#Source the ESP32 configuration file#source find target/esp32.cfg# The TDI pin of ESP32 is also a bootstrap pin that selects the voltage the SPI flash# chip runs at. When a hard reset happens (e.g. Because someone switches the board off# and on) the ESP32 will use the current TDI value as the bootstrap value because the# JTAG adapter overrides the pull-up or pull-down resistor that is supposed to do the# bootstrapping.