|
|
@@ -1,52 +1,47 @@
|
|
|
-Configure WROVER JTAG Interface
|
|
|
-===============================
|
|
|
-:link_to_translation:`zh_CN:[中文]`
|
|
|
+.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
|
|
|
+ :start-after: devkit-defs
|
|
|
+ :end-before: ---
|
|
|
+
|
|
|
|
|
|
-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.
|
|
|
+Configure |devkit-name| JTAG Interface
|
|
|
+======================================
|
|
|
+:link_to_translation:`zh_CN:[中文]`
|
|
|
|
|
|
+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.
|
|
|
|
|
|
Configure Hardware
|
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
-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`.
|
|
|
-
|
|
|
-2. Verify if ESP32 pins used for JTAG communication are not connected to some other h/w that may disturb JTAG operation:
|
|
|
+.. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
|
|
|
+ :start-after: devkit-hw-config
|
|
|
+ :end-before: ---
|
|
|
|
|
|
- +---+---------------+-------------+
|
|
|
- | | ESP32 Pin | JTAG Signal |
|
|
|
- +===+===============+=============+
|
|
|
- | 1 | CHIP_PU | TRST_N |
|
|
|
- +---+---------------+-------------+
|
|
|
- | 2 | MTDO / GPIO15 | TDO |
|
|
|
- +---+---------------+-------------+
|
|
|
- | 3 | MTDI / GPIO12 | TDI |
|
|
|
- +---+---------------+-------------+
|
|
|
- | 4 | MTCK / GPIO13 | TCK |
|
|
|
- +---+---------------+-------------+
|
|
|
- | 5 | MTMS / GPIO14 | TMS |
|
|
|
- +---+---------------+-------------+
|
|
|
+* Verify if {IDF_TARGET_NAME} pins used for JTAG communication are not connected to some other h/w that may disturb JTAG operation:
|
|
|
|
|
|
+ .. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
|
|
|
+ :start-after: jtag-pins
|
|
|
+ :end-before: ---
|
|
|
|
|
|
Configure USB Drivers
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
-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.
|
|
|
+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.
|
|
|
|
|
|
-.. note:: ESP-WROVER-KIT uses an FT2232 adapter. The following instructions can also be used for other FT2232 based JTAG adapters.
|
|
|
+.. note:: |devkit-name| uses an FT2232 adapter. The following instructions can also be used for other FT2232 based JTAG adapters.
|
|
|
|
|
|
|
|
|
Windows
|
|
|
"""""""
|
|
|
|
|
|
-1. Using standard USB A / micro USB B cable connect ESP-WROVER-KIT to the computer. Switch the WROVER KIT on.
|
|
|
+1. Using standard USB A / micro USB B cable connect |devkit-name| to the computer. Switch the |devkit-name| on.
|
|
|
|
|
|
-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.
|
|
|
+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.
|
|
|
|
|
|
3. Download Zadig tool (Zadig_X.X.exe) from https://zadig.akeo.ie/ and run it.
|
|
|
|
|
|
4. In Zadig tool go to "Options" and check "List All Devices".
|
|
|
|
|
|
-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.
|
|
|
+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.
|
|
|
|
|
|
.. figure:: ../../../_static/jtag-usb-configuration-zadig.jpg
|
|
|
:align: center
|
|
|
@@ -55,19 +50,19 @@ Windows
|
|
|
|
|
|
Configuration of JTAG USB driver in Zadig tool
|
|
|
|
|
|
-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.
|
|
|
+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.
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
- 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.
|
|
|
+ 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.
|
|
|
|
|
|
-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`.
|
|
|
+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`.
|
|
|
|
|
|
|
|
|
Linux
|
|
|
"""""
|
|
|
|
|
|
-1. Using standard USB A / micro USB B cable connect ESP-WROVER-KIT board to the computer. Power on the board.
|
|
|
+1. Using standard USB A / micro USB B cable connect |devkit-name| board to the computer. Power on the board.
|
|
|
|
|
|
.. highlight:: none
|
|
|
|
|
|
@@ -92,9 +87,9 @@ Linux
|
|
|
|
|
|
If you see similar result and you are a member of ``plugdev`` group, then the set up is complete.
|
|
|
|
|
|
- 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.
|
|
|
+ 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.
|
|
|
|
|
|
-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`.
|
|
|
+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`.
|
|
|
|
|
|
|
|
|
MacOS
|
|
|
@@ -104,14 +99,14 @@ On macOS, using FT2232 for JTAG and serial port at the same time needs some addi
|
|
|
|
|
|
1. Manually unload the FTDI serial port driver before starting OpenOCD, start OpenOCD, then load the serial port driver.
|
|
|
|
|
|
-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.
|
|
|
+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|.
|
|
|
|
|
|
Manually unloading the driver
|
|
|
.............................
|
|
|
|
|
|
1. Install FTDI driver from https://www.ftdichip.com/Drivers/VCP.htm
|
|
|
|
|
|
-2. Connect USB cable to the WROVER KIT.
|
|
|
+2. Connect USB cable to the |devkit-name|.
|
|
|
|
|
|
3. Unload the serial port driver::
|
|
|
|
|
|
@@ -121,9 +116,11 @@ Manually unloading the driver
|
|
|
|
|
|
sudo kextunload -b com.apple.driver.AppleUSBFTDI
|
|
|
|
|
|
-4. Run OpenOCD::
|
|
|
+4. Run OpenOCD:
|
|
|
|
|
|
- bin/openocd -f board/esp32-wrover-kit-3.3v.cfg
|
|
|
+ .. include:: {IDF_TARGET_TOOLCHAIN_NAME}.inc
|
|
|
+ :start-after: run-openocd
|
|
|
+ :end-before: ---
|
|
|
|
|
|
5. In another terminal window, load FTDI serial port driver again::
|
|
|
|
|
|
@@ -131,7 +128,7 @@ Manually unloading the driver
|
|
|
|
|
|
.. note::
|
|
|
|
|
|
- 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.
|
|
|
+ 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.
|
|
|
|
|
|
This procedure can be wrapped into a shell script, if desired.
|
|
|
|