1.. _esp_wrover_kit:
2
3ESP-WROVER-KIT
4##############
5
6Overview
7********
8
9ESP-WROVER-KIT is an ESP32-based development board produced by `Espressif <https://www.espressif.com/>`_.
10
11ESP-WROVER-KIT features the following integrated components:
12
13- ESP32-WROVER-E module
14- LCD screen
15- MicroSD card slot
16
17Its another distinguishing feature is the embedded FTDI FT2232HL chip - an advanced multi-interface
18USB bridge. This chip enables to use JTAG for direct debugging of ESP32 through the USB interface
19without a separate JTAG debugger. ESP-WROVER-KIT makes development convenient, easy, and
20cost-effective.
21
22Most of the ESP32 I/O pins are broken out to the board's pin headers for easy access.
23
24.. note::
25
26   ESP32's GPIO16 and GPIO17 are used as chip select and clock signals for PSRAM. By default, the two
27   GPIOs are not broken out to the board's pin headers in order to ensure reliable performance.
28
29Functionality Overview
30**********************
31
32The block diagram below shows the main components of ESP-WROVER-KIT and their interconnections.
33
34.. image:: img/esp-wrover-kit-block-diagram.jpg
35     :align: center
36     :alt: ESP-WROVER-KIT
37
38Functional Description
39**********************
40
41The following two figures and the table below describe the key components, interfaces, and controls
42of the ESP-WROVER-KIT board.
43
44.. figure:: img/esp-wrover-kit-v4.1-layout-front.jpg
45     :align: center
46     :alt: esp wrover front
47
48     ESP-WROVER-KIT board layout - front
49
50.. _esp wrover back:
51
52.. figure:: img/esp-wrover-kit-v4.1-layout-back.jpg
53     :align: center
54     :alt: esp wrover back
55
56     ESP-WROVER-KIT board layout - back
57
58The table below provides description in the following manner:
59- Starting from the first picture’s top right corner and going clockwise
60- Then moving on to the second picture
61
62+------------------+-------------------------------------------------------------------------+
63| Key Component    | Description                                                             |
64+==================+=========================================================================+
65| FT2232           | The FT2232 chip serves as a multi-protocol USB-to-serial bridge         |
66|                  | which can be programmed and controlled via USB to provide               |
67|                  | communication with ESP32. FT2232 also features USB-to-JTAG              |
68|                  | interface which is available on channel A of the chip, while USB-to-    |
69|                  | serial is on channel B. The FT2232 chip enhances user-friendliness in   |
70|                  | terms of application development and debugging. See `ESP-WROVER-KIT     |
71|                  | V4.1 schematic                                                          |
72|                  | <https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf>`_.     |
73+------------------+-------------------------------------------------------------------------+
74| 32.768 kHz       | External precision 32.768 kHz crystal oscillator serves as a clock with |
75|                  | low-power consumption while the chip is in Deep-sleep mode.             |
76+------------------+-------------------------------------------------------------------------+
77| 0R               | Zero-ohm resistor intended as a placeholder for a current shunt, can    |
78|                  | be desoldered or replaced with a current shunt to facilitate the        |
79|                  | measurement of ESP32’s current consumption in different modes.          |
80+------------------+-------------------------------------------------------------------------+
81| ESP32-WROVER-E   | This ESP32 module features 64-Mbit PSRAM for flexible extended          |
82| module           | storage and data processing capabilities.                               |
83+------------------+-------------------------------------------------------------------------+
84| Diagnostic LEDs  | Four red LEDs connected to the GPIO pins of FT2232. Intended for        |
85|                  | future use.                                                             |
86+------------------+-------------------------------------------------------------------------+
87| UART             | Serial port. The serial TX/RX signals of FT2232 and ESP32 are broken    |
88|                  | out to the inward and outward sides of JP2 respectively. By default,    |
89|                  | these pairs of pins are connected with jumpers. To use ESP32’s serial   |
90|                  | interface, remove the jumpers and connect another external serial       |
91|                  | device to the respective pins.                                          |
92+------------------+-------------------------------------------------------------------------+
93| SPI              | By default, ESP32 uses its SPI interface to access flash and PSRAM      |
94|                  | memory inside the module. Use these pins to connect ESP32 to            |
95|                  | another SPI device. In this case, an extra chip select (CS) signal is   |
96|                  | needed. Please note that the voltage of this interface is 3.3 V.        |
97+------------------+-------------------------------------------------------------------------+
98| CTS/RTS          | Serial port flow control signals: the pins are not connected to the     |
99|                  | circuitry by default. To enable them, short the respective pins of JP14 |
100|                  | with jumpers.                                                           |
101+------------------+-------------------------------------------------------------------------+
102| JTAG             | JTAG interface. JTAG signals of FT2232 and ESP32 are broken out to      |
103|                  | the inward and outward sides of JP2 respectively. By default, these     |
104|                  | pairs of pins are disconnected. To enable JTAG, short the respective    |
105|                  | pins with jumpers as shown in Section                                   |
106|                  | :ref:`Setup Options<setup options>`                                     |
107+------------------+-------------------------------------------------------------------------+
108| USB Port         | USB interface. Power supply for the board as well as the                |
109|                  | communication interface between a computer and the board.               |
110+------------------+-------------------------------------------------------------------------+
111| EN Button        | Reset button.                                                           |
112+------------------+-------------------------------------------------------------------------+
113| BOOT Button      | Download button. Holding down Boot and then pressing EN initiates       |
114|                  | Firmware Download mode for downloading firmware through the             |
115+------------------+-------------------------------------------------------------------------+
116| Power Switch     | Power On/Off Switch. Toggling toward the Boot button powers the         |
117|                  | board on, toggling away from Boot powers the board off.                 |
118+------------------+-------------------------------------------------------------------------+
119| Power Selector   | Power supply selector interface. The board can be powered either via    |
120|                  | USB or via the 5V Input interface. Select the power source with a       |
121|                  | jumper. For more details, see Section Setup Options, jumper header      |
122|                  | JP7.                                                                    |
123+------------------+-------------------------------------------------------------------------+
124| 5V input         | 5V power supply interface for a standard coaxial power connector,       |
125|                  | 5.5 x 2.1 mm, center positive. This interface can be more convenient    |
126|                  | when the board is operating autonomously (not connected to a            |
127|                  | computer).                                                              |
128+------------------+-------------------------------------------------------------------------+
129| 5V Power On LED  | This red LED turns on when power is supplied to the board, either       |
130|                  | from USB or 5V Input.                                                   |
131+------------------+-------------------------------------------------------------------------+
132| LDO              | NCP1117(1A). 5V-to-3.3V LDO. NCP1117 can provide a maximum              |
133|                  | current of 1A. The LDO on the board has a fixed output voltage.         |
134|                  | Although, the user can install an LDO with adjustable output voltage.   |
135|                  | For details, please refer to `ESP-WROVER-KIT V4.1 schematic             |
136|                  | <https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf>`_.     |
137+------------------+-------------------------------------------------------------------------+
138| Camera Connector | Camera interface, a standard OV7670 camera module.                      |
139+------------------+-------------------------------------------------------------------------+
140| RGB LED          | Red, green and blue (RGB) light emitting diodes (LEDs), can be          |
141|                  | controlled by pulse width modulation (PWM).                             |
142+------------------+-------------------------------------------------------------------------+
143| I/O Connector    | All the pins on the ESP32 module are broken out to pin headers. You     |
144|                  | can program ESP32 to enable multiple functions, such as PWM, ADC,       |
145|                  | DAC, I2C, I2S, SPI, etc.                                                |
146+------------------+-------------------------------------------------------------------------+
147| MicroSD Card     | Useful for developing applications that access MicroSD card for data    |
148| Slot             | storage and retrieval.                                                  |
149+------------------+-------------------------------------------------------------------------+
150| LCD              | Support for mounting and interfacing a 3.2” SPI (standard 4-wire        |
151|                  | Serial Peripheral Interface) LCD, as shown on figure                    |
152|                  | :ref:`ESP-WROVER-KIT board layout - back<esp wrover back>`              |
153+------------------+-------------------------------------------------------------------------+
154
155.. _setup options:
156
157Setup Options
158*************
159
160There are three jumper blocks available to set up the board functionality. The most frequently
161required options are listed in the table below.
162
163.. |jmpextpwr| image:: img/esp-wrover-kit-v4.1-jp7-ext_5v.jpg
164
165.. |jmpusbpwr| image:: img/esp-wrover-kit-v4.1-jp7-usb_5v.jpg
166
167.. |jmpjtag| image:: img/esp-wrover-kit-v4.1-jp2-jtag.jpg
168
169.. |jmpuart| image:: img/esp-wrover-kit-v4.1-jp2-tx-rx.jpg
170
171.. |jmpctrl| image:: img/esp-wrover-kit-v4.1-jp14.jpg
172
173+------------------+--------------------------------------------------------------+
174| Header | Jumper Setting | Description of Functionality                          |
175+========+================+=======================================================+
176| JP7    | |jmpextpwr|    | Power ESP-WROVER-KIT via an external power supply     |
177+--------+----------------+-------------------------------------------------------+
178| JP7    | |jmpusbpwr|    | Power ESP-WROVER-KIT via USB                          |
179+--------+----------------+-------------------------------------------------------+
180| JP2    | |jmpjtag|      | Enable JTAG functionality                             |
181+--------+----------------+-------------------------------------------------------+
182| JP2    | |jmpuart|      | Enable UART communication                             |
183+--------+----------------+-------------------------------------------------------+
184| JP14   | |jmpctrl|      | Enable RTS/CTS flow control for serial communication  |
185+--------+----------------+-------------------------------------------------------+
186
187Allocation of ESP32 Pins
188************************
189
190Some pins / terminals of ESP32 are allocated for use with the onboard or external hardware. If
191that hardware is not used, e.g., nothing is plugged into the Camera (JP4) header, then these
192GPIOs can be used for other purposes.
193
194Some of the pins, such as GPIO0 or GPIO2, have multiple functions and some of them are shared
195among onboard and external peripheral devices. Certain combinations of peripherals cannot work
196together. For example, it is not possible to do JTAG debugging of an application that is using
197SD card, because several pins are shared by JTAG and the SD card slot.
198
199In other cases, peripherals can coexist under certain conditions. This is applicable to, for
200example, LCD screen and SD card that share only a single pin GPIO21. This pin is used to provide
201D/C (Data / Control) signal for the LCD as well as the Card Detect signal read from the SD card
202slot. If the card detect functionality is not essential, then it may be disabled by removing R167,
203so both LCD and SD may operate together.
204
205For more details on which pins are shared among which peripherals, please refer to the table in
206the next section.
207
208Main I/O Connector / JP1
209************************
210
211The JP1 connector consists of 14x2 male pins whose functions are shown in the middle two “I/O”
212columns of the table below. The two “Shared With” columns on both sides describe where else on
213the board a certain GPIO is used.
214
215+-------------------+------+------+----------------------+
216| Shared With       | I/O  | I/O  | Shared With          |
217+===================+======+======+======================+
218| n/a               | 3.3V | GND  | n/a                  |
219+-------------------+------+------+----------------------+
220| NC/XTAL           | IO32 | IO33 | NC/XTAL              |
221+-------------------+------+------+----------------------+
222| JTAG, MicroSD     | IO12 | IO13 | JTAG, MicroSD        |
223+-------------------+------+------+----------------------+
224| JTAG, MicroSD     | IO14 | IO27 | Camera               |
225+-------------------+------+------+----------------------+
226| Camera            | IO26 | IO25 | Camera, LCD          |
227+-------------------+------+------+----------------------+
228| Camera            | IO35 | IO34 | Camera               |
229+-------------------+------+------+----------------------+
230| Camera            | IO39 | IO36 | Camera               |
231+-------------------+------+------+----------------------+
232| JTAG              | EN   | IO23 | Camera, LCD          |
233+-------------------+------+------+----------------------+
234| Camera, LCD       | IO22 | IO21 | Camera, LCD, MicroSD |
235+-------------------+------+------+----------------------+
236| Camera, LCD       | IO19 | IO18 | Camera, LCD          |
237+-------------------+------+------+----------------------+
238| Camera, LCD       | IO5  | IO17 | PSRAM                |
239+-------------------+------+------+----------------------+
240| PSRAM             | IO16 | IO4  | LED, Camera, MicroSD |
241+-------------------+------+------+----------------------+
242| Camera, LED, Boot | IO0  | IO2  | LED, MicroSD         |
243+-------------------+------+------+----------------------+
244| JTAG, MicroSD     | IO15 | 5V   |                      |
245+-------------------+------+------+----------------------+
246
247Legend:
248
249  - NC/XTAL - 32.768 kHz Oscillator
250  - JTAG - JTAG / JP2
251  - Boot - Boot button / SW2
252  - Camera - Camera / JP4
253  - LED - RGB LED
254  - MicroSD - MicroSD Card / J4
255  - LCD - LCD / U5
256  - PSRAM - ESP32-WROVER-E’s PSRAM
257
25832.768 kHz Oscillator
259*********************
260
261+---+-----------+
262| . | ESP32 Pin |
263+===+===========+
264| 1 | GPIO32    |
265+---+-----------+
266| 2 | GPIO33    |
267+---+-----------+
268
269.. note::
270
271   Since GPIO32 and GPIO33 are connected to the oscillator by default, they are not connected to
272   the JP1 I/O connector to maintain signal integrity. This allocation may be changed from the
273   oscillator to JP1 by desoldering the zero-ohm resistors from positions R11 / R23 and re-
274   soldering them to positions R12 / R24.
275
276SPI Flash / JP2
277***************
278
279+---+--------------+
280| . | ESP32 Pin    |
281+===+==============+
282| 1 | CLK / GPIO6  |
283+---+--------------+
284| 2 | SD0 / GPIO7  |
285+---+--------------+
286| 3 | SD1 / GPIO8  |
287+---+--------------+
288| 4 | SD2 / GPIO9  |
289+---+--------------+
290| 5 | SD3 / GPIO10 |
291+---+--------------+
292| 6 | CDM / GPIO11 |
293+---+--------------+
294
295.. important::
296   The module’s flash bus is connected to the jumper block JP2 through zero-ohm resistors R140 ~
297   R145. If the flash memory needs to operate at the frequency of 80 MHz, for reasons such as
298   improving the integrity of bus signals, you can desolder these resistors to disconnect the
299   module’s flash bus from the pin header JP2.
300
301JTAG / JP2
302**********
303
304+---+---------------+-------------+
305| . | ESP32 Pin     | JTAG Signal |
306+===+===============+=============+
307| 1 | EN            | TRST_N      |
308+---+---------------+-------------+
309| 2 | MTMS / GPIO14 | TMS         |
310+---+---------------+-------------+
311| 3 | MTDO / GPIO15 | TDO         |
312+---+---------------+-------------+
313| 4 | MTDI / GPIO12 | TDI         |
314+---+---------------+-------------+
315| 5 | MTCK / GPIO13 | TCK         |
316+---+---------------+-------------+
317
318Camera / JP4
319************
320
321+----+-----------+-----------------------------+
322| .  | ESP32 Pin | Camera Signal               |
323+====+===========+=============================+
324| 1  | n/a       | 3.3V                        |
325+----+-----------+-----------------------------+
326| 2  | n/a       | Ground                      |
327+----+-----------+-----------------------------+
328| 3  | GPIO27    | SIO_C / SCCB Clock          |
329+----+-----------+-----------------------------+
330| 4  | GPIO26    | SIO_D / SCCB Data           |
331+----+-----------+-----------------------------+
332| 5  | GPIO25    | VSYNC / Vertical Sync       |
333+----+-----------+-----------------------------+
334| 6  | GPIO23    | HREF / Horizontal Reference |
335+----+-----------+-----------------------------+
336| 7  | GPIO22    | PCLK / Pixel Clock          |
337+----+-----------+-----------------------------+
338| 8  | GPIO21    | XCLK / System Clock         |
339+----+-----------+-----------------------------+
340| 9  | GPIO35    | D7 / Pixel Data Bit 7       |
341+----+-----------+-----------------------------+
342| 10 | GPIO34    | D6 / Pixel Data Bit 6       |
343+----+-----------+-----------------------------+
344| 11 | GPIO39    | D5 / Pixel Data Bit 5       |
345+----+-----------+-----------------------------+
346| 12 | GPIO36    | D4 / Pixel Data Bit 4       |
347+----+-----------+-----------------------------+
348| 13 | GPIO19    | D3 / Pixel Data Bit 3       |
349+----+-----------+-----------------------------+
350| 14 | GPIO18    | D2 / Pixel Data Bit 2       |
351+----+-----------+-----------------------------+
352| 15 | GPIO5     | D1 / Pixel Data Bit 1       |
353+----+-----------+-----------------------------+
354| 16 | GPIO4     | D0 / Pixel Data Bit 0       |
355+----+-----------+-----------------------------+
356| 17 | GPIO0     | RESET / Camera Reset        |
357+----+-----------+-----------------------------+
358| 18 | n/a       | PWDN / Camera Power Down    |
359+----+-----------+-----------------------------+
360
361- Signals D0 .. D7 denote camera data bus
362
363RGB LED
364*******
365
366+----+-----------+---------+
367| .  | ESP32 Pin | RGB LED |
368+====+===========+=========+
369| 1  | GPIO0     | Red     |
370+----+-----------+---------+
371| 2  | GPIO2     | Green   |
372+----+-----------+---------+
373| 3  | GPIO4     | Blue    |
374+----+-----------+---------+
375
376MicroSD Card
377************
378
379+---+---------------+----------------+
380| . | ESP32 Pin     | MicroSD Signal |
381+===+===============+================+
382| 1 | MTDI / GPIO12 | DATA2          |
383+---+---------------+----------------+
384| 2 | MTCK / GPIO13 | CD / DATA3     |
385+---+---------------+----------------+
386| 3 | MTDO / GPIO15 | CMD            |
387+---+---------------+----------------+
388| 4 | MTMS / GPIO14 | CLK            |
389+---+---------------+----------------+
390| 5 | GPIO2         | DATA0          |
391+---+---------------+----------------+
392| 6 | GPIO4         | DATA1          |
393+---+---------------+----------------+
394| 7 | GPIO21        | Card Detect    |
395+---+---------------+----------------+
396
397LCD / U5
398********
399
400+---+-----------+------------+
401| . | ESP32 Pin | LCD Signal |
402+===+===========+============+
403| 1 | GPIO18    | RESET      |
404+---+-----------+------------+
405| 2 | GPIO19    | SCL        |
406+---+-----------+------------+
407| 3 | GPIO21    | D/C        |
408+---+-----------+------------+
409| 4 | GPIO22    | CS         |
410+---+-----------+------------+
411| 5 | GPIO23    | SDA        |
412+---+-----------+------------+
413| 6 | GPIO25    | SDO        |
414+---+-----------+------------+
415| 7 | GPIO5     | Backlight  |
416+---+-----------+------------+
417
418Start Application Development
419*****************************
420
421Before powering up your ESP-WROVER-KIT, please make sure that the board is in good
422condition with no obvious signs of damage.
423
424Initial Setup
425*************
426
427Please set only the following jumpers shown in the pictures below:
428
429- Select USB as the power source using the jumper block JP7.
430- Enable UART communication using the jumper block JP2.
431
432+------------------------+---------------------------+
433| Power up from USB port | Enable UART communication |
434+========+===============+===========================+
435|       |jmpusbpwr|      |         |jmpuart|         |
436+------------------------+---------------------------+
437
438Do not install any other jumpers.
439
440Turn the Power Switch to ON, the 5V Power On LED should light up.
441
442Supported Features
443==================
444
445Current Zephyr's ESP32-Wrover-Kit board supports the following features:
446
447+------------+------------+-------------------------------------+
448| Interface  | Controller | Driver/Component                    |
449+============+============+=====================================+
450+------------+------------+-------------------------------------+
451| UART       | on-chip    | serial port                         |
452+------------+------------+-------------------------------------+
453| GPIO       | on-chip    | gpio                                |
454+------------+------------+-------------------------------------+
455| PINMUX     | on-chip    | pinmux                              |
456+------------+------------+-------------------------------------+
457| USB-JTAG   | on-chip    | hardware interface                  |
458+------------+------------+-------------------------------------+
459| SPI Master | on-chip    | spi                                 |
460+------------+------------+-------------------------------------+
461| Timers     | on-chip    | counter                             |
462+------------+------------+-------------------------------------+
463| Watchdog   | on-chip    | watchdog                            |
464+------------+------------+-------------------------------------+
465| TRNG       | on-chip    | entropy                             |
466+------------+------------+-------------------------------------+
467| LEDC       | on-chip    | pwm                                 |
468+------------+------------+-------------------------------------+
469| MCPWM      | on-chip    | pwm                                 |
470+------------+------------+-------------------------------------+
471| PCNT       | on-chip    | qdec                                |
472+------------+------------+-------------------------------------+
473| SPI DMA    | on-chip    | spi                                 |
474+------------+------------+-------------------------------------+
475| TWAI       | on-chip    | can                                 |
476+------------+------------+-------------------------------------+
477| ADC        | on-chip    | adc                                 |
478+------------+------------+-------------------------------------+
479| DAC        | on-chip    | dac                                 |
480+------------+------------+-------------------------------------+
481| Wi-Fi      | on-chip    |                                     |
482+------------+------------+-------------------------------------+
483| Bluetooth  | on-chip    |                                     |
484+------------+------------+-------------------------------------+
485
486System requirements
487===================
488
489Prerequisites
490-------------
491
492Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
493below to retrieve those files.
494
495.. code-block:: console
496
497   west blobs fetch hal_espressif
498
499.. note::
500
501   It is recommended running the command above after :file:`west update`.
502
503Building & Flashing
504*******************
505
506ESP-IDF bootloader
507==================
508
509The board is using the ESP-IDF bootloader as the default 2nd stage bootloader.
510It is build as a subproject at each application build. No further attention
511is expected from the user.
512
513MCUboot bootloader
514==================
515
516User may choose to use MCUboot bootloader instead. In that case the bootloader
517must be build (and flash) at least once.
518
519There are two options to be used when building an application:
520
5211. Sysbuild
5222. Manual build
523
524.. note::
525
526   User can select the MCUboot bootloader by adding the following line
527   to the board default configuration file.
528   ```
529   CONFIG_BOOTLOADER_MCUBOOT=y
530   ```
531
532Sysbuild
533========
534
535The sysbuild makes possible to build and flash all necessary images needed to
536bootstrap the board with the ESP32 SoC.
537
538To build the sample application using sysbuild use the command:
539
540.. zephyr-app-commands::
541   :tool: west
542   :app: samples/hello_world
543   :board: esp_wrover_kit
544   :goals: build
545   :west-args: --sysbuild
546   :compact:
547
548By default, the ESP32 sysbuild creates bootloader (MCUboot) and application
549images. But it can be configured to create other kind of images.
550
551Build directory structure created by sysbuild is different from traditional
552Zephyr build. Output is structured by the domain subdirectories:
553
554.. code-block::
555
556  build/
557  ├── hello_world
558  │   └── zephyr
559  │       ├── zephyr.elf
560  │       └── zephyr.bin
561  ├── mcuboot
562  │    └── zephyr
563  │       ├── zephyr.elf
564  │       └── zephyr.bin
565  └── domains.yaml
566
567.. note::
568
569   With ``--sysbuild`` option the bootloader will be re-build and re-flash
570   every time the pristine build is used.
571
572For more information about the system build please read the :ref:`sysbuild` documentation.
573
574Manual build
575============
576
577During the development cycle, it is intended to build & flash as quickly possible.
578For that reason, images can be build one at a time using traditional build.
579
580The instructions following are relevant for both manual build and sysbuild.
581The only difference is the structure of the build directory.
582
583.. note::
584
585   Remember that bootloader (MCUboot) needs to be flash at least once.
586
587Build and flash applications as usual (see :ref:`build_an_application` and
588:ref:`application_run` for more details).
589
590.. zephyr-app-commands::
591   :zephyr-app: samples/hello_world
592   :board: esp_wrover_kit
593   :goals: build
594
595The usual ``flash`` target will work with the ``esp_wrover_kit`` board
596configuration. Here is an example for the :ref:`hello_world`
597application.
598
599.. zephyr-app-commands::
600   :zephyr-app: samples/hello_world
601   :board: esp_wrover_kit
602   :goals: flash
603
604Open the serial monitor using the following command:
605
606.. code-block:: shell
607
608   west espressif monitor
609
610After the board has automatically reset and booted, you should see the following
611message in the monitor:
612
613.. code-block:: console
614
615   ***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
616   Hello World! esp_wrover_kit
617
618Debugging
619*********
620
621ESP32 support on OpenOCD is available upstream as of version 0.12.0.
622Download and install OpenOCD from `OpenOCD`_.
623
624On the ESP-WROVER-KIT board, the JTAG pins are connected internally to
625a USB serial port on the same device as the console.  These boards
626require no external hardware and are debuggable as-is.  The JTAG
627signals, however, must be jumpered closed to connect the internal
628controller (the default is to leave them disconnected).  The jumper
629headers are on the right side of the board as viewed from the power
630switch, next to similar headers for SPI and UART.  See
631`ESP-WROVER-32 V3 Getting Started Guide`_ for details.
632
633Here is an example for building the :ref:`hello_world` application.
634
635.. zephyr-app-commands::
636   :zephyr-app: samples/hello_world
637   :board: esp_wrover_kit
638   :goals: build flash
639   :gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
640
641You can debug an application in the usual way. Here is an example for the :ref:`hello_world` application.
642
643.. zephyr-app-commands::
644   :zephyr-app: samples/hello_world
645   :board: esp_wrover_kit
646   :goals: debug
647
648.. _`OpenOCD`: https://github.com/openocd-org/openocd
649.. _`ESP-WROVER-32 V3 Getting Started Guide`: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-wrover-kit.html
650
651Related Documents
652*****************
653
654.. _ESP-WROVER-KIT V4.1 schematics: https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4_1.pdf (PDF)
655.. _ESP-WROVER-KIT V4.1 layout: https://dl.espressif.com/dl/schematics/ESP-WROVER-KIT_V4.1.dxf (DXF)
656.. _ESP32 Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf (PDF)
657.. _ESP32-WROVER-E Datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf (PDF)
658.. _ESP32 Hardware Reference: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/index.html
659