2021-11-09 09:11:01 +00:00
|
|
|
.. This file gets included from other .rst files in this folder.
|
|
|
|
.. It contains target-specific snippets.
|
|
|
|
.. Comments and '---' lines act as delimiters.
|
|
|
|
..
|
|
|
|
.. This is necessary mainly because RST doesn't support substitutions
|
|
|
|
.. (defined in RST, not in Python) inside code blocks. If that is ever implemented,
|
|
|
|
.. These code blocks can be moved back to the main .rst files, with target-specific
|
|
|
|
.. file names being replaced by substitutions.
|
|
|
|
|
|
|
|
.. run-openocd
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
openocd -f board/esp32c2-ftdi.cfg
|
2021-11-09 09:11:01 +00:00
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. |run-openocd-device-name| replace:: ESP32-C2 development board with ESP-Prog
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-output
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
CHIP SPECIFIC LOG OUTPUT
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. |run-openocd-cfg-file-err| replace:: ``Can't find board/esp32c2-ftdi.cfg``
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-upload
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
openocd -f board/esp32c2-ftdi.cfg -c "program_esp filename.bin 0x10000 verify exit"
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-src-linux
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
src/openocd -f board/esp32c2-ftdi.cfg
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-src-win
|
|
|
|
|
|
|
|
.. code-block:: batch
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
src\openocd -f board/esp32c2-ftdi.cfg
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. idf-py-openocd-default-cfg
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. |idf-py-def-cfg| replace:: ``-f board/esp32c2-ftdi.cfg``
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-appimage-offset
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
openocd -f board/esp32c2-ftdi.cfg -c "init; halt; esp appimage_offset 0x210000"
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. openocd-cfg-files
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. list-table:: OpenOCD configuration files for ESP32-C2
|
2021-11-09 09:11:01 +00:00
|
|
|
:widths: 25 75
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - Name
|
|
|
|
- Description
|
|
|
|
* - Content
|
|
|
|
- Content
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. openocd-target-specific-config-vars
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. jtag-pins
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. list-table:: ESP32-C2 pins and JTAG signals
|
2021-11-09 09:11:01 +00:00
|
|
|
:widths: 25 75
|
|
|
|
:header-rows: 1
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
* - ESP32-C2 Pin
|
2021-11-09 09:11:01 +00:00
|
|
|
- JTAG Signal
|
2022-06-14 05:41:11 +00:00
|
|
|
* - MTDO / GPIO7
|
2021-11-09 09:11:01 +00:00
|
|
|
- TDO
|
2022-06-14 05:41:11 +00:00
|
|
|
* - MTDI / GPIO5
|
2021-11-09 09:11:01 +00:00
|
|
|
- TDI
|
2022-06-14 05:41:11 +00:00
|
|
|
* - MTCK / GPIO6
|
2021-11-09 09:11:01 +00:00
|
|
|
- TCK
|
2022-06-14 05:41:11 +00:00
|
|
|
* - MTMS / GPIO4
|
2021-11-09 09:11:01 +00:00
|
|
|
- TMS
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-d3
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
openocd -l openocd_log.txt -d3 -f board/esp32c2-ftdi.cfg
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-openocd-d3-tee
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
openocd -d3 -f board/esp32c2-ftdi.cfg 2>&1 | tee openocd.log
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. run-gdb-remotelog
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
riscv32-esp-elf-gdb -ex "set remotelogfile gdb_log.txt" <all other options>
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. devkit-defs
|
|
|
|
|
2022-06-14 05:41:11 +00:00
|
|
|
.. |devkit-name| replace:: There is no ESP32-C2 devkit with FT2232H
|
|
|
|
.. |devkit-name-with-link| replace:: add a link here if such a devkit is added.
|
2021-11-09 09:11:01 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
.. devkit-hw-config
|
|
|
|
|
|
|
|
---
|