aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-12-30tcl/target: Add Geehy APM32F4x configMarc Schink1-0/+57
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-30tcl/target: Add Geehy APM32F0x configMarc Schink1-0/+49
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-30flash/nor/stm32f1x: Add support for Geehy APM32F0 seriesMarc Schink2-6/+5
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-30target/cortex_m: Add Cortex-M85 partMarc Schink2-0/+7
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-30bitbang: Add flush before sleepAleksey Shargalin3-0/+6
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-30tcl/target: add Marvell Octeon TX2 CN9130 targetHenrik Nordström1-0/+178
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-30jtag: add -ir-bypass option to newtapHenrik Nordström7-1/+31
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-30target/armv8: Add more support for decoding memory attributesPeter Collingbourne1-3/+76
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-29target/adi_v5_swd: optimize sequences in swd_connect_multidrop()Tomas Vanek1-3/+30
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-29target/arm_adi_v5,arm_dap: introduce pre_connect_init() dap operationTomas Vanek2-0/+12
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-29target/arm_adi_v5: fix DP SELECT logicTomas Vanek4-101/+164
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-24helper/bin2char: drop trailing empty lineAntonio Borneo1-1/+1
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-24doc: usb_adapters: fix HID report in lsusb dump of few adaptersAntonio Borneo5-12/+137
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
2023-12-24tcl/board: Add TI j722sevm configNishanth Menon1-0/+24
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-24tcl/target/ti_k3: Add J722S SoCNishanth Menon1-0/+11
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-24break from long loops on shutdown requestEvgeniy Naydanov3-1/+23
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-16remote_bitbang: add use_remote_sleep option to send delays to remoteJeremy Herbert5-4/+91
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-16doc/usb_adapters: add dumps of two versions of Atmel EDBGTomas Vanek2-0/+422
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-16jtag/core: Use 'bool' data type for 'bypass'Marc Schink3-5/+5
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-16jtag: Rename 'hasidcode' to 'has_idcode'Marc Schink7-10/+10
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-16helper: nvp: minor fixesAntonio Borneo2-3/+3
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-16target: use bool for backup_working_areaAntonio Borneo2-5/+5
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-15cmsis_dap_usb_hid: improve detection of probes with unusual report sizesSamuel Dewan1-6/+38
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-10HACKING: fix how to retrieve hooks/commit-msgAntonio Borneo1-4/+0
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-10tcl/target/at91sama5d2.cfg: allow choice of SWD instead of JTAGPeter Lawrence1-2/+18
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-10target: Increase maximum profile sample count to 1000000Karl Palsson2-2/+2
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-10target: Add some info messages about examination process.Kirill Radkin1-0/+5
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-10target/espressif: add algorithm support to xtensa chipsErhan Kurubas12-1/+274
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-10target/xtensa: add algorithm supportErhan Kurubas2-0/+234
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-10target/espressif: add algorithm support to execute code on targetErhan Kurubas5-2/+1103
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-06drivers/cmsis_dap: use quirk workarounds optionallyTomas Vanek3-5/+41
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
2023-12-06jtag/drivers/cmsis_dap: implement canceling of pending USB requestsTomas Vanek4-3/+35
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>
2023-12-06jtag/drivers/cmsis_dap_bulk: use asynchronous libusb transferTomas Vanek4-63/+319
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
2023-12-03remote_bitbang: Add SWD supportManuel Wick5-60/+230
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>
2023-12-01target/target: Fix 'wp' command usageMarc Schink2-2/+2
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>
2023-12-01target: clarify usage of `coreid`Evgeniy Naydanov6-17/+17
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>
2023-12-01target/mips32: pracc write cp0 status register firstWalter Ji1-2/+5
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>
2023-11-30tcl/target/gd32vf103: work around broken ndmresetThomas Hebb1-0/+77
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>
2023-11-24target: Throw error in 'debug_reason' commandMarc Schink1-1/+11
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>
2023-11-24target: remove `target_number`Evgeniy Naydanov3-59/+15
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
2023-11-24rtt_server: Add option for a message when client connectsThiemo van Engelen2-5/+24
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>
2023-11-18rtt/tcl: Fix line indentationMarc Schink1-1/+1
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>
2023-11-18flash/nor/stmqspi: Use correct command errorsMarc Schink1-10/+10
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>
2023-11-18flash/nor/pic32mx: Remove redundant error messageMarc Schink1-4/+2
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>
2023-11-18flash/nor/stm32l4x: Remove redundant error messagesMarc Schink1-12/+6
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>
2023-11-18flash/nor/stm32h7x: Remove redundant error messagesMarc Schink1-9/+3
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
2023-11-18flash/nor/stm32f2x: Remove redundant error messagesMarc Schink1-25/+10
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>
2023-11-18jtag/drivers/rshim: Remove redundant error messageMarc Schink1-3/+1
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
2023-11-18jtag/drivers/jtag_vpi: Remove redundant error messagesMarc Schink1-9/+3
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
2023-11-18jtag/drivers/ftdi: Use correct command errorMarc Schink1-1/+1
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>