openocd.git
3 months agodoc: usb_adapters: update the script for unavailable reports 46/8046/4
Antonio Borneo [Sun, 10 Dec 2023 20:35:10 +0000 (21:35 +0100)]
doc: usb_adapters: update the script for unavailable reports

When Linux HID driver binds the USB endpoints of the adapter,
'lsusb' fails to read all the reports and prints
** UNAVAILABLE **

Detect this case and alert the user, providing also the proper
command to unbind the driver before running the script again.
Put this test at the end of the output, so user can easily see it.

Change-Id: Iaca00040e666b62ceebe4b842a24932799bde56a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8046
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 months agodoc/openocd: Mention APM32F1 and APM32F4 series 18/8018/5
Marc Schink [Tue, 14 Nov 2023 09:55:46 +0000 (10:55 +0100)]
doc/openocd: Mention APM32F1 and APM32F4 series

Change-Id: I2ff28b0fdf4923a58771a44ad6e83ac871d6fa9e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8018
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agotcl/target: Add Geehy APM32F1x config 17/8017/5
Marc Schink [Wed, 8 Nov 2023 09:27:36 +0000 (10:27 +0100)]
tcl/target: Add Geehy APM32F1x config

Tested with APM32F103CBT6 using JTAG and SWD transport. All flash
operations, including sector and device protection, work as expected.

Change-Id: Ibefe1a65d710aea87b86ab7ff8a4153512a0ea4f
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8017
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
3 months agotcl/target: Add Geehy APM32F4x config 16/8016/4
Marc Schink [Sun, 14 May 2023 13:03:07 +0000 (15:03 +0200)]
tcl/target: Add Geehy APM32F4x config

Tested with APM32407RGT6 using JTAG and SWD transport. All flash
operations, including sector and device protection, work as expected.

Revision identifier (0x0009) is not updated due to missing documentation.

Change-Id: I33f4630fd00096656369ecc923aea2dcad77c7d3
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8016
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agotcl/target: Add Geehy APM32F0x config 15/8015/4
Marc Schink [Sat, 13 May 2023 10:37:12 +0000 (12:37 +0200)]
tcl/target: Add Geehy APM32F0x config

Tested with APM32F030C8T using SWD transport. All flash operations,
including sector and device protection, work as expected.

Revision identifier (0x0011) is not updated due to missing documentation.

Introduce a new directory structure that contains the manufacturer for
the sake of clarity.

Change-Id: I679387943b09fef640f8f8b6904e542f4e4b29aa
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8015
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agoflash/nor/stm32f1x: Add support for Geehy APM32F0 series 14/8014/5
Marc Schink [Sat, 13 May 2023 10:24:04 +0000 (12:24 +0200)]
flash/nor/stm32f1x: Add support for Geehy APM32F0 series

Tested with APM32F030C8T.

Change-Id: I63cd8b66424135dae481a96ba560e6f0b1f9544e
Suggested-by: Christian U <info@cu-tec.de>
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8014
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agotarget/cortex_m: Add Cortex-M85 part 48/8048/2
Marc Schink [Mon, 11 Dec 2023 15:28:17 +0000 (16:28 +0100)]
target/cortex_m: Add Cortex-M85 part

Change-Id: I91d4c05307d9611ecab11eb52218ab1cb7ed65e3
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8048
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
3 months agobitbang: Add flush before sleep 84/4284/6
Aleksey Shargalin [Tue, 31 Oct 2017 14:23:40 +0000 (17:23 +0300)]
bitbang: Add flush before sleep

Some bitbang interfaces have no speed regulation and work as fast as
they can. Only the sequence of execuded commands is guaranteed but
not the timing. It works most of time with one exception: when the
JTAG_SLEEP command is executed, we expect that all previous commands
already finished so that the sleep interval is guaranteed.
For now  there may be situations when the sleep time has passed but
previous commands are not actually executed.
This patch adds a flush command to the bitbang interface, connects it
to the existing implementation for remote_bitbang, and runs it when
the JTAG_SLEEP command is executed.

Change-Id: If40894a63d29a260a4ded134b008df6dd1e89c46
Signed-off-by: Aleksey Shargalin <myokaski@gmail.com>
Signed-off-by: David Ryskalczyk <david.rysk@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/4284
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agotcl/target: add Marvell Octeon TX2 CN9130 target 42/8042/11
Henrik Nordström [Sun, 17 Dec 2023 16:39:50 +0000 (17:39 +0100)]
tcl/target: add Marvell Octeon TX2 CN9130 target

This has a quite complex JTAG router chain requiring both a custom
BYPASS instruction to access child taps, and JTAG configuration to
enable individual DAP nodes.

Change-Id: I6f5345764e1566d70c8526a7e8ec5d250185bd2c
Signed-off-by: Henrik Nordström <henrik.nordstrom@addiva.se>
Reviewed-on: https://review.openocd.org/c/openocd/+/8042
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agojtag: add -ir-bypass option to newtap 41/8041/7
Henrik Nordström [Sun, 17 Dec 2023 22:14:37 +0000 (23:14 +0100)]
jtag: add -ir-bypass option to newtap

Some devices with an internal multi-tap JTAG router require a vendor
specific bypass instruction to bypass the master TAP when addressing
slave taps internal to the same device. On these devices the standard
bypass instruction bypasses the whole device.

Change-Id: I4506f0e67c9e4dfe39b7fa18c63d67900313e594
Signed-off-by: Henrik Nordström <henrik.nordstrom@addiva.se>
Reviewed-on: https://review.openocd.org/c/openocd/+/8041
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agotarget/armv8: Add more support for decoding memory attributes 43/8043/3
Peter Collingbourne [Fri, 8 Dec 2023 21:57:44 +0000 (13:57 -0800)]
target/armv8: Add more support for decoding memory attributes

Change-Id: I7ac7b06d67ec806a9ebffc26a7c6b9c24f024478
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8043
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agotarget/adi_v5_swd: optimize sequences in swd_connect_multidrop() 18/7218/9
Tomas Vanek [Wed, 15 Mar 2023 13:12:47 +0000 (14:12 +0100)]
target/adi_v5_swd: optimize sequences in swd_connect_multidrop()

swd_connect_multidrop() sent DORMANT_TO_SWD and called
swd_multidrop_select_inner(). DORMANT_TO_SWD sequence ends
with a LINE_RESET sequence.
swd_multidrop_select_inner() sent LINE_RESET sequence again.
It was useless in this case.

swd_connect_multidrop() emited JTAG_TO_DORMANT and DORMANT_TO_SWD
sequences before connecting each DAP in SWD multidrop bus.
It is sufficient to emit JTAG_TO_DORMANT and DORMANT_TO_SWD
just once and emit the shorter LINE_RESET instead for subsequent DAPs.

Introduce a global variable swd_multidrop_in_swd_state
and use it to control what sequence is emitted.

In case of reconnect after an error, always use the full switch
JTAG_TO_DORMANT and DORMANT_TO_SWD.

Change-Id: Iba21620f6a9680793208bf398960ed0eb59df3b1
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7218
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agotarget/arm_adi_v5,arm_dap: introduce pre_connect_init() dap operation 42/7542/6
Tomas Vanek [Wed, 15 Mar 2023 12:58:52 +0000 (13:58 +0100)]
target/arm_adi_v5,arm_dap: introduce pre_connect_init() dap operation

SWD multidrop requires some initialization once before connecting
all daps. Provide an optional pre-connect dap operation.

Change-Id: I778215c512c56423a425dda80ab19a739f22f285
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7542
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agotarget/arm_adi_v5: fix DP SELECT logic 41/7541/7
Tomas Vanek [Tue, 14 Mar 2023 17:40:25 +0000 (18:40 +0100)]
target/arm_adi_v5: fix DP SELECT logic

The original code supported ADIv5 only, just one SELECT register
with some reserved bits - the pseudo value DP_SELECT_INVALID was
just fine to indicate the DP SELECT register is in an unknown state.

Added ADIv6 support required DP SELECT and SELECT1 registers
without reserved bits. Therefore DP_SELECT_INVALID value became
reachable as a (fortunately not really used) ADIv6 AP ADDR.

JTAG DPBANKSEL setting support introduced with ADIv6 does not
honor DP_SELECT_INVALID correctly: required select value
gets compared to DP_SELECT_INVALID value and the most common zero
bank does not trigger DP SELECT write.

DP banked registers need just to set DP SELECT. ADIv6 AP register
addressing scheme may use both DP SELECT and SELECT1. This further
complicates using a single invalid value.

Moreover the difference how the SWD line reset influences
DPBANKSEL field between ADIv5 and ADIv6 deserves better handling
than setting select cache to zero and then to DP_SELECT_INVALID
in a very specific code positions.

Introduce bool flags indicating the validity of each SELECT
register and one SWD specific for DPBANKSEL field.
Use the latter to prevent selecting DP BANK before taking
the connection out of reset by reading DPIDR.

Treat DP SELECT and SELECT1 individually in ADIv6 64-bit mode.

Update comments to reflect the difference between ADIv5 and ADIv6
in SWD line reset.

Change-Id: Ibbb0b06cb592be072571218b666566a13d8dff0e
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7541
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
3 months agohelper/bin2char: drop trailing empty line 51/8051/2
Antonio Borneo [Thu, 14 Dec 2023 21:05:52 +0000 (22:05 +0100)]
helper/bin2char: drop trailing empty line

For unknown reasons, the coreutils tool 'od' on MacOS outputs an
extra empty line, which appears in the new auto-generated files.

Modify the script bin2char.sh to drop every empty line.

Change-Id: Id835fecadb58ad4ddfc11ef9f9a2e8d75c5dffe9
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8051
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Tested-by: jenkins
Reviewed-by: Henrik Nordström <henrik.nordstrom@addiva.se>
3 months agodoc: usb_adapters: fix HID report in lsusb dump of few adapters 47/8047/3
Antonio Borneo [Sun, 10 Dec 2023 21:26:44 +0000 (22:26 +0100)]
doc: usb_adapters: fix HID report in lsusb dump of few adapters

Real dumps from adapters I have access to.
Serial numbers have been manually edited but are still consistent.

While there, rename a file to correct the USB PID.

Change-Id: I4fd0b6661d55294c2ce0ecbead765def1143880c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Fixes: e0059dfffae4 ("doc: usb_adapters: add lsusb dump of few adapters")
Reviewed-on: https://review.openocd.org/c/openocd/+/8047
Tested-by: jenkins
3 months agotcl/board: Add TI j722sevm config 50/8050/4
Nishanth Menon [Wed, 29 Nov 2023 12:37:14 +0000 (06:37 -0600)]
tcl/board: Add TI j722sevm config

Add basic connection details with j722s EVM

For further details, see: https://www.ti.com/lit/zip/sprr495

Change-Id: Ic69d85d69c773c7fad2184561267391fef7a98bc
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8050
Reviewed-by: Bryan Brattlof <hello@bryanbrattlof.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agotcl/target/ti_k3: Add J722S SoC 49/8049/3
Nishanth Menon [Wed, 29 Nov 2023 12:32:53 +0000 (06:32 -0600)]
tcl/target/ti_k3: Add J722S SoC

Add support for the TI K3 family J722S SoC. This SoC is a variant of
AM62P chassis with a different JTAG ID, additional R5 added in (along
with C7x and few other peripheral changes). Reuse existing definition.

For further details, see https://www.ti.com/lit/zip/sprujb3

Change-Id: I754e6be8df3a26212437ea955f6a791d7c99b0c8
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8049
Reviewed-by: Bryan Brattlof <hello@bryanbrattlof.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
3 months agobreak from long loops on shutdown request 32/8032/10
Evgeniy Naydanov [Wed, 22 Nov 2023 15:10:27 +0000 (18:10 +0300)]
break from long loops on shutdown request

In loops that typically take longer time to complete, check if there is
a pending shutdown request. If so, terminate the loop.

This allows to respond to a signal requesting a shutdown during some
loops which do not return control to main OpenOCD loop.

Change-Id: Iace0b58eddde1237832d0f9333a7c7b930565674
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8032
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoremote_bitbang: add use_remote_sleep option to send delays to remote 72/7472/9
Jeremy Herbert [Tue, 7 Feb 2023 02:02:31 +0000 (12:02 +1000)]
remote_bitbang: add use_remote_sleep option to send delays to remote

If the remote_bitbang host does not execute requests immediately,
delays performed inside OpenOCD can be lost. This option allows
the delays to be sent to the remote host so that they can be
queued and executed in order.

Signed-off-by: Jeremy Herbert <jeremy.006@gmail.com>
Signed-off-by: David Ryskalczyk <david.rysk@gmail.com>
Change-Id: Ie1b09e09ea132dd528139618e4305154819cbc9e
Reviewed-on: https://review.openocd.org/c/openocd/+/7472
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agodoc/usb_adapters: add dumps of two versions of Atmel EDBG 38/8038/4
Tomas Vanek [Wed, 6 Dec 2023 14:05:03 +0000 (15:05 +0100)]
doc/usb_adapters: add dumps of two versions of Atmel EDBG

USB HS based CMSIS-DAP v1 (HID) adapters found
on Atmel/Microchip Xplained Pro development boards.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I62a4b656dc6dce27da386e906d87088befc2bcbf
Reviewed-on: https://review.openocd.org/c/openocd/+/8038
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agojtag/core: Use 'bool' data type for 'bypass' 40/8040/2
Marc Schink [Wed, 6 Dec 2023 17:11:11 +0000 (18:11 +0100)]
jtag/core: Use 'bool' data type for 'bypass'

Change-Id: I918fd5ce674e808ad6a96634a11046d2b3f6a05c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8040
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agojtag: Rename 'hasidcode' to 'has_idcode' 39/8039/2
Marc Schink [Wed, 6 Dec 2023 17:08:50 +0000 (18:08 +0100)]
jtag: Rename 'hasidcode' to 'has_idcode'

While at it, fix some coding style issues.

Change-Id: I8196045f46ce043ed0d28cb95470132b3a7de1bb
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8039
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agohelper: nvp: minor fixes 37/8037/2
Antonio Borneo [Sun, 3 Dec 2023 23:29:56 +0000 (00:29 +0100)]
helper: nvp: minor fixes

Fix incorrect reference for original file.
Fix copy-paste example.

Change-Id: I1ea7909ca241611122f93ca11a4c94c97674b430
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8037
Tested-by: jenkins
Reviewed-by: Henrik Nordström <henrik.nordstrom@addiva.se>
4 months agotarget: use bool for backup_working_area 36/8036/2
Antonio Borneo [Sun, 3 Dec 2023 10:34:03 +0000 (11:34 +0100)]
target: use bool for backup_working_area

The field backup_working_area is always used as a boolean value.

Use bool type for backup_working_area.

Change-Id: I55c68d717dbbe9e5caf60fd1db368527c6d1b995
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8036
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
4 months agocmsis_dap_usb_hid: improve detection of probes with unusual report sizes 33/8033/4
Samuel Dewan [Fri, 1 Dec 2023 19:16:22 +0000 (14:16 -0500)]
cmsis_dap_usb_hid: improve detection of probes with unusual report sizes

Currently all Atmel CMSIS-DAP interfaces are assumed to have 512 byte
reports except for the mEDBG (found on Xplained Mini boards) and the nEDBG
(found on Curiosity Nano boards). This check is far from exaustive and it
results in some Microchip programmers (like the MPLAB Snap and PICkit 4)
not working correctly with OpenOCD.

Instead of assuming that Atmel programmers have 512 byte reports unless we
know otherwise, this commit flips the logic around. Only the older "third
generation" EDBG based programmers have 512 byte report sizes, and that 64
bytes will be more common in Microchip tools going forward.

The list of PIDs for 3rd generation Microchip programmers comes from
toolinfo.py from Microchip's pyedbglib.

This commit adds a more generic "quirks" list that will allow programmers
with unusual report sizes to be added easily in the future.

Change-Id: Ic39a4bdcd67c4c93d5707657c6ee5d216bc4437a
Signed-off-by: Samuel Dewan <samdewan@me.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8033
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
4 months agoHACKING: fix how to retrieve hooks/commit-msg 34/8034/2
Antonio Borneo [Fri, 1 Dec 2023 22:49:35 +0000 (23:49 +0100)]
HACKING: fix how to retrieve hooks/commit-msg

Probably due to new version of gerrit, the download of the gerrit
hooks via scp is not working anymore.
Also the instructions available, after login, in
https://review.openocd.org/admin/repos/openocd,general
report that the hook file has to be downloaded via https also when
the user want to use ssh for gerrit access.

Drop scp in the suggestions to download the hook file and keep
https download only.

Change-Id: I0c8e5bb61ed8c7423a42a0d5d92866e071a814bb
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reported-by: Rolf Nooteboom <rolf@Onethinx.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8034
Tested-by: jenkins
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
4 months agotcl/target/at91sama5d2.cfg: allow choice of SWD instead of JTAG 20/8020/3
Peter Lawrence [Wed, 15 Nov 2023 15:58:24 +0000 (09:58 -0600)]
tcl/target/at91sama5d2.cfg: allow choice of SWD instead of JTAG

The target supports both SWD and JTAG, but the existing cfg file
only supports JTAG.  Using the standard [using_jtag] mechanism,
the user would now have a choice.

Change-Id: Ic6adb68090422812d591f6bf5b945ac10f323c74
Signed-off-by: Peter Lawrence <majbthrd@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8020
Reviewed-by: Jörg Wunsch <openocd@uriah.heep.sax.de>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget: Increase maximum profile sample count to 1000000 99/6099/4
Karl Palsson [Wed, 22 Nov 2023 09:57:06 +0000 (09:57 +0000)]
target: Increase maximum profile sample count to 1000000

Change-Id: I38276dd1af011ce5781b0264b7cbb08c31a0a2ad
Signed-off-by: Paul Reimer <paul@zaber.com>
Signed-off-by: Karl Palsson <karlp@tweak.au>
Reviewed-on: https://review.openocd.org/c/openocd/+/6099
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget: Add some info messages about examination process. 13/8013/5
Kirill Radkin [Tue, 31 Oct 2023 15:24:35 +0000 (18:24 +0300)]
target: Add some info messages about examination process.

These messages helps to clarify current status of examination process

Change-Id: I5d93903c4680deed2c1bf707d8f7ef0b48ffdc9a
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8013
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget/espressif: add algorithm support to xtensa chips 72/7772/10
Erhan Kurubas [Mon, 10 Jul 2023 21:47:06 +0000 (23:47 +0200)]
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>
4 months agotarget/xtensa: add algorithm support 71/7771/10
Erhan Kurubas [Mon, 10 Jul 2023 21:56:56 +0000 (23:56 +0200)]
target/xtensa: add algorithm support

Add arch level functions to execute code on the target

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I089095de6fcb9906ad8c84232fa52a77db5e6185
Reviewed-on: https://review.openocd.org/c/openocd/+/7771
Tested-by: jenkins
Reviewed-by: Ian Thompson <ianst@cadence.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget/espressif: add algorithm support to execute code on target 59/7759/11
Erhan Kurubas [Mon, 3 Jul 2023 09:02:13 +0000 (11:02 +0200)]
target/espressif: add algorithm support to execute code on target

This functionality can be useful for;
1-ESP flashing code to load flasher stub on target and
write/read/erase flash.
2-ESP GCOV command uses some of these functions to run
onboard routines to dump coverage info.

This is high level api for the Espressif xtensa and riscv targets

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I5e618b960bb6566ee618d4ba261f51af97a7cb0e
Reviewed-on: https://review.openocd.org/c/openocd/+/7759
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agodrivers/cmsis_dap: use quirk workarounds optionally 66/7966/3
Tomas Vanek [Tue, 7 Nov 2023 13:45:45 +0000 (14:45 +0100)]
drivers/cmsis_dap: use quirk workarounds optionally

Introduce 'cmsis-dap quirk' command to enable and
disable quirk mode.

If enabled, disconnect and connect before a switch
sequence and do not use multiple packets pipelining.

Change-Id: I6576f7de9f6c98a25c3cf9eec9a456a23610d00d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7966
Tested-by: jenkins
4 months agojtag/drivers/cmsis_dap: implement canceling of pending USB requests 66/7366/10
Tomas Vanek [Sun, 20 Nov 2022 20:01:17 +0000 (21:01 +0100)]
jtag/drivers/cmsis_dap: implement canceling of pending USB requests

Use it whenever an out-of-sync response is detected to clean
USB bulk transfer state.

USB hidapi does not offer any means to cancel a pending request,
therefore cmsis_dap_hid_cancel_all() does nothing.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ie36fa760c1643ae10be0e87fc633068965a72242
Reviewed-on: https://review.openocd.org/c/openocd/+/7366
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
4 months agojtag/drivers/cmsis_dap_bulk: use asynchronous libusb transfer 65/7365/11
Tomas Vanek [Sat, 19 Nov 2022 06:26:37 +0000 (07:26 +0100)]
jtag/drivers/cmsis_dap_bulk: use asynchronous libusb transfer

The synchronous libusb_bulk_transfer() always waits
for the transfer to complete. Therefore it does not allow issuing
multiple USB requests as used on HID backend.

Switch to asynchrounous libusb_submit_transfer().

With this patch a good USB FS based CMSIS-DAPv2 adapter
almost doubles the throughput:

 adapter speed: 20000 kHz
 poll off

 > load_image /run/user/1000/ram256k.bin 0x20000000
 262144 bytes written at address 0x20000000
 downloaded 262144 bytes in 0.428576s (597.327 KiB/s)

 > dump_image /dev/null 0x20000000 0x40000
 dumped 262144 bytes in 0.572875s (446.869 KiB/s)

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: Ic6168ea4eca4f6bd1d8ad541a07a8d70427cc509
Reviewed-on: https://review.openocd.org/c/openocd/+/7365
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
4 months agoremote_bitbang: Add SWD support 44/6044/18
Manuel Wick [Sat, 30 Jan 2021 21:46:50 +0000 (22:46 +0100)]
remote_bitbang: Add SWD support

This adds new command characters to make SWD work with the new split
jtag and swd operations of bitbang.

The command characters are as follows:
    O - SWDIO drive 1
    o - SWDIO drive 0
    c - SWDIO read request
    d - SWD write 0 0
    e - SWD write 0 1
    f - SWD write 1 0
    g - SWD write 1 1

Documentation has been updated accordingly. The new commands will be
used by an adapted version of the jtag-openocd applet of the "Glasgow
Debug Tool" (https://github.com/glasgowEmbedded/Glasgow). It has been
tested against an stm32f103 and an at91samd21 target.

contrib/remote/bitbang/remote_bitbang_sysfsgpio.c has also been adapted
to support SWD via the new command set. Some limited testing has been
done using a Raspberry Pi 2 with an stm32f103 and an at91samd21 target
attached.

Change-Id: I8e998a2cb36905142cb16e534483094cd99e8fa7
Signed-off-by: Manuel Wick <manuel@matronix.de>
Signed-off-by: David Ryskalczyk <david.rysk@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6044
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget/target: Fix 'wp' command usage 22/8022/2
Marc Schink [Mon, 20 Nov 2023 10:33:00 +0000 (11:33 +0100)]
target/target: Fix 'wp' command usage

While at it, fix the 'wp' command documentation.

Change-Id: I70f3110e8ce286051f8f810260f1857b2285e634
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8022
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
4 months agotarget: clarify usage of `coreid` 97/7997/4
Evgeniy Naydanov [Tue, 31 Oct 2023 18:13:46 +0000 (21:13 +0300)]
target: clarify usage of `coreid`

By definition in `target/target.h`, `coreid` is not a unique identifier
of a target -- it can be the same for targets on different TAPs.

Change-Id: Ifce78da55fffe28dd8b6b06ecae7d8c4e305c0a2
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7997
Tested-by: jenkins
Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget/mips32: pracc write cp0 status register first 14/7914/17
Walter Ji [Fri, 17 Nov 2023 03:27:09 +0000 (11:27 +0800)]
target/mips32: pracc write cp0 status register first

When user requested a change on cp0 status register,
it may contain changes on EXL/ERL bits, and changes on
these bits could lead to differnt behaviours on writing
to other cp0 registers.

Change-Id: Ic83039988c29c06ee134226b52de943c46d19da2
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7914
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotcl/target/gd32vf103: work around broken ndmreset 57/6957/3
Thomas Hebb [Sat, 30 Apr 2022 05:17:18 +0000 (22:17 -0700)]
tcl/target/gd32vf103: work around broken ndmreset

On this chip, the ndmreset bit in the RISC-V debug module doesn't
trigger a system reset like it should. To work around this, add a custom
"reset-assert" handler in its config file that resets the system by
writing to memory-mapped registers.

I've tested this workaround on a Sipeed Longan Nano dev board with a
GD32VF103CBT6 chip. It works correctly for both "reset run" and "reset
halt" (halting at pc=0 for the latter).

I originally submitted[1] this workaround to the riscv-openocd fork of
OpenOCD. That fork's maintainers accepted it, but have not upstreamed it
like they have several other of my changes.

[1] https://github.com/riscv/riscv-openocd/pull/538

Change-Id: I7482990755b300fcbe4963c9a599d599bc02684d
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/6957
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
4 months agotarget: Throw error in 'debug_reason' command 06/8006/2
Marc Schink [Sun, 12 Nov 2023 10:43:48 +0000 (11:43 +0100)]
target: Throw error in 'debug_reason' command

Instead of returning an 'error string', throw an error. This makes it
much easier to handle errors in Tcl scripts or in tools that use Tcl RPC.

Change-Id: I75c48750cfad7430fa5e6bc88fe04ebd59d34cea
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8006
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget: remove `target_number` 98/7998/2
Evgeniy Naydanov [Tue, 31 Oct 2023 13:53:52 +0000 (16:53 +0300)]
target: remove `target_number`

Change-Id: Id36e5ad2967303483392fd2670630289ecde2553
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7998
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
4 months agortt_server: Add option for a message when client connects 52/7752/10
Thiemo van Engelen [Fri, 23 Jun 2023 07:29:25 +0000 (09:29 +0200)]
rtt_server: Add option for a message when client connects

This is useful when using the SEGGER RTT tooling, as the SEGGER RTT
tool J-Link RTT Viewer version 7.84f requires that it receives a
messages immediately after connecting. Otherwise it will give a timeout
and it will not connect.

Change-Id: I9240a1b6a93cd5c0fbd18292afb33b89013d78bf
Signed-off-by: Thiemo van Engelen <tvanengelen@victronenergy.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7752
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agortt/tcl: Fix line indentation 93/7993/2
Marc Schink [Sun, 27 Mar 2022 15:55:53 +0000 (17:55 +0200)]
rtt/tcl: Fix line indentation

Change-Id: I21f8084ca648cfe35f8f4dba078b2227772578a8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7993
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoflash/nor/stmqspi: Use correct command errors 04/8004/3
Marc Schink [Sat, 11 Nov 2023 09:28:31 +0000 (10:28 +0100)]
flash/nor/stmqspi: Use correct command errors

Change-Id: I796b4e350653117bf63d18ad274a1d3d3d1337db
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8004
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
4 months agoflash/nor/pic32mx: Remove redundant error message 03/8003/3
Marc Schink [Sat, 11 Nov 2023 09:24:51 +0000 (10:24 +0100)]
flash/nor/pic32mx: Remove redundant error message

The correct syntax is already suggested due to the return
value used.

While at it, apply some minor code improvements.

Change-Id: I990c0f7a0871f4b1a0fcdd13afc190149302443c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8003
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoflash/nor/stm32l4x: Remove redundant error messages 01/8001/3
Marc Schink [Sat, 11 Nov 2023 09:19:43 +0000 (10:19 +0100)]
flash/nor/stm32l4x: Remove redundant error messages

The correct syntax is already suggested due to the return
value used.

While at it, apply some minor code improvements.

Change-Id: Id32440cdd531077008abd679add32246c4249eb2
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8001
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
4 months agoflash/nor/stm32h7x: Remove redundant error messages 00/8000/4
Marc Schink [Sat, 11 Nov 2023 09:18:53 +0000 (10:18 +0100)]
flash/nor/stm32h7x: Remove redundant error messages

The correct syntax is already suggested due to the return
value used.

While at it, apply some minor code improvements.

Change-Id: Idf3d7a46ddecd70823e06bc3997f41fcdb8e501f
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8000
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agoflash/nor/stm32f2x: Remove redundant error messages 99/7999/3
Marc Schink [Sat, 11 Nov 2023 09:17:45 +0000 (10:17 +0100)]
flash/nor/stm32f2x: Remove redundant error messages

The correct syntax is already suggested due to the return
value used.

While at it, apply some minor code improvements.

Change-Id: I676e2ebf5714c850a436854a32c2e9d2f181d537
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7999
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agojtag/drivers/rshim: Remove redundant error message 92/7992/3
Marc Schink [Thu, 9 Nov 2023 09:13:10 +0000 (10:13 +0100)]
jtag/drivers/rshim: Remove redundant error message

The correct syntax is already suggested due to the return
value used.

Change-Id: I0f4a7f93fdf056e7517c754d6d4ecd7928f1d226
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7992
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
4 months agojtag/drivers/jtag_vpi: Remove redundant error messages 71/7971/3
Marc Schink [Thu, 9 Nov 2023 09:12:51 +0000 (10:12 +0100)]
jtag/drivers/jtag_vpi: Remove redundant error messages

The correct syntax is already suggested due to the return
value used.

Change-Id: I971a579014c1eaf13b1932f7fa87c020a8eba69c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7971
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
4 months agojtag/drivers/ftdi: Use correct command error 70/7970/3
Marc Schink [Thu, 9 Nov 2023 09:11:34 +0000 (10:11 +0100)]
jtag/drivers/ftdi: Use correct command error

Change-Id: I625acdd8a226528de86f113582e31755d679e68e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7970
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agojtag/drivers/jlink: Use correct command errors 69/7969/3
Marc Schink [Thu, 9 Nov 2023 08:55:27 +0000 (09:55 +0100)]
jtag/drivers/jlink: Use correct command errors

While at it, remove the syntax error messages as the correct
syntax is already suggested due to the return value used.

Change-Id: I9310ba96ed3f8a85c37cee9193e481ad3df02e77
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7969
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
4 months agomips32: MIPS32_OP_SRL was using SRA opcode. 13/3613/4
Tobias Diedrich [Mon, 1 Aug 2016 18:29:41 +0000 (20:29 +0200)]
mips32: MIPS32_OP_SRL was using SRA opcode.

The mips opcode macro for the SRL opcode was using the wrong constant
value:

SRA -- Shift right arithmetic
Encoding: 0000 00-- ---t tttt dddd dhhh hh00 0011

SRL -- Shift right logical
Encoding: 0000 00-- ---t tttt dddd dhhh hh00 0010

This corrects the opcode constant for SRL and adds the SRA opcode for
completeness.

There is only one user of MIPS32_OP_SRL in src/flash/nor/cfi.c:
Since the mask constant (0x00000080 for the DQ7 mask) shifted in this
case would never have the sign bit set, it worked fine even though it
was accidentally using the SRA opcode instead of SRL.

Change-Id: I0a80746e2075c7df1ce35b9db00d9d0b997a3feb
Signed-off-by: Tobias Diedrich <ranma+openocd@tdiedrich.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/3613
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
4 months agojtag/drivers/kitprog: Restructure commands 67/7967/3
Marc Schink [Tue, 7 Nov 2023 16:14:09 +0000 (17:14 +0100)]
jtag/drivers/kitprog: Restructure commands

Use a command group 'kitprog' with subcommands instead of individual
commands with 'kitprog_' prefix.

The old command is still available to ensure backwards compatibility,
but is marked as deprecated.

Change-Id: I7f0d447939819ffc488a3d7a8de672b58887127f
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7967
Reviewed-by: Bohdan Tymkiv <bohdan200@gmail.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agodrivers/cmsis_dap: drop unused variable 65/7965/2
Tomas Vanek [Tue, 7 Nov 2023 12:23:14 +0000 (13:23 +0100)]
drivers/cmsis_dap: drop unused variable

The variable 'mode' was introduced in
commit 4dc8cd201c66 ("cmsis-dap: add initial cmsis-dap support")
but never has been used (just cleared)

Change-Id: Ia741d181ee8006bd0d872f3358a57e045235741a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/7965
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agojtag/drivers/cmsis-dap: Return error in 'backend' command 64/7964/3
Marc Schink [Mon, 6 Nov 2023 15:22:53 +0000 (16:22 +0100)]
jtag/drivers/cmsis-dap: Return error in 'backend' command

Change-Id: Ib9bf7ab50cbe193e9e726efb3cb58e53723a6dd1
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7964
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agojtag/drivers/cmsis-dap: Restructure commands 63/7963/2
Marc Schink [Mon, 6 Nov 2023 14:50:40 +0000 (15:50 +0100)]
jtag/drivers/cmsis-dap: Restructure commands

Use a command group 'cmsis-dap' with subcommands instead of individual
commands with 'cmsis_dap_' prefix.

The old commands are still available to ensure backwards compatibility,
but are marked as deprecated.

Change-Id: I75facb7572a86354c2ce6144aa7fadf3b5a6db4e
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7963
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Bohdan Tymkiv <bohdan200@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agocontrib/firmware: add 'send not acknowledged' function to the i2c bit-banging impleme... 11/7811/5
Ahmed BOUDJELIDA [Mon, 16 Oct 2023 09:05:59 +0000 (11:05 +0200)]
contrib/firmware: add 'send not acknowledged' function to the i2c bit-banging implementation

Change-Id: I60597ebc126da4acb00654513b96f52261253e12
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7811
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agocontrib/firmware: extend the number of bytes to be sent in the i2c bit-banging read... 10/7810/5
Ahmed BOUDJELIDA [Mon, 16 Oct 2023 09:04:16 +0000 (11:04 +0200)]
contrib/firmware: extend the number of bytes to be sent in the i2c bit-banging read operation

Change-Id: Iaeb3d5ba37da1bd77d36ad0ebbc6b45c46860dec
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7810
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agocontrib/firmware: remove unnecessary delay commands in the i2c bit-banging implementation 09/7809/3
Ahmed BOUDJELIDA [Mon, 16 Oct 2023 09:00:28 +0000 (11:00 +0200)]
contrib/firmware: remove unnecessary delay commands in the i2c bit-banging implementation

Change-Id: I741244be7a1bf186cfcb66a5b93e2a1a2ab0fde5
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7809
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoaarch64: Use 64-bit reads/writes to access SCTLR_EL1 39/7939/2
Peter Collingbourne [Wed, 18 Oct 2023 02:04:00 +0000 (19:04 -0700)]
aarch64: Use 64-bit reads/writes to access SCTLR_EL1

We were previously inadvertently clearing the top 32 bits of SCTLR_EL1
during read_memory/write_memory as a result of using 32-bit operations
to access the register and because the fields used to temporarily
store the register were 32-bit. Fix it.

Change-Id: I657d7f949e1f7ab6bf90609e3f91cae09cade31a
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7939
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoopenocd: src/target: Correctly handle CCSIDR_EL1.Associativity=0 16/7916/2
Peter Collingbourne [Thu, 28 Sep 2023 00:02:03 +0000 (17:02 -0700)]
openocd: src/target: Correctly handle CCSIDR_EL1.Associativity=0

Associativity=0 means that only one CMO is needed for all ways.
It could also mean that the cache is 1-way, but this is less likely.

Currently Associativity=0 causes us to hang in the while loop in
decode_cache_reg. Fix it by skipping the loop in this case. We can let
way_shift be set to the arbitrary value of 0 because in the case where
Associativity=0 we only ever shift 0 by it before ORing it into the
CMO operand.

Change-Id: I7c1de68d33f6b3ed627cbb1e2401d43185e4c1e3
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7916
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agobreakpoints: Add target logging to breakpoints and watchpoints 22/7922/6
Marek Vrbka [Fri, 29 Sep 2023 11:14:10 +0000 (13:14 +0200)]
breakpoints: Add target logging to breakpoints and watchpoints

This patch adds target logging to breakpoint
handling code. This makes it easier to
debug multicore/multithread systems.

Change-Id: I6bea8079a457070a8f63d0ce381a4ece6f5a190a
Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7922
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
4 months agobreakpoints: Fix endless loop in bp/wp_clear_target 40/7940/5
Kirill Radkin [Wed, 18 Oct 2023 16:13:25 +0000 (19:13 +0300)]
breakpoints: Fix endless loop in bp/wp_clear_target

If we can't remove bp/wp, we will stuck in endless loop

Change-Id: I44c0a164db1d15c0a0637d33c75087a49cf5c0f4
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7940
Tested-by: jenkins
Reviewed-by: Anatoly P <kupokupokupopo@gmail.com>
Reviewed-by: Tim Newsome <tim@sifive.com>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agoxtensa: update XDM register map for TRAX support 73/7973/5
ianst [Thu, 9 Nov 2023 15:28:50 +0000 (07:28 -0800)]
xtensa: update XDM register map for TRAX support

- Include additional debug module registers
- Add translation function for DM reg addr -> ID
- Add DM read/write commands

Signed-off-by: ianst <ianst@cadence.com>
Change-Id: If95419d24a9f27a40fa695c8c15326cdfd127ef1
Reviewed-on: https://review.openocd.org/c/openocd/+/7973
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
4 months agodoc: xtensa architecture clarifications/fixes 72/7972/2
ianst [Fri, 20 Oct 2023 20:00:41 +0000 (13:00 -0700)]
doc: xtensa architecture clarifications/fixes

- Fix Xtensa .cfg file references for NXP EVK
- Add clarification note for "xtensa xtmem" command
- Resolve TEX build warnings

Signed-off-by: ianst <ianst@cadence.com>
Change-Id: I0f2b56d0d084d86f557fadf3ac35fd04bf99650c
Reviewed-on: https://review.openocd.org/c/openocd/+/7972
Tested-by: jenkins
Reviewed-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget: Remove break/watchpoints in target_destroy() 56/7956/2
Marc Schink [Wed, 1 Nov 2023 08:27:05 +0000 (09:27 +0100)]
target: Remove break/watchpoints in target_destroy()

Break- and watchpoints are not removed when a target is destroyed
which introduces a memory leak.

Change-Id: I6143d48f7efd765b7752a12fdc337da3496d896f
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7956
Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
4 months agotarget: fix segmentation fault on target create 62/7962/2
Antonio Borneo [Sun, 5 Nov 2023 16:02:26 +0000 (17:02 +0100)]
target: fix segmentation fault on target create

In the unusual (and even incorrect) case of running the command
target create ...
before defining an adapter and the associated transport, the
command causes a segmentation fault. E.g.:
openocd -c 'target create cpu cortex-m -endian little'

Check that get_current_transport() returns a valid pointer before
referencing it.

Change-Id: I9796a7e92196ef3df5c7152b27c34102045dc9e7
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7962
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
4 months agotarget: use boolean values for 'valid' and 'dirty' flags 61/7961/3
Antonio Borneo [Sun, 5 Nov 2023 11:55:27 +0000 (12:55 +0100)]
target: use boolean values for 'valid' and 'dirty' flags

Convert to boolean the remaining numeric assignment and comparison

Change-Id: Idc25221d93e85236185aab9ee36f0a379939c89c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7961
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
4 months agonor: rsl10: fix minor coding style 60/7960/2
Antonio Borneo [Sat, 4 Nov 2023 14:55:24 +0000 (15:55 +0100)]
nor: rsl10: fix minor coding style

I use a script to compare the commands in the code with the ones
in the documentation.
Fix the style of the data to simplify the parsing.

Change-Id: I0f1d7e9ff5e2928312ca1a2f3424f82d2910580a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7960
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
5 months agocontrib/rtos-helpers/FreeRTOS-openocd: change license to CC0-1.0 95/7995/2
Antonio Borneo [Thu, 9 Nov 2023 14:15:10 +0000 (15:15 +0100)]
contrib/rtos-helpers/FreeRTOS-openocd: change license to CC0-1.0

This file is intended to be included in any user's project that
plans to use OpenOCD awareness for FreeRTOS.
It is supposed to be distributed under a permissive license to not
impact the original license of the user's project.

Distribute it under Creative Commons Zero v1.0 Universal license.

Change-Id: I7ac90e8b742517bcafc08c00662625671c8159c4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7995
Reviewed-by: Karl Palsson <karlp@tweak.au>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
5 months agoLICENSES: Add the CC0-1.0 license 94/7994/2
Antonio Borneo [Thu, 9 Nov 2023 14:12:08 +0000 (15:12 +0100)]
LICENSES: Add the CC0-1.0 license

Add the full text of the CC0-1.0 license to the OpenOCD tree. It
was copied directly from:

  https://spdx.org/licenses/CC0-1.0.html#licenseText

Add the required tags for reference and tooling.

Change-Id: Iae9c1431b6ffdd68ad5780deb78a257edb0b67f3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7994
Tested-by: jenkins
Reviewed-by: Karl Palsson <karlp@tweak.au>
5 months agopld/certus: fix crash when loading bitstream 08/7908/2
Daniel Anselmi [Sun, 24 Sep 2023 22:05:38 +0000 (00:05 +0200)]
pld/certus: fix crash when loading bitstream

Loading a bitstream to cetrus device crashed due to
missing initialization.

Change-Id: Ibd9a04b84e514f9635af01a2b73bae478e534eb7
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/7908
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/board: Add TI AM273 launchpad config 51/7951/2
Nishanth Menon [Tue, 17 Oct 2023 21:10:17 +0000 (16:10 -0500)]
tcl/board: Add TI AM273 launchpad config

Add basic connection details with AM273 Launchpad

For further details, see: https://www.ti.com/tool/LP-AM273

Change-Id: I88a02cdbccb65c185e808503d080cc1f12c909ae
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7951
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/target/ti_k3: Add AM273 SoC 50/7950/2
Nishanth Menon [Tue, 17 Oct 2023 21:07:41 +0000 (16:07 -0500)]
tcl/target/ti_k3: Add AM273 SoC

Add support for the TI K3 family AM273 SoC.

For further details, see https://www.ti.com/lit/pdf/spruiu0

Change-Id: Ifa21d0760831f4f525ecd976fb8d086ffdbc9e9f
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7950
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/board: Add TI AM263 launchpad config 49/7949/2
Nishanth Menon [Tue, 17 Oct 2023 21:02:44 +0000 (16:02 -0500)]
tcl/board: Add TI AM263 launchpad config

Add basic connection details with AM263 Launchpad

For further details, see: https://www.ti.com/tool/LP-AM263

Change-Id: I94c7a9ca70734ae89c6df3f02137d5bd32fde774
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7949
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/target/ti_k3: Add AM263 SoC 48/7948/2
Nishanth Menon [Tue, 17 Oct 2023 21:00:27 +0000 (16:00 -0500)]
tcl/target/ti_k3: Add AM263 SoC

Add support for the TI K3 family AM263 SoC.

For further details, see https://www.ti.com/lit/pdf/spruim2

Change-Id: I9a91b3d675511661dfc2710a7183bd59b98da133
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7948
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/board: Add TI AM243 launchpad config 47/7947/2
Nishanth Menon [Tue, 17 Oct 2023 20:53:59 +0000 (15:53 -0500)]
tcl/board: Add TI AM243 launchpad config

Add basic connection details with AM243 Launchpad

For further details, see: https://www.ti.com/tool/LP-AM243

Change-Id: Id8cec6675a222888b0007484209558d6503dbcda
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7947
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/target/ti_k3: Add AM243 SoC 46/7946/2
Nishanth Menon [Tue, 17 Oct 2023 20:50:49 +0000 (15:50 -0500)]
tcl/target/ti_k3: Add AM243 SoC

Add support for the TI K3 family AM243 SoC. This SoC is built on the
same base of AM642, so reuse the configuration with the exception of
Cortex-A53 which is not available on this device.

For further details, see https://www.ti.com/lit/pdf/spruim2

Change-Id: I971ba878b0f503e5120f6853634776eb61d05080
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7946
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/target/ti_k3: Sort the SoC documentation alphabetically 45/7945/2
Nishanth Menon [Tue, 17 Oct 2023 20:47:12 +0000 (15:47 -0500)]
tcl/target/ti_k3: Sort the SoC documentation alphabetically

Sort the documentation for the TI K3 parts alphabetically.

Change-Id: I2c40714ad590e3d9232a6f915c157d677e0c3610
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7945
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/target/ti_k3: Make Cortex-A processors optional 44/7944/2
Nishanth Menon [Tue, 17 Oct 2023 20:36:55 +0000 (15:36 -0500)]
tcl/target/ti_k3: Make Cortex-A processors optional

The AM2x family of K3 SoCs typically do not contain a Cortex-A53 or
A72 processor. So, make the cpu "up" functions available when armv8
processor count > 0.

Change-Id: I985b194fe7cc63e4134ad84ccd921cc456eb412f
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7944
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotcl/target/ti_k3: Convert memory access ap port num as a variable 43/7943/2
Nishanth Menon [Wed, 18 Oct 2023 18:45:39 +0000 (13:45 -0500)]
tcl/target/ti_k3: Convert memory access ap port num as a variable

Convert the memory access ap port num as a variable to allow support
for the AM2x family of K3 SoCs.

Change-Id: Ibd96c94055721f60d95179dab21d014c15b0f562
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7943
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/target/ti_k3: Convert Cortex-R5 ap port num as a variable 42/7942/2
Nishanth Menon [Tue, 17 Oct 2023 18:56:00 +0000 (13:56 -0500)]
tcl/target/ti_k3: Convert Cortex-R5 ap port num as a variable

Convert the Cortex-R5 ap port num as a variable to allow support for
the AM2x family of K3 SoCs.

Change-Id: I7dc8b459dca8b5f21395230b5cb782b14538bd48
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7942
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/target/ti_k3: Convert sysctrl ap port num as a variable 41/7941/2
Nishanth Menon [Tue, 17 Oct 2023 18:51:51 +0000 (13:51 -0500)]
tcl/target/ti_k3: Convert sysctrl ap port num as a variable

Convert the sysctrl ap port num as a variable to allow support for the
AM2x family of K3 SoCs.

Change-Id: I1b5b55e48240e6654779dd636fdf07bca055e192
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7941
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotarget: Add a debug_reason command 52/7952/4
Peter Collingbourne [Fri, 20 Oct 2023 02:07:29 +0000 (19:07 -0700)]
target: Add a debug_reason command

This allows programmatically determining the debug reason.

Change-Id: I0c3e85cebb6dc28fc0fc212beca84a484ac654a5
Signed-off-by: Peter Collingbourne <pcc@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7952
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotarget/breakpoints: make breakpoint_watchpoint_remove_all static 55/7955/2
Erhan Kurubas [Sat, 28 Oct 2023 18:58:08 +0000 (20:58 +0200)]
target/breakpoints: make breakpoint_watchpoint_remove_all static

Fixes below Sparse tool warning.
warning: symbol 'breakpoint_watchpoint_remove_all' was not declared.
Should it be static?

Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Change-Id: I4af1d5aa54abcb45f746b877513ba0b5fccbeb47
Reviewed-on: https://review.openocd.org/c/openocd/+/7955
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: Marek Vrbka <marek.vrbka@codasip.com>
5 months agotarget: fix a memory leak in image_open 35/7935/3
Evgeniy Naydanov [Tue, 10 Oct 2023 10:57:43 +0000 (13:57 +0300)]
target: fix a memory leak in image_open

Change-Id: I629be26e7752858091ad58c2b3b07f43e22e8c23
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7935
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotarget/mips32: update mips32 config register parsing 11/7911/7
Walter Ji [Tue, 26 Sep 2023 09:11:00 +0000 (17:11 +0800)]
target/mips32: update mips32 config register parsing

Enhance `mips32_read_config_regs` to better detect MIPS32 ISA,
DSP, and FPU features, allowing user to get more detailed
target information.
Most of these information will be used in MIPS m/iAptiv support.

Change-Id: I23571a626ec64fa019acac91bdbfcb434373bfc1
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7911
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
5 months agotarget: Fix get_reg, prevent returning invalid data 58/7958/5
Marek Vrbka [Fri, 3 Nov 2023 09:48:02 +0000 (10:48 +0100)]
target: Fix get_reg, prevent returning invalid data

This patch forces a read of register from the target
in the get_reg command in case the register cache
does not hold a valid value at that moment.

Note that the command "reg" already handles it
correctly, no fix is needed there.

Change-Id: I75fad25188e94ee4e06162ab6d600ea24dbf590a
Signed-off-by: Marek Vrbka <marek.vrbka@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7958
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
5 months agotcl/board: add board configuration for Advantech IMX8QM DMSSE20 74/7974/4
Oliver Graute [Wed, 1 Nov 2023 21:46:33 +0000 (22:46 +0100)]
tcl/board: add board configuration for Advantech IMX8QM DMSSE20

Change-Id: Iebf2a901b428cf3b99110aea0f3ab0e1f17b0250
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7974
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
5 months agotarget/target: Use boolean values for 'valid' flag 59/7959/2
Marc Schink [Fri, 3 Nov 2023 10:04:08 +0000 (11:04 +0100)]
target/target: Use boolean values for 'valid' flag

Change-Id: Ieaa25b9ef0997c0f75ddfb652325c1a9e53a8d8d
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/7959
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
5 months agojep106: update to revision JEP106BH September 2023 54/7954/2
Antonio Borneo [Fri, 27 Oct 2023 15:42:45 +0000 (17:42 +0200)]
jep106: update to revision JEP106BH September 2023

The original documents from Jedec since JEP106BG, do not report
the entry for "21  NXP (Philips)", replaced by "c".
It's clearly a typo.

Keep the line from JEP106BF.01 for "NXP (Philips)".

Change-Id: I273c8c5ecf48336ce5189b484a7236273ba90184
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7954
Tested-by: jenkins
5 months agoOpenOCD memory leak in `hwthread_update_threads()` 34/7934/2
Kirill Radkin [Mon, 25 Sep 2023 10:10:20 +0000 (13:10 +0300)]
OpenOCD memory leak in `hwthread_update_threads()`

Update `os_free()` from `rtos/rtos.c:96` to fix memory leaks

Change-Id: Id7b4c775291b735a0b4423151c2930afce6bf0bd
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7934
Reviewed-by: Tim Newsome <tim@sifive.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
5 months agoflash/nor/spi: add guide to select proper erase cmd 25/7925/2
Tomas Vanek [Mon, 2 Oct 2023 14:40:23 +0000 (16:40 +0200)]
flash/nor/spi: add guide to select proper erase cmd

Extend comments in flash_devices array.

Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Change-Id: I7ab85a2d37803b6bc9fc7a2a91ae2effb6ec288d
Reviewed-on: https://review.openocd.org/c/openocd/+/7925
Tested-by: jenkins
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
5 months agojtag/drivers: Extension of jtag_libusb_open 38/7938/3
EasyDevKits [Sat, 14 Oct 2023 19:48:56 +0000 (21:48 +0200)]
jtag/drivers: Extension of jtag_libusb_open

In jtag_libusb_open I've added a parameter for delivering the device
description for which this function should search and adjusted all
callers of this function. A new driver for WCH CH347 JTAG chips
will use this new parameter.
See also: https://review.openocd.org/c/openocd/+/7937

Change-Id: I85e1d7b1f7912ba5e223f0f26323ff3b7600e17d
Signed-off-by: EasyDevKits <info@easydevkits.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7938
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotools/scripts: iManufacturer added to camelcase.txt 36/7936/2
EasyDevKits [Sat, 14 Oct 2023 16:14:13 +0000 (18:14 +0200)]
tools/scripts: iManufacturer added to camelcase.txt

The iManufacturer is also a member of structure libusb_device_descriptor.
No need to output a check message by checkpatch.sh

Change-Id: Ibbb2eb9cde3482c8d4d6ea784f51a973eb36f8c5
Signed-off-by: EasyDevKits <info@easydevkits.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7936
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
5 months agotarget/mips32: check read regs result in save context 32/7932/2
Walter Ji [Mon, 9 Oct 2023 03:42:44 +0000 (11:42 +0800)]
target/mips32: check read regs result in save context

Add result check for mips32_pracc_read_regs in mips32_save_context.

Change-Id: Ie796d2b05a9feb11e246c2d0771b52cad4fb70db
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7932
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
5 months agotarget/mips32: rework mips core register related functions 64/7864/11
Walter Ji [Tue, 26 Sep 2023 08:56:02 +0000 (16:56 +0800)]
target/mips32: rework mips core register related functions

Update mips core definitions.
Reworked mips core register structure and read/write function.
Add coprocessor0 register definitions for target configuration.

Change-Id: I59c1f4cc4020db8a78e8d79f7421b87382fa1709
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7864
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>

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)