Commit Graph

11921 Commits

Author SHA1 Message Date
Walter Ji b2172ed7d7 target/mips32: update coprocessor 0 command
Update mips32 cp0 command, it accepts cp0 reg names now.
Updated mips32 cp0 description.

Change-Id: Ib23dd13519def77a657c9c5bb039276746207b9b
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7905
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Tested-by: jenkins
2024-01-06 13:51:26 +00:00
Walter Ji 7de4b1202d target/mips32: add cpu info detection
Add detection for mips cpu types by using prid.
Add cpuinfo command for inspecting more verbose info.
Add MIPS Architecture specs in openocd docs.

Change-Id: I28573b7c51783628db986bad0e226dcc399b4fa6
Signed-off-by: Walter Ji <walter.ji@oss.cipunited.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7912
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
2024-01-06 13:50:46 +00:00
Antonio Borneo b717373247 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>
2024-01-06 13:50:24 +00:00
Jan Matyas 6a614465d0
Merge pull request #986 from riscv/from_upstream
Merge up to 16e9b9c44f from upstream.
2024-01-04 09:14:13 +01:00
Jan Matyas 02901ff5da
Merge pull request #964 from aap-sc/aap-sc/dbgbuf_prg_exec_status
Introduce execution status for program buffer and abstract commands
2024-01-04 09:10:13 +01:00
Marc Schink 5c53034d85 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>
2023-12-30 13:15:03 +00:00
Marc Schink b0f99dfed0 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>
2023-12-30 13:14:39 +00:00
Marc Schink 7f3aba1319 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>
2023-12-30 13:14:17 +00:00
Marc Schink d46a3d635e 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
2023-12-30 13:13:54 +00:00
Marc Schink a90b1642ec 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>
2023-12-30 13:13:24 +00:00
Marc Schink 5394e5b762 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>
2023-12-30 13:11:47 +00:00
Aleksey Shargalin 8df529fa66 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
2023-12-30 13:10:08 +00:00
Henrik Nordström 65fc586d6e 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>
2023-12-30 13:09:07 +00:00
Henrik Nordström 8d3728f931 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
2023-12-30 13:08:37 +00:00
Peter Collingbourne fc268f8326 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
2023-12-30 13:06:09 +00:00
Tomas Vanek 357996d996 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>
2023-12-29 14:35:16 +00:00
Tomas Vanek bfc1252239 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>
2023-12-29 14:34:50 +00:00
Tomas Vanek ee3fb5a0ea 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>
2023-12-29 14:33:55 +00:00
Antonio Borneo 492dc7c537 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>
2023-12-24 14:27:23 +00:00
Antonio Borneo 49489747d2 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: e0059dfffa ("doc: usb_adapters: add lsusb dump of few adapters")
Reviewed-on: https://review.openocd.org/c/openocd/+/8047
Tested-by: jenkins
2023-12-24 14:27:00 +00:00
Nishanth Menon b8422b076d 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
2023-12-24 14:25:38 +00:00
Nishanth Menon 33749a7fbe 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
2023-12-24 14:25:15 +00:00
Evgeniy Naydanov 2e920a212f 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>
2023-12-24 14:24:38 +00:00
Tim Newsome a7b5b320fd Fix build.
Change-Id: I4dd4a3bac0586bfaeb0ae9c197b637d6edb422c9
Signed-off-by: Tim Newsome <tim@sifive.com>
2023-12-22 09:34:19 -08:00
Tim Newsome e4a0658dff Merge commit '16e9b9c44fa62ea6eec99d1fb7bc43a8f1cc2f7e' into from_upstream
Conflicts:
	configure.ac
	tcl/target/gd32vf103.cfg

Change-Id: I72bbb973249b7bbfa720696fa2c76a87a41a2e9c
2023-12-22 09:08:06 -08:00
Parshintsev Anatoly aded275b70 rename dbgbuf to progbuf
Change-Id: I29e2192d5ce9d0f13010d8a09bd4ef50f5c8844b
Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
2023-12-22 11:35:23 +03:00
Parshintsev Anatoly 928f10a537 introduce execution status for riscv_program
Change-Id: I3b283b49dea88a6f3d2159be3c9f6c6da604aa9e
Signed-off-by: Parshintsev Anatoly <anatoly.parshintsev@syntacore.com>
2023-12-22 11:35:18 +03:00
Tim Newsome 62758f2087
Merge pull request #976 from riscv/from_upstream
Merge up to d4575b647a from upstream
2023-12-21 09:23:11 -08:00
Tim Newsome feff8e0054
Merge pull request #978 from riscv/static_checks
Clean up clang static analyzer complaints.
2023-12-18 12:43:31 -08:00
Jeremy Herbert e8e09b1b55 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>
2023-12-16 07:55:38 +00:00
Tomas Vanek 16e9b9c44f 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
2023-12-16 07:53:18 +00:00
Marc Schink d2b34b4740 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
2023-12-16 07:52:34 +00:00
Marc Schink f018cd7d90 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>
2023-12-16 07:51:56 +00:00
Antonio Borneo d3d287bf67 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>
2023-12-16 07:51:10 +00:00
Antonio Borneo 49348f1ce1 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>
2023-12-16 07:50:43 +00:00
Tim Newsome 25b909c699 Clean up clang static analyzer complaints.
I don't think there are any real bugs here, but at least this gives us a
clean slate moving forward.

Change-Id: I29c6c398c28dfe580f9a2deb3bdbcfc491a2ceb6
Signed-off-by: Tim Newsome <tim@sifive.com>
2023-12-15 10:11:29 -08:00
Tim Newsome fb28d7e6fd
Merge pull request #980 from en-sc/en-sc/remove-gd32vf103_inc
contrib/loaders/flash: remove unused gd32vf103.inc
2023-12-15 10:07:29 -08:00
Samuel Dewan 3413ae67ae 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>
2023-12-15 05:56:35 +00:00
Evgeniy Naydanov d357756f2c contrib/loaders/flash: remove unused gd32vf103.inc
The file is not used anymore. It is replaced by
`contrib/loaders/flash/gd32vf103/gd32vf103.inc`.

Change-Id: I7910b045faefc38b4cbcdce1ac0020f42cf1744b
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2023-12-14 19:22:43 +03:00
Tim Newsome 70668f5ec5
Merge pull request #959 from en-sc/en-sc/progbuf-mem-write
target/riscv: improve error handling in `write_memory_progbuf()`
2023-12-11 09:22:55 -08:00
Tim Newsome b5e0ec3c97
Merge pull request #973 from kr-sc/kr-sc/update-debug-defines-os
Update riscv/debug_defines (to sync with riscv-debug-spec commit 40b9a05)
2023-12-11 09:05:42 -08:00
Antonio Borneo c1ae95f6f5 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>
2023-12-10 13:37:11 +00:00
Peter Lawrence 5f6b25aa91 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>
2023-12-10 13:34:53 +00:00
Karl Palsson 2bd40b0bf9 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>
2023-12-10 13:33:51 +00:00
Kirill Radkin 0ce08ec858 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>
2023-12-10 13:33:01 +00:00
Erhan Kurubas 4003762177 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>
2023-12-10 13:31:57 +00:00
Erhan Kurubas d06d8ea3e4 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>
2023-12-10 13:29:05 +00:00
Erhan Kurubas d3ffcc784d 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
2023-12-10 13:26:33 +00:00
Kirill Radkin 84e6a4e617 Update riscv/debug_defines (to sync with riscv-debug-spec:40b9a05)
Change-Id: Ie969866d1de83360a5f45e96e22108b58b8aa02f
Signed-off-by: Kirill Radkin <kirill.radkin@syntacore.com>
2023-12-07 20:59:10 +03:00
Evgeniy Naydanov 8584b14183 target/riscv: improve error handling in `write_memory_progbuf()`
The goal of this commit is to provide more robust error handling in
`write_memory_progbuf()`. This is achieved by rewriting it in a fashion
similar to `read_memory_progbuf()`.

The motivation is: some instability in `load_image` was encountered. No
stable reproduction could be obtained, so the root cause was not
determined. Therefore, it was decided to clean-up the code, that may be
implicated in such failures.

Examples of unhanded errors in the code prior to this commit:
* Most of `dmi_write()` return values are discarded.
* If `dm_read()` on `abstractcs` failed (line 4546), `abstractauto` was
  not cleared.

Furthermore, the structure of the code was quite complicated, which made
it hard to analyze and reason whether or not all possible failures are
handled properly.

Change-Id: I8a100b686e594855fbf34acf5ccf0e1550f18869
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
2023-12-07 12:57:05 +03:00