openocd.git
19 months agotarget: make local symbols static 68/7168/2
Antonio Borneo [Mon, 5 Sep 2022 21:56:18 +0000 (23:56 +0200)]
target: make local symbols static

Symbols that are not exported should be declared as static.

Change-Id: I2475524f4c14520e3163572560f4a9f276356ed5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7168
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agoxtensa: make local symbols static 67/7167/2
Antonio Borneo [Mon, 5 Sep 2022 21:55:25 +0000 (23:55 +0200)]
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
19 months agoriscv: make local symbols static 66/7166/2
Antonio Borneo [Mon, 5 Sep 2022 21:54:41 +0000 (23:54 +0200)]
riscv: make local symbols static

Symbols that are not exported should be declared as static.

Change-Id: Ie3bd17535c8cb2a0fec5d3bedfe7de3e0a702613
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7166
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Jan Matyas <matyas@codasip.com>
19 months agojtag: make local symbols static 65/7165/2
Antonio Borneo [Mon, 5 Sep 2022 21:53:10 +0000 (23:53 +0200)]
jtag: make local symbols static

Symbols that are not exported should be declared as static.

Change-Id: I6224ae89ebda3230dfee2413e3823be9b8716bba
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7165
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agolog: remove unused set_log_output() 64/7164/2
Antonio Borneo [Mon, 5 Sep 2022 22:24:39 +0000 (00:24 +0200)]
log: remove unused set_log_output()

The function set_log_output() has never been used after the drop
of eCos build with commit 39650e2273bc ("ecosboard: delete
bit-rotted eCos code") in 2012.

Drop it!

Change-Id: I070b688061776c7ced5db18f738d78a4a7623726
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7164
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
19 months agotcl/board: add ESP32-S3 config for ESP USB Bridge board 77/7077/2
Erhan Kurubas [Sun, 3 Jul 2022 09:28:12 +0000 (12:28 +0300)]
tcl/board: add ESP32-S3 config for ESP USB Bridge board

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I97d0f01f342dddb31b2d454858fe854f002cf567
Reviewed-on: https://review.openocd.org/c/openocd/+/7077
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotcl/board: add ESP32 config for ESP USB Bridge board 76/7076/2
Erhan Kurubas [Sun, 3 Jul 2022 09:24:24 +0000 (12:24 +0300)]
tcl/board: add ESP32 config for ESP USB Bridge board

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Ie1a56a398052f6f0e0eb2fe96777effeb59918f6
Reviewed-on: https://review.openocd.org/c/openocd/+/7076
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/xtensa: fix step state transition 50/7150/3
Ian Thompson [Mon, 29 Aug 2022 14:34:18 +0000 (07:34 -0700)]
target/xtensa: fix step state transition

For some configurations, notably on DAP systems, resolve issue where single-stepping does not always transition into the HALTED state.

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I053f4eaffad8c3228878ba87580ada640e4bd2fe
Reviewed-on: https://review.openocd.org/c/openocd/+/7150
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/xtensa: DAP-based Xtensa config files 45/7145/3
Ian Thompson [Thu, 25 Aug 2022 15:55:00 +0000 (08:55 -0700)]
target/xtensa: DAP-based Xtensa config files

- Config files for DAP/JTAG and DAP/SWD systems
- Xtensa core config definitions for NXP RT685 with Xtensa HiFi DSP

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I9c3280052073d86e09c7553de661eb8662a95c4a
Reviewed-on: https://review.openocd.org/c/openocd/+/7145
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/xtensa: enable DAP/SWD for generic xtensa 44/7144/6
Ian Thompson [Thu, 25 Aug 2022 15:45:14 +0000 (08:45 -0700)]
target/xtensa: enable DAP/SWD for generic xtensa

- Enable ADIv5 DAP systems via JTAG or SWD transport
- Select correct PWRCTL/PWRSTAT bits for XDM/APB

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I5894210c804f85075da868d0cfc6fb20b589d99f
Reviewed-on: https://review.openocd.org/c/openocd/+/7144
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agosrc/flash/nor: flash driver for RSL10 15/7115/22
Toms Stūrmanis [Thu, 11 Aug 2022 17:22:09 +0000 (20:22 +0300)]
src/flash/nor: flash driver for RSL10

Add new flash driver for internal flash of onsemi RSL10 device.

Valgrind-clean. Clang AddressSanitizer shows no errors.

Signed-off-by: Toms Stūrmanis <toms.sturmanis@gmail.com>
Change-Id: I8030542cb9805e94f56d7a69404cef5d88d6dd5a
Reviewed-on: https://review.openocd.org/c/openocd/+/7115
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months ago.gitignore: remove cross-compile *-libtool 61/7161/2
Antonio Borneo [Sun, 4 Sep 2022 09:38:07 +0000 (11:38 +0200)]
.gitignore: remove cross-compile *-libtool

This reverts commit dac90163a287 (".gitignore: add cross-compile
*-libtool") [1] merged in May 2022.

The old build system of OpenEmbedded used to rebuild and rename
plenty of tools to discriminate between host's and target's tools.
This creates, among others, the odd file "$CROSS_COMPILE-libtool"
that was addressed by the patch [1].
OpenEmbedded has dropped this odd behavior with patch [2], present
in OpenEmbedded 4.0 "kirkstone" tagged on April 2022.

In current situation:
- old OpenEmbedded use OpenOCD v0.11.0 or older, so will not use
  the patch [1];
- new OpenEmbedded has [2] applied, so will never take benefit
  from the patch [1].

As consequence, patch [1] is completely useless and keeping it in
OpenOCD can even be misleading.

Revert patch [1].

Change-Id: I75793fce82a5297d74af72e620c4e63cd5b15f90
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: https://review.openocd.org/6960 [1]
Fixes: dac90163a287 (".gitignore: add cross-compile *-libtool")
Link: https://git.openembedded.org/openembedded-core/commit/?id=4b308773eca7
Reviewed-on: https://review.openocd.org/c/openocd/+/7161
Tested-by: jenkins
19 months agocontrib: add GPL license tag on files that miss it 60/7160/2
Antonio Borneo [Tue, 30 Aug 2022 22:20:16 +0000 (00:20 +0200)]
contrib: add GPL license tag on files that miss it

Some file miss completely the license tag.

Add the SPDX tag, using the same GPL-2.0-or-later license of the
OpenOCD project.

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: I24bd362eeb6b74f09aceb9b757d45cbfa4afe334
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7160
Tested-by: jenkins
19 months agocontrib: replace the GPLv2-or-later license tag 59/7159/2
Antonio Borneo [Tue, 30 Aug 2022 20:18:31 +0000 (22:18 +0200)]
contrib: replace the GPLv2-or-later license tag

Replace the GPLv2-or-later 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: I380d552940f1c405309a3346454251c0e80b5a45
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7159
Tested-by: jenkins
19 months agocontrib: replace the BSD-3-Clause license tag 58/7158/2
Antonio Borneo [Tue, 30 Aug 2022 21:21:52 +0000 (23:21 +0200)]
contrib: replace the BSD-3-Clause license tag

Replace the BSD-3-Clause boilerplate with the SPDX tag.
Add the SPDX tag and the copyright to two makefiles that were
added by TI with the other files in their respective folder.

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: I3ad1b2dbdb6054b74dcc26e394c9223ba0427caf
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7158
Tested-by: jenkins
19 months agocontrib: replace the GPLv3-or-later license tag 57/7157/2
Antonio Borneo [Tue, 30 Aug 2022 15:25:24 +0000 (17:25 +0200)]
contrib: replace the GPLv3-or-later license tag

These files are not built in OpenOCD and are not in conflict with
OpenOCD license.

Replace the GPL boilerplate with the SPDX tag.
Add 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: I934e4add24098f0e8574120b3bc32e9bcf166abd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7157
Tested-by: jenkins
19 months agoopenocd: fix syntax of SPDX tags 56/7156/2
Antonio Borneo [Tue, 30 Aug 2022 15:15:32 +0000 (17:15 +0200)]
openocd: fix syntax of SPDX tags

Put the SPDX tag alone in a comment in the first line of the file.
Replace the obsolete GPL-2.0+ 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: Ia91b0f7da42c439b6340bbe81983b86b68f6d65c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7156
Tested-by: jenkins
19 months agoopenocd: remove CamelCase symbols *xPSR* 55/7155/2
Antonio Borneo [Tue, 30 Aug 2022 14:10:19 +0000 (16:10 +0200)]
openocd: remove CamelCase symbols *xPSR*

We have left the camelcase symbols *xPSR* for some time, to avoid
any conflict with possibly pending patches in gerrit.
With the approaching v0.12.0-rc1, it's time to revisit it.
The patches in gerrit that conflict with this rename are all not
merge-able due to conflicts or due to negative review.

Drop these CamelCase symbols.

Change-Id: Ifbac4c1df9cc55994e024971a2aaebeed2ea4ed3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7155
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agoopenocd: remove recently added CamelCase symbols 54/7154/2
Antonio Borneo [Tue, 30 Aug 2022 14:36:07 +0000 (16:36 +0200)]
openocd: remove recently added CamelCase symbols

Without the help of checkpatch, some CamelCase symbol passed
through the filter of maintainer's review.

Drop them.

Change-Id: If5fb07b2ffb89e853dd2a61f20d4134aa6e20d24
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: 48f267d4adea ("flash/stm32l4x: avoid using magic numbers for device ids")
Fixes: 5ab74bde0654 ("semihosting: User defined operation, Tcl command exec on host")
Reviewed-on: https://review.openocd.org/c/openocd/+/7154
Tested-by: jenkins
19 months agotarget/xtensa: virtualize XDM registers 43/7143/5
Ian Thompson [Wed, 24 Aug 2022 13:51:51 +0000 (06:51 -0700)]
target/xtensa: virtualize XDM registers

Use indirect enum IDs to access XDM registers in preparation for supporting both NAR (JTAG) and APB (DAP).  No new clang static analysis warnings.

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I0b742fe4661ff3cf609454b8650493d141a1e1ff
Reviewed-on: https://review.openocd.org/c/openocd/+/7143
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agojep106: update to revision JEP106BE Jan 2022 48/7148/2
Antonio Borneo [Sat, 27 Aug 2022 17:29:55 +0000 (19:29 +0200)]
jep106: update to revision JEP106BE Jan 2022

Change-Id: I687c653517133c114a66f628cce58178ce6707cd
Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7148
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agojep106: add SPDX tag and JEDEC copyright 47/7147/2
Antonio Borneo [Sat, 27 Aug 2022 16:58:42 +0000 (18:58 +0200)]
jep106: add SPDX tag and JEDEC copyright

As a follow-up of talks between JEDEC and STMicroelectronics,
JEDEC agrees to let OpenOCD project including the manufacturer's
identification code list extracted from JEDEC JEP106 document and
to let OpenOCD being updated regularly using the future JEDEC
JEP106 document versions. JEDEC requires OpenOCD to report the
origin of the JEDEC JEP106 manufacturer's identification code list
together with the JEDEC copyright.

As agreed with JEDEC, add in the file jep106.inc:
- the SPDX tag with the GPL license of the OpenOCD project;
- the JEDEC copyright;
- the text provided by JEDEC reporting the origin of the JEDEC
  JEP106 manufacturer's identification code list.

While there:
- add a line reporting the version of the JEP106 document that was
  used for the current code list extraction;
- remove the obsolete comment, as the script for extraction is not
  working anymore; keep the script as example.

Change-Id: Iaa76716db14e15ffca04fcf7d8c27bb85a27ba10
Signed-off-by: Antonio Borneo <antonio.borneo@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7147
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agojtag/vdebug: remove BSD-2-Clause boilerplate 46/7146/2
Antonio Borneo [Mon, 22 Aug 2022 17:47:05 +0000 (19:47 +0200)]
jtag/vdebug: remove BSD-2-Clause boilerplate

The full text of the license is already available in the file
LICENSES/preferred/BSD-2-Clause
and there is no need to replicate it in the source code.

Remove the BSD-2-Clause boilerplate but, preserved the copyright
notice because it provides the info on the copyright holder.

Change-Id: I162aa4ad06b551f1a71a28d049cb797ee8ab5a01
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7146
Tested-by: jenkins
Reviewed-by: Jacek Wuwer <jacekmw8@gmail.com>
19 months agolibjaylink: Update to 0.3.1 release 19/7119/3
Marc Schink [Tue, 16 Aug 2022 08:39:14 +0000 (10:39 +0200)]
libjaylink: Update to 0.3.1 release

Change-Id: If4c13767de033a221e80fc26ee38f67c6c3d746c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7119
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoserver: add function to get openocd shutdown status 42/7142/3
Erhan Kurubas [Thu, 25 Aug 2022 14:06:40 +0000 (17:06 +0300)]
server: add function to get openocd shutdown status

In the app-trace module we are polling the target in the while loops
outside of the server.c
In that loops, we need to catch ctrl+c signal by checking shutdown_openocd
status

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Id87c709a01470bf6d3642078b160a68ca85f4406
Reviewed-on: https://review.openocd.org/c/openocd/+/7142
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/espressif: add semihosting support 74/7074/8
Erhan Kurubas [Thu, 30 Jun 2022 10:14:27 +0000 (13:14 +0300)]
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>
19 months agotarget/arm: Add support with identify STAR-MC1 36/7136/4
iysheng [Sat, 20 Aug 2022 00:30:59 +0000 (08:30 +0800)]
target/arm: Add support with identify STAR-MC1

Tested with an PLUS-F5270 board which uses the MM32F5277E9PV.

Signed-off-by: iysheng <iyysheng@gmail.com>
Change-Id: Icb75ae8337fdc6fa60e39d3d74dd8bc163707bdd
Reviewed-on: https://review.openocd.org/c/openocd/+/7136
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash/nor/kinetis: fix clang scan-build error format-truncation 40/7140/3
Erhan Kurubas [Sun, 21 Aug 2022 18:57:32 +0000 (21:57 +0300)]
flash/nor/kinetis: fix clang scan-build error format-truncation

kinetis.c:994:61: error: '%u' directive output may be truncated
writing between 1 and 10 bytes into a region of size 4
[-Werror=format-truncation=]

tested with scan-build-14

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I72d141a3f8e19ca3596beee2be8434fc8492946f
Reviewed-on: https://review.openocd.org/c/openocd/+/7140
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
19 months agotarget/riscv: Update with latest encoding from riscv-opcodes 84/7084/5
Tim Newsome [Fri, 8 Jul 2022 20:02:13 +0000 (13:02 -0700)]
target/riscv: Update with latest encoding from riscv-opcodes

This gets us a clearly labeled BSD-3-Clause header, which should be
compatible with OpenOCD and Fedora, and also make it clear what the
license actually is.

See https://github.com/riscv/riscv-openocd/pull/710,
https://github.com/riscv/riscv-openocd/pull/713, and
https://github.com/riscv/riscv-openocd/pull/717.

Change-Id: I992b4f3bb230edb9f281e2278dd41c712098ed4c
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7084
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/xtensa: fix clang analyzer warnings 41/7141/2
Ian Thompson [Sun, 21 Aug 2022 22:56:41 +0000 (15:56 -0700)]
target/xtensa: fix clang analyzer warnings

Scan-build of target/xtensa/ has no clang analyzer warnings from xtensa source files.

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I11a125c923ece9a6fd0d9ee1698f742f88ee5cab
Reviewed-on: https://review.openocd.org/c/openocd/+/7141
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash/nor/bluenrg-x: clarify target algo stack usage 32/7132/2
Tomas Vanek [Wed, 17 Aug 2022 10:24:41 +0000 (12:24 +0200)]
flash/nor/bluenrg-x: clarify target algo stack usage

While on it rename misleading write_algorithm_sp to write_algorithm_stack
and change messages referring 'stack pointer' instead of stack.

No functional change.

Change-Id: Ibb9897d3f01734812ed0f8bc8cd43b935a573f8a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7132
Tested-by: jenkins
Reviewed-by: Salvatore Giorgio Pecorino <salvatore-giorgio.pecorino@st.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash/nor/nrf5: don't misuse uint32_t for refcount 31/7131/2
Tomas Vanek [Wed, 17 Aug 2022 08:42:47 +0000 (10:42 +0200)]
flash/nor/nrf5: don't misuse uint32_t for refcount

Change-Id: I016fc9ae037fae75528850d35da059d1db5a4d45
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7131
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash/nor/core: remove unused define 21/7121/2
Tomas Vanek [Tue, 16 Aug 2022 12:10:26 +0000 (14:10 +0200)]
flash/nor/core: remove unused define

FLASH_MAX_ERROR_STR is not used since commit 815c3b353307
(merged in ~2008)

Change-Id: Ic117a2e3d22235c31dc14533b6564ebf5a13ae58
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7121
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash/nor: remove empty command definitions 20/7120/2
Antonio Borneo [Tue, 16 Aug 2022 09:42:32 +0000 (11:42 +0200)]
flash/nor: remove empty command definitions

The value of struct flash_driver::command can be NULL when the
flash driver does not need to add any new command.

Remove empty command definitions.

Change-Id: I5413967d4069030234469822d24e9825425ae012
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7120
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
19 months agodoc: how to use QEMU to test big-endian build 68/6968/7
Antonio Borneo [Thu, 5 May 2022 15:23:49 +0000 (17:23 +0200)]
doc: how to use QEMU to test big-endian build

Document the process of using buildroot to build a big-endian
binary of OpenOCD and using QEMU User Mode Emulation for running
the big-endian binary on a little-endian host PC.

Change-Id: Ic5fe26e353a4cf69e57af3c23ae7fa4b25347b2b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6968
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agoserver/server: fix target timer timing 18/7118/3
Tomas Vanek [Mon, 15 Aug 2022 17:18:18 +0000 (19:18 +0200)]
server/server: fix target timer timing

The change 6363: Call poll at a fixed interval
switched from target_call_timer_callbacks() to target_call_timer_callbacks_now().
It breaks the timing as all timers callbacks are called every time
one timer expires.

Revert this part of change and use target_call_timer_callbacks().

Fixes: db16b3dc5b06 (Call poll at a fixed interval.)
Change-Id: Ib5b7774de9694d40c55d2a4109d0d1582fc5008b
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7118
Tested-by: jenkins
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotcl/target: stm32[fl]4x: document the settings for trace 45/6945/2
Antonio Borneo [Sat, 23 Apr 2022 14:14:15 +0000 (16:14 +0200)]
tcl/target: stm32[fl]4x: document the settings for trace

While reviewing on gerrit the change
https://review.openocd.org/6932/
it get clear that the missing documentation on stm32f4x's code
was triggering errors in the new change.

OpenOCD is currently unable to read traces, but these can be
hopefully be read with some other tool.

Document the settings for enabling trace on stm32[fl]4x.

Change-Id: Ibae77a53de16375d3d500e728678740095547009
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6945
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agotcl/target: replace event trace-config 81/6681/3
Antonio Borneo [Mon, 8 Nov 2021 19:14:46 +0000 (20:14 +0100)]
tcl/target: replace event trace-config

With commit dc7b32ea4a00 ("armv7m_trace: get rid of the old tpiu
code") the target's event "trace-config" has been deprecated.

Create the TPIU device.
Replace the target's event "trace-config" with tpiu's event
"pre-enable" in the STM32 devices that require enabling the trace
clock _before_ programming the TPIU.
Make the script multi-instance-able in case it's used for JTAG
chained devices.
Uniform the code in STM32F4x with the other scripts.
Remove the empty event from STM32WLx.

Change-Id: Ifda219c3c5f37e03072a88168611cf505eb630b7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6681
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
19 months agojtag/drivers/kitprog: workaround serious firmware problem 07/7107/2
Tomas Vanek [Tue, 2 Aug 2022 07:16:21 +0000 (09:16 +0200)]
jtag/drivers/kitprog: workaround serious firmware problem

Since commit 88f429ead019fd6df96ec15f0d897385f3cef0d0
5321: target/cortex_m: faster reading of all CPU registers
debugging with a kitprog adapter freezes at debug entry.

How to replicate:
 openocd -f interface/kitprog.cfg -f target/psoc4.cfg

Connect to telnet server.
Make sure the target is running:
 resume

Halt the target:
 halt

Without this patch OpenOCD freezes in kitprog_hid_command()
in library call hid_write().

Reduce the number of SWD transactions sent in one USB bulk write
as a workaround, simply use shorter buffer.
For details see the comment in src/jtag/drivers/kitprog.c

Change-Id: I0116894d5ebf1655f6011f0d35acdbbc178cd48c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7107
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agojtag/drivers/kitprog: use HID read timeout 06/7106/2
Tomas Vanek [Mon, 1 Aug 2022 21:16:47 +0000 (23:16 +0200)]
jtag/drivers/kitprog: use HID read timeout

Use hid_read_timeout() instead of hid_read().
Improve error messages.

Change-Id: Ia75b4fcd610442ab926bc454341f928d59843fcf
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7106
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoflash: nor: use binary prefixes consistently 16/6416/3
Paul Fertser [Sat, 7 Aug 2021 18:55:30 +0000 (21:55 +0300)]
flash: nor: use binary prefixes consistently

When printing memory sizes standard ISO 80000-1 prefixes should be used.
Also a space should be added between any number and its unit according
to papers publication rules.

Change-Id: Id1d35e210766b55c201de4e80ac165d8d0414d0a
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6416
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/xtensa: fix clang analyzer warnings and gcc12 build errors 37/7137/2
Erhan Kurubas [Sat, 20 Aug 2022 20:22:47 +0000 (23:22 +0300)]
target/xtensa: fix clang analyzer warnings and gcc12 build errors

Fix Unused code Dead assignment at line 657
Fix Memory error Double free at line 2851
Fix Memory error Memory leak at line 2530
Fix error: 'a3' may be used uninitialized at line 758
Fix error: '%04x' directive writing between 4 and 8 bytes
into a region of size 5 at line 2471

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I0382a622bc7c4108a335fd741816577e79240397
Reviewed-on: https://review.openocd.org/c/openocd/+/7137
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoGeneric Xtensa target config files 83/7083/3
Ian Thompson [Mon, 11 Jul 2022 00:35:50 +0000 (17:35 -0700)]
Generic Xtensa target config files

- Add new Xtensa TCL board files
- Add new Xtensa KC705 on-board FTDI interface
- Add new generic Xtensa and VDebug Xtensa target files

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I4acb15c83d1b7b8e6063833ce829530cb22a795e
Reviewed-on: https://review.openocd.org/c/openocd/+/7083
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget: add generic Xtensa LX support 55/7055/18
Ian Thompson [Sat, 25 Jun 2022 05:27:32 +0000 (22:27 -0700)]
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>
19 months agotcl/interface: add linuxgpiod cfg for Aspeed AST2600 12/7112/4
Jae Hyun Yoo [Thu, 20 Jan 2022 20:07:58 +0000 (12:07 -0800)]
tcl/interface: add linuxgpiod cfg for Aspeed AST2600

Add linuxgpiod cfg for Aspeed AST2600 for a case if JTAG master needs
to be implemented using linuxgpiod intead of hardware JTAG master mode.

These AST2600 GPIOs will be mapped to JTAG/SWD signals.
+-----------+-------------+-------------+
| signal    | GPIO name   | gpio offset |
+-----------+-------------+-------------+
| TCK/SWCLK | GPIOI2      | 66          |
| TMS/SWDIO | GPIOI3      | 67          |
| TDI       | GPIOI1      | 65          |
| TDO       | GPIOI4      | 68          |
| nTRST     | GPIOI0      | 64          |
+-----------+-------------+-------------+

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Change-Id: I19278402b0895be12d38c0ecea8fdbc56fd491b8
Reviewed-on: https://review.openocd.org/c/openocd/+/7112
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
19 months agotcl/fpga: add Lattice MachXO3 family support 13/7113/5
Jae Hyun Yoo [Thu, 20 Jan 2022 20:31:18 +0000 (12:31 -0800)]
tcl/fpga: add Lattice MachXO3 family support

Add support for Lattice MachXO3 FPGA family.

Signed-off-by: Jae Hyun Yoo <quic_jaehyoo@quicinc.com>
Change-Id: I01fcec0ee458e809246e4505019d15047655dd47
Reviewed-on: https://review.openocd.org/c/openocd/+/7113
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agoserver/gdb_server: Add support for default thread, use by IDA debugger 17/7017/9
MadSquirrel [Sat, 4 Jun 2022 20:01:11 +0000 (22:01 +0200)]
server/gdb_server: Add support for default thread, use by IDA debugger

Signed-off-by: Benoit Forgette <benoit.forgette@ci-yow.com>
Change-Id: Ia3a29a3377be650f0ccad11a0ae4fe4da78b3ab4
Reviewed-on: https://review.openocd.org/c/openocd/+/7017
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
19 months agotarget/semihosting: drop type casting from semihosting->result 11/7111/3
Erhan Kurubas [Wed, 10 Aug 2022 23:32:25 +0000 (01:32 +0200)]
target/semihosting: drop type casting from semihosting->result

Also used type helper (PRId64) to specify format of int64_t

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I594863eab594aff621c26fefcc69a1872e9730ee
Reviewed-on: https://review.openocd.org/c/openocd/+/7111
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget/espressif: remove author lines from esp32xx and xtensa files 04/7104/4
Erhan Kurubas [Mon, 1 Aug 2022 23:15:12 +0000 (01:15 +0200)]
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>
20 months agodrivers/linuxgpiod: Migrate to adapter gpio commands 48/7048/9
Steve Marple [Tue, 21 Jun 2022 22:06:25 +0000 (23:06 +0100)]
drivers/linuxgpiod: Migrate to adapter gpio commands

Use the new "adapter gpio" commands to configure the GPIOs used by the
linuxgpiod driver.

Adds support for drive mode and resistor pull options on all signals.

Change-Id: Ic90cb4f06db82435294228b6793330107a9f3606
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7048
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agodrivers/am335xgpio: Release resources on error and when quitting 47/7047/8
Steve Marple [Wed, 22 Jun 2022 14:43:51 +0000 (15:43 +0100)]
drivers/am335xgpio: Release resources on error and when quitting

The /dev/mem file descriptor can be closed without invalidating the
mappings so close as soon as possible.

munmap() all memory, either on error or from quit.

Change-Id: I9466edd2f43791e64f2dce719957c67728f3ec06
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7047
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agodrivers/am335xgpio: Migrate to adapter gpio commands 84/6984/16
Steve Marple [Tue, 17 May 2022 20:51:17 +0000 (21:51 +0100)]
drivers/am335xgpio: Migrate to adapter gpio commands

Use the new "adapter gpio" commands to configure the GPIOs used by the
am335xgpio driver. The AM335x has 4 GPIO 'chips' (chip number 0-3
inclusive), with each one providing 32 GPIOs (gpio_num 0-31 inclusive).

Change-Id: I7c63c0e4763657ea51790c43fc40d32b7c3580bb
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6984
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agojtag/adapter: Add command 'adapter gpio' 67/6967/21
Steve Marple [Wed, 4 May 2022 21:51:48 +0000 (22:51 +0100)]
jtag/adapter: Add command 'adapter gpio'

Most adapters define their own commands to obtain the GPIO number and
other GPIO configuration information such as chip number, output drive
type, active high/low.

Define a general command 'adapter gpio' as replacement for the
driver-specific ones.

Change-Id: I1ca9ca94f0c7df5713172e9f62ffb0ad64e9ee97
Signed-off-by: Steve Marple <stevemarple@googlemail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6967
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget/cortex_m: supress historical reset detection 09/7109/4
Tomas Vanek [Tue, 2 Aug 2022 09:44:43 +0000 (11:44 +0200)]
target/cortex_m: supress historical reset detection

The S_RESET_ST sticky bit is reset after DHCSR read.
It is set at power-on reset and keeps active until the debuger reads DHCSR.

Ignore S_RESET_ST at the very first read after OpenOCD start
and suppress possibly misleading message "external reset detected"
if we cannot guarantee the reset happened recently.

While on it add a TODO comment.

Change-Id: I15217c2ca6f69ac97aff8be86bce67cba94a42cd
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7109
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agoloaders/reset/espressif: replace the GPL-2.0-or-later license tag 05/7105/4
Erhan Kurubas [Mon, 1 Aug 2022 23:38:09 +0000 (01:38 +0200)]
loaders/reset/espressif: replace the GPL-2.0-or-later license tag

Replace the FSF boilerplate with the SPDX tag.

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: Iddccae2bd8906a3587a2aa2684124356a340fc74
Reviewed-on: https://review.openocd.org/c/openocd/+/7105
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agogdb_server: custom target-specific GDB queries 82/7082/4
Ian Thompson [Mon, 11 Jul 2022 00:14:10 +0000 (17:14 -0700)]
gdb_server: custom target-specific GDB queries

Provide a customizable hook for handling target-specific GDB queries

Valgrind-clean, no new Clang analyzer warnings

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I684a259ed29f3651cbce668101cff421e522f79e
Reviewed-on: https://review.openocd.org/c/openocd/+/7082
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agogdb_server: support sparse register maps 03/7103/3
Ian Thompson [Mon, 1 Aug 2022 22:47:52 +0000 (15:47 -0700)]
gdb_server: support sparse register maps

Add additional error handling for targets where gaps may exist in reg_list[]

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: I65232429e2de08f5d54eeca53aea0db8ce2b58af
Reviewed-on: https://review.openocd.org/c/openocd/+/7103
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agoopenocd: prevent target polling during 'init' 07/7007/4
Antonio Borneo [Mon, 30 May 2022 13:32:24 +0000 (15:32 +0200)]
openocd: prevent target polling during 'init'

The command 'init' causes the execution of few lower level
commands, e.g. 'target init', and switches from command mode
COMMAND_CONFIG to COMMAND_EXEC, with an intermediate switch back
to mode COMMAND_CONFIG.

A timed target polling can occur during the execution of 'init'
and the target's status can trigger the execution of some events.
E.g. if a target has been left halted by a previous execution of
OpenOCD, the first poll will find the target halted, calling the
corresponding 'halted' event.
The event handler can use commands that can only be executed in
mode COMMAND_EXEC. If the poll happens while OpenOCD is in mode
COMMAND_CONFIG, the triggered handler will fail.

Prevent the target polling to operate during the execution of the
'init' command.

Change-Id: Ia435a5d2039be9b247e2336616dab53ed5d983ac
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7007
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
20 months agotarget: add API to temporarily mask target polling 09/7009/3
Antonio Borneo [Mon, 30 May 2022 20:49:12 +0000 (22:49 +0200)]
target: add API to temporarily mask target polling

The same flag 'jtag_poll' is currently used as local data for the
command 'poll' and to temporarily mask the target polling.
This can cause unexpected behavior if the command 'poll' is
executed while polling is temporarily masked.

Add a new flag 'jtag_poll_en' to hold the temporarily mask
condition and keep 'jtag_poll' for the 'poll' command only.

While there, change the initial assignment of 'jtag_poll' using
the proper boolean value.

Change-Id: I18dcf7c65b07aefadf046caaa2fcd2d74fa6fbae
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7009
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
20 months agogdb_server: add "not supported" Z-packet reply 02/7102/5
Ian Thompson [Mon, 1 Aug 2022 22:22:32 +0000 (15:22 -0700)]
gdb_server: add "not supported" Z-packet reply

GDB remote serial protocol specifies breakpoint/watchpoint packet
responses can be an empty string to indicate the specified breakpoint
type is not supported.  Add support for this response alongside existing
"OK", "E NN" replies.

Signed-off-by: Ian Thompson <ianst@cadence.com>
Change-Id: Iaf6280e4c936eb95a92bc80cc74d451ebb328dc3
Reviewed-on: https://review.openocd.org/c/openocd/+/7102
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agoadapter: run at default speed when clock speed not specified 04/7004/6
Erhan Kurubas [Thu, 26 May 2022 20:43:41 +0000 (22:43 +0200)]
adapter: run at default speed when clock speed not specified

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I8d2db4a1f618790907265a45d28a212551800b6c
Reviewed-on: https://review.openocd.org/c/openocd/+/7004
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
20 months agortos: Support for "none" rtos 92/7092/3
Asier Llano [Thu, 21 Jul 2022 10:27:11 +0000 (12:27 +0200)]
rtos: Support for "none" rtos

After a certain RTOS has been configured there is no mechanism
to go back to no RTOS support. It may be useful for debugging
purposes. With the provided modification, the "none" option
of RTOS is provided as a valid option.

It has been tested in two different board (Cortex M4 and Cortex M33).
Documentation has also been updated.

Signed-off-by: Asier Llano <allano@hubbell.com>
Change-Id: I602210bff31ccadd41c41e9454c52b5fffa1671e
Reviewed-on: https://review.openocd.org/c/openocd/+/7092
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget/riscv: Update debug_defines.h. 87/7087/4
Tim Newsome [Mon, 18 Jul 2022 16:20:22 +0000 (09:20 -0700)]
target/riscv: Update debug_defines.h.

This one doesn't have the license in there, which means now it's
acceptable to GPLv2 again.

See https://github.com/riscv/riscv-openocd/pull/711

Change-Id: I8ba27801172ffa955470d2627fa656cad282ee99
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7087
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget/arm: do not expose 'arm reg', 'arm mcr/mrc' commands on Cortex-M 01/7101/2
Tomas Vanek [Mon, 1 Aug 2022 17:28:18 +0000 (19:28 +0200)]
target/arm: do not expose 'arm reg', 'arm mcr/mrc' commands on Cortex-M

Tcl commands 'arm reg', 'arm mcr/mrc' do not work on M-profile based devices.
Isolate them from 'arm core_state' and 'arm disassemble' and do not chain
them from armv7m_command_handlers.

Change-Id: I2c6befdf82575e95cf05ed158ab5e6faa1a182c3
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7101
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
20 months agotarget/arm: make 'arm core_state' command compatible with Cortex-M 00/7100/3
Tomas Vanek [Mon, 1 Aug 2022 17:06:35 +0000 (19:06 +0200)]
target/arm: make 'arm core_state' command compatible with Cortex-M

Tcl command 'arm core_state' was exposed even on Cortex-M devices.
However it returned message "Unsupported Command" without error status
on such device.

Set the only possible arm->core_state ARM_STATE_THUMB in armv7m init.
Block setting core_state to arm on Cortex-M.

Change-Id: I9525553ac8863a6cf77bbacbcd57e354b6cfe1ca
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7100
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
20 months agotarget/cortex_m: prevent segmentation fault in cortex_m_poll() 08/7108/3
Tomas Vanek [Tue, 2 Aug 2022 09:33:07 +0000 (11:33 +0200)]
target/cortex_m: prevent segmentation fault in cortex_m_poll()

If a Cortex-M MCU become unresponsive during a debug session and
re-examination fails to find MEM-AP, debug_ap pointer is set to NULL.

Eventual call of cortex_m_poll() dereferences debug_ap.

Check debug_ap validity at the begin of cortex_m_poll().

Change-Id: I9519f48760c91a48a9e5e8c34634d247098cb14a
Fixes: 35a503b08d14 (arm_adi_v5: add ap refcount and add get/put around ap use)
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7108
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget: move parent target structs just after common_magic 03/7003/2
Tomas Vanek [Thu, 26 May 2022 14:25:34 +0000 (16:25 +0200)]
target: move parent target structs just after common_magic

Just a cosmetic refactoring.

Change-Id: I7fbc05324e346fafc98d1b42691d33d3d8fbd04e
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7003
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
20 months agotarget/aarch64: fix duplicate common magic 97/6997/2
Tomas Vanek [Thu, 26 May 2022 08:18:43 +0000 (10:18 +0200)]
target/aarch64: fix duplicate common magic

AARCH64_COMMON_MAGIC was same as CORTEX_A_COMMON_MAGIC, probably copy pasta.
Define unique AARCH64_COMMON_MAGIC

Change-Id: Ie30e0028453a1fce5624ecad9bf73d5ac3791281
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6997
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget: consolidate existing target/algo common_magic 96/6996/3
Tomas Vanek [Thu, 26 May 2022 08:01:45 +0000 (10:01 +0200)]
target: consolidate existing target/algo common_magic

Unify common_magic type to unsigned int
Move common_magic to be the first member of the struct
Add unsigned specifier to xxx_COMMON_MAGIC #defines

Change-Id: If961d33232698529514ba3720e04418baf6dc6fe
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6996
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agoflash/nor: remove useless setting of bus_width and chip_width 98/7098/3
Tomas Vanek [Sun, 31 Jul 2022 06:01:23 +0000 (08:01 +0200)]
flash/nor: remove useless setting of bus_width and chip_width

The flash/nor subsystem uses bus_width and chip_width for CFI
external flash only. Drop setting these values for internal flash.

Change-Id: I64e79ab38b6e39e845ff96fbf4f60145e3b9690a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7098
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget: fix unaligned return of target_get_working_area_avail() 96/7096/2
Tomas Vanek [Sat, 30 Jul 2022 10:15:43 +0000 (12:15 +0200)]
target: fix unaligned return of target_get_working_area_avail()

The working area allocation routines use 4 byte word alignment.
In the corner case the size of the working area is not aligned,
target_alloc_working_area() of size = target_get_working_area_avail()
will fail because the size gets aligned up and does not fit to the area
which size is aligned down.

Align down the result of target_get_working_area_avail() to cope with that
corner case.

While on it use fancy ALIGN_... macros instead of bitwise and operator.

Change-Id: Ia2a1e861c401c2c78fe6323379a3776fb4f47b06
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7096
Tested-by: jenkins
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agofix Kinetis 100 MHz rev 1.x programming 15/7015/3
Martin Hierholzer [Fri, 27 May 2022 13:22:25 +0000 (15:22 +0200)]
fix Kinetis 100 MHz rev 1.x programming

Kinetis 100 MHz rev 1.x devices have no SMC and hence need different
checking of the run mode. Details about the differences between rev 1.x
and 2.x of the Kinetis 100 MHz series can be found here:
https://www.nxp.com.cn/docs/en/application-note/AN4445.pdf

Signed-off-by: Martin Hierholzer <martin.hierholzer@desy.de>
Change-Id: Ib705385a931275159bdae9b31caecc6ec9c0da1e
Reviewed-on: https://review.openocd.org/c/openocd/+/7015
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
20 months agoFreeRTOS: Always show current execution before scheduler is started 35/6935/2
Frank Dischner [Mon, 18 Apr 2022 02:24:28 +0000 (21:24 -0500)]
FreeRTOS: Always show current execution before scheduler is started

Previously, if the target was halted before the FreeRTOS scheduler was
started but after at least one thread was created, then the current thread
would be set to whichever thread had the highest priority. In addition to
being misleading, because that thread is not actually running, it can
cause issues with gdb. For instance, breaking somewhere before the first
thread is created will show the current execution as the current thread,
but stepping over a line that creates a thread will cause the current
thread to switch to the newly created thread and the current execution to
disappear. The sudden disappearance of the current execution thread seems
to confuse some versions of gdb.

With this change, the value of xSchedulerRunning is checked to determine
whether the scheduler has been started. If it hasn't, then a fake
'current execution' thread is always created and made the current thread.

Signed-off-by: Frank Dischner <frank.dischner@gmail.com>
Change-Id: Ide0fe7d9ffb9fac95cee4c805735f434c7c4934d
Reviewed-on: https://review.openocd.org/c/openocd/+/6935
Tested-by: jenkins
Reviewed-by: Asier Llano <asierllano@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
20 months agoFreeRTOS: Fix current thread ID when no threads are active 34/6934/2
Frank Dischner [Mon, 18 Apr 2022 02:12:39 +0000 (21:12 -0500)]
FreeRTOS: Fix current thread ID when no threads are active

When there are no rtos threads or none are active, a fake thread with
ID 1 is created for the current execution, but the current thread ID was
never set to this new fake ID. This would lead to an incorrect attempt to
read stacked registers for this fake thread. Explicitly setting the
current thread ID to the fake ID ensures that the registers are read from
the core instead of calling freertos_get_thread_reg_list.

Signed-off-by: Frank Dischner <frank.dischner@gmail.com>
Change-Id: I694509a0e01df089429b20ff1b879fc0592b532d
Reviewed-on: https://review.openocd.org/c/openocd/+/6934
Tested-by: jenkins
Reviewed-by: Asier Llano <asierllano@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
20 months agotarget/cortex_a: remove unused CORTEX_A15_COMMON_MAGIC 99/7099/3
Tomas Vanek [Mon, 1 Aug 2022 09:05:47 +0000 (11:05 +0200)]
target/cortex_a: remove unused CORTEX_A15_COMMON_MAGIC

Change-Id: I7dddc6cb7b0ee8aec7164998f1124b522e899f3d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reported-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7099
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agoflash/nor/fespi: check target type 01/7001/2
Tomas Vanek [Thu, 26 May 2022 11:51:18 +0000 (13:51 +0200)]
flash/nor/fespi: check target type

Change-Id: I09d3ed20966b37ec63c09c2ffb0e0403986cb1e5
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7001
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
20 months agotarget/riscv: add common magic 99/6999/2
Tomas Vanek [Thu, 26 May 2022 09:33:27 +0000 (11:33 +0200)]
target/riscv: add common magic

Add common_magic member to struct riscv_info.
Introduce is_riscv() helper.

Change-Id: I1af05988ad869342ba5dc6d4d0ba0ec6a8bf7bc7
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6999
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
20 months agotarget/riscv: use struct riscv_info instead of typedef riscv_info_t 98/6998/2
Tomas Vanek [Thu, 26 May 2022 11:08:48 +0000 (13:08 +0200)]
target/riscv: use struct riscv_info instead of typedef riscv_info_t

Make the main RISC-V structure more compliant with OpenOCD coding style.
Other typedefs remains as is.

Change-Id: I5657ad28fea8108fd66ab27b2dfe1c868dc5805b
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6998
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
20 months agoarm_adi_v5: Adding Nuvoton NPCX quirk 30/6630/8
Ben Bender [Tue, 5 Oct 2021 07:58:57 +0000 (10:58 +0300)]
arm_adi_v5: Adding Nuvoton NPCX quirk

We found that the NPCX has an issue with the byte lanes so that non byte
aligned writes aren't working. To overcome this, for byte accesses we
copy the byte to be written to all of the byte lanes.

doc: Document command nu_npcx_quirks

Signed-off-by: benjbender <benjbender@gmail.com>
[Andreas Fritiofson: Squashed commits]
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Change-Id: I9ef63bf692f4e68f57459e1ec33f3abcbf533cd2
Reviewed-on: https://review.openocd.org/c/openocd/+/6630
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agodrivers/vdebug: add support for DAP level interface 65/6965/6
Jacek Wuwer [Wed, 4 May 2022 08:15:57 +0000 (10:15 +0200)]
drivers/vdebug: add support for DAP level interface

This patch adds support for DAP interface to Cadence vdebug driver.
It implements a new transport layer for dapdirect_swd.

Change-Id: I64b02a9e1ce91e552e07fca692879655496f88b6
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6965
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotarget/semihosting: export semihosting_common_handlers[] from header file 75/7075/2
Erhan Kurubas [Sun, 3 Jul 2022 08:38:17 +0000 (11:38 +0300)]
target/semihosting: export semihosting_common_handlers[] from header file

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I4add0c1dc7888497ee90fd02754607a16434b66f
Reviewed-on: https://review.openocd.org/c/openocd/+/7075
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agotcl: ngultra: add target config file 46/7046/3
Adrien Grassein [Wed, 22 Jun 2022 09:23:31 +0000 (11:23 +0200)]
tcl: ngultra: add target config file

ngultra is a Quad-R52 SoC + an FPGA.

Signed-off-by: Adrien Grassein <agrassein@nanoxplore.com>
Change-Id: I6a04eab3d9a7610e9dfa3d9f647868e579b6bd8a
Reviewed-on: https://review.openocd.org/c/openocd/+/7046
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
20 months agohelper/jim-nvp: avoid camelcase error by deprecated API 52/7052/2
Antonio Borneo [Mon, 26 Apr 2021 06:57:28 +0000 (08:57 +0200)]
helper/jim-nvp: avoid camelcase error by deprecated API

Commit b8e18d292eb6 ("helper/jim-nvp: comply with coding style
[1/2]") tags as deprecated the old CamelCase API of jim-nvp, so
that old patches already in gerrit or in user's local git can
still build while dumping a deprecated message.

So far, we have not found any such case, so the deprecated API can
be safely dropped in preparation of v0.12.0-rc1.

Drop the compile flag "-Wno-error=deprecated-declarations" and the
deprecated API.

Change-Id: I52ce47eda69a51c2dd29aac15f16e285492d89b4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7052
Tested-by: jenkins
20 months agoopenocd: src: replace SPDX to remaining files 73/7073/2
Antonio Borneo [Mon, 27 Jun 2022 14:10:57 +0000 (16:10 +0200)]
openocd: src: replace SPDX to remaining files

With most of the files already processed through scripts, replace
manually the license to the few remaining files.

Change-Id: I3c7131e66b89ddad482f1074b5be5a9a69fdf6fd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7073
Tested-by: jenkins
20 months agoopenocd: src: replace the GPL-2.0-or-later license tag 72/7072/2
Antonio Borneo [Sun, 26 Jun 2022 23:26:22 +0000 (01:26 +0200)]
openocd: src: 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: I30cd66ac7d737f1973c68fdbb841ffcf00e917c4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7072
Tested-by: jenkins
20 months agoopenocd: src/target: replace the GPL-2.0-or-later license tag 71/7071/2
Antonio Borneo [Sun, 26 Jun 2022 23:24:07 +0000 (01:24 +0200)]
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
20 months agoopenocd: src/rtos: replace the GPL-2.0-or-later license tag 70/7070/2
Antonio Borneo [Sun, 26 Jun 2022 23:10:12 +0000 (01:10 +0200)]
openocd: src/rtos: 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: If0194089baded7f58dc5d87a35d6e0aff9f43785
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7070
Tested-by: jenkins
20 months agoopenocd: src/jtag: replace the GPL-2.0-or-later license tag 69/7069/2
Antonio Borneo [Sun, 26 Jun 2022 23:06:45 +0000 (01:06 +0200)]
openocd: src/jtag: 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: Ie873d12bb0fb838d0d6252e6b9ca3c2118853e9a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7069
Tested-by: jenkins
20 months agoopenocd: src/helper: replace the GPL-2.0-or-later license tag 68/7068/3
Antonio Borneo [Sun, 26 Jun 2022 22:58:56 +0000 (00:58 +0200)]
openocd: src/helper: 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: I7851617e2682f97ccc3927e3941aadef2df63b54
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7068
Tested-by: jenkins
20 months agoopenocd: src/flash: replace the GPL-2.0-or-later license tag 67/7067/2
Antonio Borneo [Sun, 26 Jun 2022 22:53:35 +0000 (00:53 +0200)]
openocd: src/flash: 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: Ic7db91fe37d1139d42c99e303b3243b6c8fe3ea2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7067
Tested-by: jenkins
20 months agoopenocd: src: fix incorrect SPDX tags 66/7066/2
Antonio Borneo [Sun, 26 Jun 2022 21:10:08 +0000 (23:10 +0200)]
openocd: src: fix incorrect SPDX tags

The SPDX tag is aimed at machine handling and it's thus expected
to be placed in the first line in specific format.

Move the SPDX tag to the first line and fix it where needed.

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: Ie9a05f530009d482a4116eebd147fd7e1ee3d41e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7066
Tested-by: jenkins
20 months agoopenocd: src: fix incorrect GPL license tag 65/7065/2
Antonio Borneo [Sun, 26 Jun 2022 09:44:00 +0000 (11:44 +0200)]
openocd: src: fix incorrect GPL license tag

Use the standard SPDX tag, where it was incorrectly applied.

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: Iaec63abc6e0a38e5b0ae0ea7f5ecee7ca007bbbd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7065
Tested-by: jenkins
20 months agoopenocd: src: replace the GPL-2.0-only license tag 64/7064/2
Antonio Borneo [Sun, 26 Jun 2022 09:38:41 +0000 (11:38 +0200)]
openocd: src: replace the GPL-2.0-only license tag

Replace the FSF boilerplate with the SPDX tag.

Change-Id: I29f51caa5ae9854d05ce7e150d168a7002607cd1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7064
Tested-by: jenkins
20 months agoopenocd: src: replace the incomplete GPL-2.0-or-later license tag 63/7063/2
Antonio Borneo [Mon, 27 Jun 2022 08:04:43 +0000 (10:04 +0200)]
openocd: src: replace the incomplete GPL-2.0-or-later license tag

Few files have the FSF boilerplate without the latest statement on
where to get the GPL license.

Manually replace the FSF boilerplate with the SPDX tag.
While there, reorganize the copyright statement.

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: I0c908d01c010e24f9c7e94885e7fbed4ecf26a86
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7063
Tested-by: jenkins
20 months agoopenocd: src: replace the GPL and BSD-Source-Code license tags 62/7062/2
Antonio Borneo [Mon, 27 Jun 2022 13:01:17 +0000 (15:01 +0200)]
openocd: src: replace the GPL and BSD-Source-Code license tags

Add the new license text in the license pool.
Replace the GPL and BSD boilerplates with the SPDX tag.
Add the copyright owner of Atmel, as it was explicitly listed in
the BSD boilerplate text.

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: Ibb117dbf8402269be3e5ba4f4c472162494d813f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7062
Tested-by: jenkins
20 months agoopenocd: src: replace the GPL with eCos exception 2.0 license tag 61/7061/2
Antonio Borneo [Mon, 27 Jun 2022 13:44:05 +0000 (15:44 +0200)]
openocd: src: replace the GPL with eCos exception 2.0 license tag

Add the license exception text in the license pool.
Add the exception chapter in license-rules.txt
Replace the 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: Ied513b7c9c0722ed2a9c11dbdff3fbf59f1b41ce
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7061
Tested-by: jenkins
20 months agoopenocd: src: replace the BSD-2-Clause-Views license tag 60/7060/2
Antonio Borneo [Mon, 27 Jun 2022 08:31:09 +0000 (10:31 +0200)]
openocd: src: replace the BSD-2-Clause-Views license tag

Add the license text in the license pool.
Replace the BSD boilerplate with the SPDX tag.
Add the copyright owner of Jim Project, as it was explicitly
listed in the boilerplate text.

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: I6dd004b1945773c10539016ce733d1fbfe776a9d
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7060
Tested-by: jenkins
20 months agoopenocd: src: replace the BSD-3-Clause license tag 59/7059/2
Antonio Borneo [Mon, 27 Jun 2022 08:32:34 +0000 (10:32 +0200)]
openocd: src: replace the BSD-3-Clause license tag

Replace the BSD 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: I5a8cab2051eee7eb99adf67f9631b0827c1359de
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7059
Tested-by: jenkins
20 months agoopenocd: src: add GPL license tag on files that miss it 58/7058/2
Antonio Borneo [Sun, 26 Jun 2022 09:07:45 +0000 (11:07 +0200)]
openocd: src: add GPL license tag on files that miss it

Some file miss completely the license tag.

Add the SPDX tag, using the same GPL-2.0-or-later license of the
OpenOCD project.

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: I1fb51e722232d14f050458a820c3041de3dc9138
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7058
Tested-by: jenkins
20 months agoopenocd: src: remove duplicated GPL license tag 57/7057/2
Antonio Borneo [Sun, 26 Jun 2022 08:54:00 +0000 (10:54 +0200)]
openocd: src: remove duplicated GPL license tag

SPDX tag is replacing the FSF boilerplate.
For files that have both, remove the FSF boilerplate and keep only
the SPDX tag.

Change-Id: I04c4764d13d4ca92453f30ed16aeae53cd4c3fc8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7057
Tested-by: jenkins

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)