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/building-openocd-linux.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Building OpenOCD from Sources for Linux
3
3
***************************************
4
4
:link_to_translation:`zh_CN:[中文]`
5
5
6
-
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :doc:`setup-openocd-linux`.
6
+
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :ref:`jtag-debugging-setup-openocd`.
Copy file name to clipboardexpand all lines: docs/en/api-guides/jtag-debugging/building-openocd-macos.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Building OpenOCD from Sources for MacOS
3
3
***************************************
4
4
:link_to_translation:`zh_CN:[中文]`
5
5
6
-
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :doc:`setup-openocd-macos`.
6
+
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :ref:`jtag-debugging-setup-openocd`.
Copy file name to clipboardexpand all lines: docs/en/api-guides/jtag-debugging/building-openocd-windows.rst
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ Building OpenOCD from Sources for Windows
3
3
*****************************************
4
4
:link_to_translation:`zh_CN:[中文]`
5
5
6
-
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :doc:`setup-openocd-windows`.
6
+
The following instructions are alternative to downloading binary OpenOCD from `Espressif GitHub <https://github.com/espressif/openocd-esp32/releases>`_. To quickly setup the binary OpenOCD, instead of compiling it yourself, backup and proceed to section :ref:`jtag-debugging-setup-openocd`.
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.
Copy file name to clipboardexpand all lines: docs/en/api-guides/jtag-debugging/index.rst
+37-46
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ GDB. The document is structured as follows:
12
12
:ref:`jtag-debugging-selecting-jtag-adapter`
13
13
What are the criteria and options to select JTAG adapter hardware.
14
14
:ref:`jtag-debugging-setup-openocd`
15
-
Procedure to install OpenOCD using prebuilt software packages for :doc:`Windows <setup-openocd-windows>`, :doc:`Linux <setup-openocd-linux>` and :doc:`MacOS <setup-openocd-macos>` operating systems.
15
+
Procedure to install OpenOCD and verify that it is installed.
16
16
:ref:`jtag-debugging-configuring-esp32-target`
17
17
Configuration of OpenOCD software and set up JTAG adapter hardware that will make together a debugging target.
18
18
:ref:`jtag-debugging-launching-debugger`
@@ -84,45 +84,28 @@ The minimal signalling to get a working JTAG connection are TDI, TDO, TCK, TMS a
84
84
Setup of OpenOCD
85
85
----------------
86
86
87
-
This step covers installation of OpenOCD binaries. If you like to build OpenOCS from sources then refer to section :ref:`jtag-debugging-building-openocd`. All OpenOCD files will be placed in ``~/esp/openocd-esp32`` directory. You may choose any other directory, but need to adjust respective paths used in examples.
88
-
89
-
.. toctree::
90
-
:hidden:
91
-
92
-
Windows <setup-openocd-windows>
93
-
Linux <setup-openocd-linux>
94
-
MacOS <setup-openocd-macos>
95
-
96
-
Pick up your OS below and follow provided instructions to setup OpenOCD.
If you have already set up ESP-IDF with CMake build system according to the :doc:`Getting Started Guide <../../get-started/index>`, then OpenOCD is already installed. After :ref:`setting up the environment <get-started-set-up-env>` in your terminal, you should be able to run OpenOCD. Check this by executing the following command::
Open On-Chip Debugger v0.10.0-esp32-20190708 (2019-07-08-11:04)
98
+
Licensed under GNU GPL v2
99
+
For bug reports, read
100
+
http://openocd.org/doc/doxygen/bugs.html
116
101
117
-
After installation is complete, get familiar with two key directories inside ``openocd-esp32`` installation folder:
102
+
You may also verify that OpenOCD knows where its configuration scripts are located by printing the value of ``OPENOCD_SCRIPTS`` environment variable, by typing ``echo $OPENOCD_SCRIPTS`` (for Linux and macOS) or ``echo %OPENOCD_SCRIPTS%`` (for Windows). If a valid path is printed, then OpenOCD is set up correctly.
118
103
119
-
* ``bin`` containing OpenOCD executable
120
-
* ``share\openocd\scripts`` containing configuration files invoked together with OpenOCD as command line parameters
104
+
If any of these steps do not work, please go back to the :ref:`setting up the tools <get-started-set-up-tools>` section of the Getting Started Guide.
121
105
122
106
.. note::
123
107
124
-
Directory names and structure above are specific to binary distribution of OpenOCD. They are used in examples of invoking OpenOCD throughout this guide. Directories for OpenOCD build from sources are different, so the way to invoke OpenOCD. For details see :ref:`jtag-debugging-building-openocd`.
125
-
108
+
It is also possible to build OpenOCD from source. Please refer to :ref:`jtag-debugging-building-openocd` section for details.
126
109
127
110
.. _jtag-debugging-configuring-esp32-target:
128
111
@@ -157,23 +140,20 @@ Once target is configured and connected to computer, you are ready to launch Ope
157
140
158
141
.. highlight:: bash
159
142
160
-
Open terminal, go to directory where OpenOCD is installed and start it up::
143
+
Open a terminal and set it up for using the ESP-IDF as described in the :ref:`setting up the environment <get-started-set-up-env>` section of the Getting Started Guide. Then run OpenOCD (this command works on Windows, Linux, and macOS)::
The files provided after ``-f`` above, are specific for ESP-WROVER-KIT with :ref:`esp-modules-and-boards-esp32-wroom-32` module. You may need to provide different files depending on used hardware, For guidance see :ref:`jtag-debugging-tip-openocd-configure-target`.
168
-
169
-
.. include:: ./windows-openocd-note.rst
149
+
The files provided after ``-f`` above are specific for ESP-WROVER-KIT with :ref:`esp-modules-and-boards-esp32-wroom-32` module. You may need to provide different files depending on used hardware. For guidance see :ref:`jtag-debugging-tip-openocd-configure-target`.
170
150
171
151
.. highlight:: none
172
152
173
153
You should now see similar output (this log is for ESP-WROVER-KIT)::
OpenOCD flashing command ``program_esp32`` has the following format:
210
187
@@ -268,13 +245,27 @@ Please refer to separate documents listed below, that describe build process.
268
245
Linux <building-openocd-linux>
269
246
MacOS <building-openocd-macos>
270
247
271
-
.. note::
248
+
The examples of invoking OpenOCD in this document assume using pre-built binary distribution described in section :ref:`jtag-debugging-setup-openocd`.
249
+
250
+
.. highlight:: bash
251
+
252
+
To use binaries build locally from sources, change the path to OpenOCD executable to ``src/openocd`` and set the ``OPENOCD_SCRIPTS`` environment variable so that OpenOCD can find the configuration files. For Linux and macOS::
253
+
254
+
cd ~/esp/openocd-esp32
255
+
export OPENOCD_SCRIPTS=$PWD/tcl
256
+
257
+
For Windows::
258
+
259
+
cd %USERPROFILE%\esp\openocd-esp32
260
+
set "OPENOCD_SCRIPTS=%CD%\tcl"
261
+
262
+
Example of invoking OpenOCD build locally from sources, for Linux and macOS::
272
263
273
-
Examples of invoking OpenOCD in this document assume using pre-built binary distribution described in section :ref:`jtag-debugging-setup-openocd`. To use binaries build locally from sources, change the path to OpenOCD executable to ``src/openocd`` and the path to configuration files to ``-s tcl``.
Copy file name to clipboardexpand all lines: docs/en/api-guides/jtag-debugging/tips-and-quirks.rst
+3-7
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ Offset should be in hex format. To reset to the default behaviour you can specif
36
36
37
37
Since GDB requests memory map from OpenOCD only once when connecting to it, this command should be specified in one of the TCL configuration files, or passed to OpenOCD via its command line. In the latter case command line should look like below:
Logging to a file this way will prevent information displayed on the terminal. This may be a good thing taken amount of information provided, when increased debug level ``-d 3`` is set. If you still like to see the log on the screen, then use another command instead:
0 commit comments