[riot-notifications] [RIOT-OS/RIOT] cpu/esp32: Add openocd programming support (#16911)

Erik Ekman notifications at github.com
Tue Sep 28 22:50:31 CEST 2021


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->


### Contribution description

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->

Configures esp32 boards with `esp_jtag` support for flashing and debugging using openocd. 
Just like esptool it writes a bootloader, a partition table and the app when flashing.

### Testing procedure

<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->

Verify that esp8266 builds still work.

https://github.com/espressif/openocd-esp32 is needed (instead of normal openocd) to flash and debug the esp32.

I flashed my board using the following setup from inside an app directory:
```
$ echo $BOARD
esp32-ethernet-kit-v1_2
$ echo $OPENOCD
~/esp/openocd-esp32/src/openocd -s ~/esp/openocd-esp32/tcl
$ PROGRAMMER=openocd USEMODULE+=esp_jtag make -j flash
```

### Issues/PRs references

<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16911

-- Commit Summary --

  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/fe9dde1d33badea95b793fcc388fe0758ed499c6">cpu/esp: Always create app.elf.bin and partitions.bin</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/c323c872cae0d63bd517ae48d0044eb1b6dc7a2d">cpu/esp32: Flash bootloader, partition and app via openocd</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/fc6f2371bea2cc7940b326e116a9adb1bc7380ab">board/esp32-ethernet-kit: Set openocd board file</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/b6994e3469aa4740966ac377356435f8d8c96fd0">tools/openocd: Export IMAGE_OFFSET only when flashing</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/1ed9a63487980fdcf126a0c57aa744adcc72710e">tools/openocd: Make verifying flashed image optional</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/2923e68425a7135e319491419e7aa8d3aecb7a57">board/esp32-ethernet-kit: Document openocd flash/debug</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16911/commits/6ec8f15545dedeeabf1da5c912a7e262cce67dab">cpu/esp32: Reset when starting debugging</a>

-- File Changes --

    M boards/esp32-ethernet-kit-v1_0/Makefile.include (4)
    M boards/esp32-ethernet-kit-v1_0/doc_common.txt (14)
    M cpu/esp32/Makefile.include (14)
    M cpu/esp_common/Makefile.include (42)
    M dist/tools/openocd/openocd.sh (7)
    M makefiles/tools/esptool.inc.mk (33)
    M makefiles/tools/openocd.inc.mk (19)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16911.patch
https://github.com/RIOT-OS/RIOT/pull/16911.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16911
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210928/e8c594bb/attachment-0001.htm>


More information about the notifications mailing list