You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api-guides/jtag-debugging/configure-ft2232h-jtag.rst
+33-36Lines changed: 33 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,47 @@
1
-
Configure WROVER JTAG Interface
2
-
===============================
3
-
:link_to_translation:`zh_CN:[中文]`
1
+
.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
2
+
:start-after: devkit-defs
3
+
:end-before: ---
4
+
4
5
5
-
All versions of ESP-WROVER-KIT boards have built-in JTAG functionality. Putting it to work requires setting jumpers to enable JTAG functionality, setting SPI flash voltage and configuring USB drivers. Please refer to step by step instructions below.
6
+
Configure |devkit-name| JTAG Interface
7
+
======================================
8
+
:link_to_translation:`zh_CN:[中文]`
6
9
10
+
All versions of |devkit-name| boards have built-in JTAG functionality. Putting it to work requires setting jumpers or DIP switches to enable JTAG functionality, and configuring USB drivers. Please refer to step by step instructions below.
7
11
8
12
Configure Hardware
9
13
^^^^^^^^^^^^^^^^^^
10
14
11
-
1. Enable on-board JTAG functionality by setting JP8 according to :doc:`../../hw-reference/esp32/get-started-wrover-kit`, Section :ref:`get-started-esp-wrover-kit-v4.1-setup-options`.
12
-
13
-
2. Verify if ESP32 pins used for JTAG communication are not connected to some other h/w that may disturb JTAG operation:
15
+
.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
16
+
:start-after: devkit-hw-config
17
+
:end-before: ---
14
18
15
-
+---+---------------+-------------+
16
-
|| ESP32 Pin | JTAG Signal |
17
-
+===+===============+=============+
18
-
| 1 | CHIP_PU | TRST_N |
19
-
+---+---------------+-------------+
20
-
| 2 | MTDO / GPIO15 | TDO |
21
-
+---+---------------+-------------+
22
-
| 3 | MTDI / GPIO12 | TDI |
23
-
+---+---------------+-------------+
24
-
| 4 | MTCK / GPIO13 | TCK |
25
-
+---+---------------+-------------+
26
-
| 5 | MTMS / GPIO14 | TMS |
27
-
+---+---------------+-------------+
19
+
* Verify if {IDF_TARGET_NAME} pins used for JTAG communication are not connected to some other h/w that may disturb JTAG operation:
28
20
21
+
.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
22
+
:start-after: jtag-pins
23
+
:end-before: ---
29
24
30
25
Configure USB Drivers
31
26
^^^^^^^^^^^^^^^^^^^^^
32
27
33
-
Install and configure USB drivers, so OpenOCD is able to communicate with JTAG interface on ESP-WROVER-KIT board as well as with UART interface used to upload application for flash. Follow steps below specific to your operating system.
28
+
Install and configure USB drivers, so OpenOCD is able to communicate with JTAG interface on |devkit-name| board as well as with UART interface used to upload application for flash. Follow steps below specific to your operating system.
34
29
35
-
.. note:: ESP-WROVER-KIT uses an FT2232 adapter. The following instructions can also be used for other FT2232 based JTAG adapters.
30
+
.. note:: |devkit-name| uses an FT2232 adapter. The following instructions can also be used for other FT2232 based JTAG adapters.
36
31
37
32
38
33
Windows
39
34
"""""""
40
35
41
-
1. Using standard USB A / micro USB B cable connect ESP-WROVER-KIT to the computer. Switch the WROVER KIT on.
36
+
1. Using standard USB A / micro USB B cable connect |devkit-name| to the computer. Switch the |devkit-name| on.
42
37
43
-
2. Wait until USB ports of WROVER KIT are recognized by Windows and drives are installed. If they do not install automatically, then download them from https://www.ftdichip.com/Drivers/D2XX.htm and install manually.
38
+
2. Wait until USB ports of |devkit-name| are recognized by Windows and drives are installed. If they do not install automatically, then download them from https://www.ftdichip.com/Drivers/D2XX.htm and install manually.
44
39
45
40
3. Download Zadig tool (Zadig_X.X.exe) from https://zadig.akeo.ie/ and run it.
46
41
47
42
4. In Zadig tool go to "Options" and check "List All Devices".
48
43
49
-
5. Check the list of devices that should contain two WROVER specific USB entries: "Dual RS232-HS (Interface 0)" and "Dual RS232-HS (Interface 1)". The driver name would be "FTDIBUS (vxxxx)" and USB ID: 0403 6010.
44
+
5. Check the list of devices that should contain two |devkit-name| specific USB entries: "Dual RS232-HS (Interface 0)" and "Dual RS232-HS (Interface 1)". The driver name would be "FTDIBUS (vxxxx)" and USB ID: 0403 6010.
6. The first device (Dual RS232-HS (Interface 0)) is connected to the JTAG port of the ESP32. Original "FTDIBUS (vxxxx)" driver of this device should be replaced with "WinUSB (v6xxxxx)". To do so, select "Dual RS232-HS (Interface 0) and reinstall attached driver to the "WinUSB (v6xxxxx)", see picture above.
53
+
6. The first device (Dual RS232-HS (Interface 0)) is connected to the JTAG port of the {IDF_TARGET_NAME}. Original "FTDIBUS (vxxxx)" driver of this device should be replaced with "WinUSB (v6xxxxx)". To do so, select "Dual RS232-HS (Interface 0) and reinstall attached driver to the "WinUSB (v6xxxxx)", see picture above.
59
54
60
55
.. note::
61
56
62
-
Do not change the second device "Dual RS232-HS (Interface 1)". It is routed to ESP32's serial port (UART) used for upload of application to ESP32's flash.
57
+
Do not change the second device "Dual RS232-HS (Interface 1)". It is routed to {IDF_TARGET_NAME}'s serial port (UART) used for upload of application to {IDF_TARGET_NAME}'s flash.
63
58
64
-
Now ESP-WROVER-KIT's JTAG interface should be available to the OpenOCD. To carry on with debugging environment setup, proceed to section :ref:`jtag-debugging-run-openocd`.
59
+
Now |devkit-name|'s JTAG interface should be available to the OpenOCD. To carry on with debugging environment setup, proceed to section :ref:`jtag-debugging-run-openocd`.
65
60
66
61
67
62
Linux
68
63
"""""
69
64
70
-
1. Using standard USB A / micro USB B cable connect ESP-WROVER-KIT board to the computer. Power on the board.
65
+
1. Using standard USB A / micro USB B cable connect |devkit-name| board to the computer. Power on the board.
71
66
72
67
.. highlight:: none
73
68
@@ -92,9 +87,9 @@ Linux
92
87
93
88
If you see similar result and you are a member of ``plugdev`` group, then the set up is complete.
94
89
95
-
The ``/dev/ttyUSBn`` interface with lower number is used for JTAG communication. The other interface is routed to ESP32's serial port (UART) used for upload of application to ESP32's flash.
90
+
The ``/dev/ttyUSBn`` interface with lower number is used for JTAG communication. The other interface is routed to {IDF_TARGET_NAME}'s serial port (UART) used for upload of application to {IDF_TARGET_NAME}'s flash.
96
91
97
-
Now ESP-WROVER-KIT's JTAG interface should be available to the OpenOCD. To carry on with debugging environment setup, proceed to section :ref:`jtag-debugging-run-openocd`.
92
+
Now |devkit-name|'s JTAG interface should be available to the OpenOCD. To carry on with debugging environment setup, proceed to section :ref:`jtag-debugging-run-openocd`.
98
93
99
94
100
95
MacOS
@@ -104,14 +99,14 @@ On macOS, using FT2232 for JTAG and serial port at the same time needs some addi
104
99
105
100
1. Manually unload the FTDI serial port driver before starting OpenOCD, start OpenOCD, then load the serial port driver.
106
101
107
-
2. Modify FTDI driver configuration so that it doesn't load itself for channel B of FT2232 chip, which is the channel used for JTAG on WROVER KIT.
102
+
2. Modify FTDI driver configuration so that it doesn't load itself for channel B of FT2232 chip, which is the channel used for JTAG on |devkit-name|.
108
103
109
104
Manually unloading the driver
110
105
.............................
111
106
112
107
1. Install FTDI driver from https://www.ftdichip.com/Drivers/VCP.htm
113
108
114
-
2. Connect USB cable to the WROVER KIT.
109
+
2. Connect USB cable to the |devkit-name|.
115
110
116
111
3. Unload the serial port driver::
117
112
@@ -121,17 +116,19 @@ Manually unloading the driver
121
116
122
117
sudo kextunload -b com.apple.driver.AppleUSBFTDI
123
118
124
-
4. Run OpenOCD::
119
+
4. Run OpenOCD:
125
120
126
-
bin/openocd -f board/esp32-wrover-kit-3.3v.cfg
121
+
.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
122
+
:start-after: run-openocd
123
+
:end-before: ---
127
124
128
125
5. In another terminal window, load FTDI serial port driver again::
If you need to restart OpenOCD, there is no need to unload FTDI driver again — just stop OpenOCD and start it again. The driver only needs to be unloaded if WROVER KIT was reconnected or power was toggled.
131
+
If you need to restart OpenOCD, there is no need to unload FTDI driver again — just stop OpenOCD and start it again. The driver only needs to be unloaded if |devkit-name| was reconnected or power was toggled.
135
132
136
133
This procedure can be wrapped into a shell script, if desired.
* Enable on-board JTAG functionality by setting JP8 according to :doc:`../../hw-reference/esp32/get-started-wrover-kit`, Section :ref:`get-started-esp-wrover-kit-v4.1-setup-options`.
0 commit comments