target/espressif: add algorithm support to xtensa chips Also includes esp_xtensa flasher stub jumper binary. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I054ce31033ca6a87afe9b5325b545338a7d8fe8f Reviewed-on: https://review.openocd.org/c/openocd/+/7772 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target/espressif: cleanup unused macro definitions Memory region addresses are not in use for now. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I9a2189e956ae59b56245ec914ab16719df857b2d Reviewed-on: https://review.openocd.org/c/openocd/+/7762 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target/esp_xtensa: add xtensa on_halt handler Right after target halt, some activities needs to be done such as printing exception reason, disable wdts and reading debug stubs information. Missing activities will be submitted in the next patches. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I27aad5614d903f4bd7c8d6dba6bfb0bdb93ed8dc Reviewed-on: https://review.openocd.org/c/openocd/+/7757 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
target/espressif: add application tracing functionality over JTAG This feature allows to transfer arbitrary data between host and ESP32 via JTAG. The main use cases: 1- Collecting application specific data 2- Lightweight logging to the host 3- System behaviour analysis with SEGGER SystemView 4- Source code coverage Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I95dee00ac22891fa326915a3fcac3c088cbb2afc Reviewed-on: https://review.openocd.org/c/openocd/+/7163 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target/esp32s2: check xtensa_poll return value Although scan build couldn't catch, return value overwritten without checking. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I02b10002b03640604315047e8a8a639824724c16 Reviewed-on: https://review.openocd.org/c/openocd/+/7247 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
openocd: fix SPDX tag format for files .c With the old checkpatch we cannot use the correct format for the SPDX tags in the file .c, in fact the C99 comments are not allowed and we had to use the block comment. With the new checkpatch, let's switch to the correct SPDX format. Change created automatically through the command: sed -i \ 's,^/\* *\(SPDX-License-Identifier: .*[^ ]\) *\*/$,// \1,' \ $(find src/ contrib/ -name \*.c) Change-Id: I6da16506baa7af718947562505dd49606d124171 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7153 Tested-by: jenkins
xtensa: make local symbols static Symbols that are not exported should be declared as static. Change-Id: Ieb627f7f896e4663b0d5b18c4ab1853b39d23d03 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7167 Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-by: Ian Thompson <ianst@cadence.com> Tested-by: jenkins
target/espressif: add semihosting support ARM semihosting + some custom syscalls implemented for Espressif chips (ESP32, ESP32-S2, ESP32-S3) Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Ic8174cf1cd344fa16d619b7b8405c9650e869443 Reviewed-on: https://review.openocd.org/c/openocd/+/7074 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target: add generic Xtensa LX support Generic Xtensa LX support extends the original Espressif/Xtensa patch-set to support arbitrary Xtensa configurations, as defined in a core-specific .cfg file. Not yet fully-featured. Additional functionality to be added: - Xtensa NX support - DAP/SWD support - File-IO support - Generic Xtensa multi-core support Valgrind-clean, no new Clang analyzer warnings Signed-off-by: Ian Thompson <ianst@cadence.com> Change-Id: I08e7bf8fa57c25b5d0cb75a1aa7a2ac13a380c52 Reviewed-on: https://review.openocd.org/c/openocd/+/7055 Tested-by: jenkins Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target/espressif: remove author lines from esp32xx and xtensa files Some files have author info some doesn't. For the consistency we removed all. Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Ie6f1ec012302e3a954c75c5106f12820722cb715 Reviewed-on: https://review.openocd.org/c/openocd/+/7104 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
openocd: src/target: replace the GPL-2.0-or-later license tag Replace the FSF boilerplate with the SPDX tag. The SPDX tag on files *.c is incorrect, as it should use the C99 single line comment using '//'. But current checkpatch doesn't allow C99 comments, so keep using standard C comments, by now. Change-Id: I255ad17235ff1e01bf0aa4deed4d944e1d693ddb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7071 Tested-by: jenkins
esp32s2: convert counted timeout to timeval_ms Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: Id685408281478cec0e7e886dbedb3b8972c7b652 Reviewed-on: https://review.openocd.org/c/openocd/+/7020 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Ian Thompson <ianst@cadence.com>
target: add Espressif ESP32 basic support ESP32 is a dual core Xtensa SoC Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I76fb184aa38ab9f4e30290c038b5ff8850060750 Reviewed-on: https://review.openocd.org/c/openocd/+/6989 Tested-by: jenkins Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
target: add Espressif ESP32-S2 basic support ESP32-S2 is a single core Xtensa chip. Not full featured yet. Some of the missing functionality: -Semihosting -Flash breakpoints -Flash loader -Apptrace -FreeRTOS Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com> Change-Id: I2fb32978e801af5aa21616c581691406ad7cd6bb Reviewed-on: https://review.openocd.org/c/openocd/+/6940 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Ian Thompson <ianst@cadence.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins