11124 Commits

Author SHA1 Message Date
Liam Fletcher
d06ecba2e6 target: add microchip polarfire soc config
Microchip's PolarFire SoC has a RISC-V core complex with four
application processors and one monitor processor. This basic
configuration can be used to attach to all proccessor's or a single
processor, specified by the run-time argument $COREID

It can be used with most FTDI based debug interfaces and has been tested
with interface/ftdi/olimex-arm-usb-tiny-h.cfg.

Change-Id: I75dd965f1ce550807706d00fe17de887d36f0b02
Signed-off-by: Liam Fletcher <liam.fletcher@microchip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8877
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-07-25 16:41:22 +00:00
Nicolas Derumigny
a192949095 jtag: drivers: xlnx-axi-xvc: Add support for Xilinx XVC over direct bus interface (AXI)
This change allow to use direct mapping of the JTAG interface using
Xilinx Virtual Cable (XVC) over AXI. This merges the existing XVC PCIe
code and the patch proposed by Jeremy Garff
(https://review.openocd.org/c/openocd/+/6594).

This is useful when using on a Zynq/ZynqMP/uBlaze host with direct
access to the debug bridge over AXI.  You can then use the debug bridge
Xilinx IP (AXIXVC) to debug a remote device.

Signed-off-by: Nicolas Derumigny <nicolas.derumigny@inria.fr>
Change-Id: I934591b489e30b400b87772b1437e6030440904c
Reviewed-on: https://review.openocd.org/c/openocd/+/8595
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-07-25 16:38:41 +00:00
Nicolas Derumigny
8cdf8cb995 driver: jtag: rename xlnx-pcie-xvc to xlnx-xvc
Rename xlnx-pcie-xvc.c to xlnx-xvc.c in provision for AXI support

Signed-off-by: Nicolas Derumigny <nicolas.derumigny@inria.fr>
Change-Id: I287fdcb8edf97f48c6f8614ac4c456f8ba197011
Reviewed-on: https://review.openocd.org/c/openocd/+/8980
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-07-25 16:38:28 +00:00
Tomas Vanek
cbc32c3831 flash/nor/stm32l4x: fix permanent write protection on STM32U5
Unlike other devices supported by this driver STM32U5 devices
have a new UNLOCK bit in FLASH_WRP1AR, WRP1BR, WRP2AR, WRP2BR
registers. Writing zero to this bit makes the write protection
block permanent with no way to unprotect.

Commit 6554d176e9 ("flash/stm32l4x: support STM32U59/U5Ax devices")
and later commits with additional U5 devices lack support for
the UNLOCK bit and therefore makes write protection permanent
without warning.

Introduce the new bit flag F_WRP_HAS_LOCK and mark U5 devices by it.
Set UNLOCK bit in stm32l4_write_one_wrpxy() if F_WRP_HAS_LOCK is set.

Change-Id: I26b97d855e094a21540e3377f367520683af2eac
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8981
Tested-by: jenkins
2025-07-06 04:45:29 +00:00
Tomas Vanek
09a54c3a89 target/arm_adi: add URLs of latest ARM ADI spec
While on it warn about screwed SWD diagrams in ADI spec
and add reference to a SWD timing diagram.

Change-Id: I628d707ebf8ce7c22ba19bdcfd06028d4eaa60f8
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8690
Tested-by: jenkins
2025-07-02 12:20:36 +00:00
Tomas Vanek
f71b0bbd7b jtag/swd: extend ap_delay_hint parameter comments
Assure that zero is passed in ap_delay_hint in case of DP r/w.

Change-Id: I5cd53b99950a7f1398b88f7394b3e66530803479
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8689
Tested-by: jenkins
2025-07-02 12:20:12 +00:00
Nishanth Menon
537d907555 tcl/board/ti_*_swd_native.cfg: Add explicit transport info
We use swd emulation in direct memory operations. Instead of relying
on deprecated autoselect of transport, explicitly state swd as
transport scheme.

Change-Id: Iec7e2ad18edd365992cd7ba88558494bccf49fd2
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8975
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:43:33 +00:00
R. Diez
04d51723d0 configure.ac: show the dmem adapter in the config summary
Also enable this adapter by default (auto).

Change-Id: I61597c8572115f838ab0c92021163436eb7b0d59
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8971
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:43:11 +00:00
Antonio Borneo
7f1f18399c jtag/drivers: dmem: fix build on Linux 32 bits
On 32 bits machine both 'uintptr_t' and pointers are 32 bit.
The cast
(volatile uint32_t *)((uintptr_t)dmem_emu_virt_base_addr + addr)
fails with error
	error: cast to pointer from integer of different size
	[-Werror=int-to-pointer-cast]
in lines 100 and 109 because:
- 'addr' is a 'uint64_t';
- adding 'uintptr_t' and 'uint64_t' returns a 64 bit value;
- cast the 64 bit to 'uint32_t *' is an error.

In the code the value passed to 'addr' is always 32 bit wide, so
there is no need to pass it as 'uint64_t'.

Change the type of 'addr' to 'uint32_t'.
Fix also some format string to fit both 32 and 64 bits machines.

Change-Id: I90ff7cd3731cb24a0fc91fe7b69c532b5c698ba0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8974
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: jenkins
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
2025-06-29 07:43:00 +00:00
Tim Newsome
ff274122dc gdb_server: Improve info message.
Add target name and state to "Not running when halt was requested"
message.

Imported from
https://github.com/riscv-collab/riscv-openocd/pull/763

Change-Id: Ic84e9a884b57caa270cfee0ca6fa6a0dd8e5d2bd
Signed-off-by: Tim Newsome <tim@sifive.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8916
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:42:25 +00:00
Tomas Vanek
e8dca11245 doc: fix bp usage
Commit c8926d1457
("cortex_a hybrid & context breakpoints") missed doc update.

Add info about settig hybrid & context breakpoints to chapter
15.5 Breakpoint and Watchpoint commands

Change-Id: I4a6fdc83a4c30ad8437c49796de8e6d8c6375c0c
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8934
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:41:53 +00:00
Tomas Vanek
f9077f3026 flash/nor/rp2xxx: save ACCESSCTRL over ROM API calls
Especially after the flash probe (used in gdb-attach event)
we need to completely restore the original security state to allow
'resume' or gdb 'continue' without injecting strange errors
to application code.

Save all ACCESSCTRL registers potentially changed by triggering CFGRESET.
Restore them at cleanup.

Fixes: commit ea775d49fc ("flash/nor/rp2040: add RP2350 support")
Change-Id: I964886d5b1d0269497c343811ee4dcd5c31953db
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8961
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:41:27 +00:00
Tomas Vanek
c4fb64e76c flash/nor/rp2xxx: save security state over target algo
RP2040 and RP2350 flash driver runs a ROM API target algorithm
in probe to setup QSPI command interface. The Cortex-M33 core
of RP2350 has to be in secure mode with SAU and MPU switched off
to ensure ROM API call working properly.

Especially after the flash probe (used in gdb-attach event)
we need to completely restore the original security state to allow
'resume' or gdb 'continue' without injecting strange errors
to application code.

Use cortex_m support to set secure mode and to restore it back.

Fixes: commit ea775d49fc ("flash/nor/rp2040: add RP2350 support")
Change-Id: I72096bfecbb45a8aa4d3a7a37ad140532b3b00b2
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8960
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:41:16 +00:00
Tomas Vanek
f547e55076 target/cortex_m: introduce security manipulation routines
Running target algorithms on ARMv8M may require core in secure
mode with SAU and MPU off (as set after reset).

cortex_m_set_secure() forces this mode with optional save of
the previous state.

cortex_m_security_restore() restores previously saved state.

Change-Id: Ia71826db47ee7b0557eaffd55244ce13eacbcb4b
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8959
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:41:04 +00:00
R. Diez
ce3bf664c8 configure.ac: rename M4 macro 'adapter' to prevent accidental conflicts
Also remove a comment about such a conflict which had been already noticed.

Change-Id: I6f301ccbd1261ea1c15c44a02d3f34f0cf5cb9f4
Signed-off-by: R. Diez <rdiez-2006@rd10.de>

Reviewed-on: https://review.openocd.org/c/openocd/+/8972
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:39:14 +00:00
Antonio Borneo
13b74c3fc7 helper: types: fix proper return type in example of ARRAY_SIZE()
The example in the comment above the declaration of the macro
ARRAY_SIZE() assigns the value to a variable of type 'unsigned'
that is not allowed by the coding style (should be 'unsigned int')
and is not correct since the macro uses 'sizeof()' and the type
returned is 'size_t'.

Fix the comment.

Change-Id: I18c32b5328a229ab74b56dafab46a064ce5d23c5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8970
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
2025-06-29 07:38:46 +00:00
Henrik Brix Andersen
6631419beb jtag: drivers: xlnx-pcie-xvc: use correct TMS polarity during pathmove
The xlnx_pcie_xvc_execute_pathmove() function checks whether TMS
should be high or low for transitioning from the current state to the
next state, but then calls xlnx_pcie_xvc_transact() with the opposite
level, leading to invalid state transitions.

Fix the polarity of TMS in the calls to xlnx_pcie_xvc_transact() to
match the required TMS level.

Change-Id: I2383e41fb70063e26aa69fabcf728df597607934
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8613
Reviewed-by: Moritz Fischer <moritzf@google.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Nicolas Derumigny <nicolas.derumigny@inria.fr>
2025-06-29 07:38:27 +00:00
Marc Schink
8194fc48bd tcl/board: Add config for TMS570LS12x development kit
Tested on the corresponding hardware.

Change-Id: Ic98141c450bb981cc7853c93b38195c7930bc7d3
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8969
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:35:47 +00:00
Marc Schink
c6f1863352 target/armv4: Use command_print() instead of LOG_ERROR()
Use command_print() in order to provide an error message to the caller.

Change-Id: I9f1a2ef07a102e1d6e755f3680bed0f7183b5c9c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8968
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:35:35 +00:00
Marc Schink
56c24b9eb2 target/armv4: Use LOG_TARGET_xxx()
Use LOG_TARGET_xxx() for log messages as it is used for other targets.

While at it, rework the log messages. For example by removing spaces or
punctuation marks at the end of the message.

Change-Id: I295001876d40527ec8f35c2aec8d562a29e57b26
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8967
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:35:23 +00:00
Marc Schink
7fa8a5c257 target/armv7a: Use LOG_TARGET_xxx()
Use LOG_TARGET_xxx() to indicate which target the message belongs to.

Change-Id: Ic40c61a779c1a1ebdc96ebc56b27541fff5e6205
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8966
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-29 07:35:12 +00:00
Marc Schink
d008a02a74 target/armv7a: Hide multiprocessing support message
Print a debug message about missing multiprocessing support rather than
an error message.

Change-Id: Ia1581f7284747d8a92096d6f5515f891c8069f71
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8965
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:35:01 +00:00
Marc Schink
4d56d580ce target/arm_dpm: Use LOG_TARGET_xxx()
Use LOG_TARGET_xxx() to indicate which target the message belongs to.

While at it, rework the log messages. For example, using correct format
specifiers.

Change-Id: I05031e0ae25fe9e7bc38dfb781b6623a967fd533
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8964
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:34:48 +00:00
Jan Matyas
46aa9c0e52 openocd.c: 'init' should fail if GDB service cannot be created
If it is not possible to create a GDB service for a certain target
(for example the given TCP port is already occupied), the "init"
command should fail, but it currently does not.

Fix this by checking the return code of gdb_target_add_all().

Steps to reproduce:

1) Make the port 3333/tcp occupied. For example by:

   nc -l 3333

2) In another terminal, launch OpenOCD. Use the gdb_port
   3333 (which is the default). For example:

   path/to/your/openocd \
      -c "adapter driver ..." \
      -c "jtag newtap ..."
      -c "target create ..."

3) Observe the outcome:

   Before this patch:

   Error "couldn't bind gdb to socket on port 3333: Address already in use"
   is displayed but OpenOCD keeps running.

   After this patch:

   The error message is displayed and OpenOCD exits - as expected.

Change-Id: I63c283a9a1095167b78e69e9ee879c378a6b9f2a
Signed-off-by: Jan Matyas <jan.matyas@codasip.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8957
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-29 07:33:50 +00:00
Antonio Borneo
9b660bbd19 rtos: sort the rtos by alphabetic order
Add comments to require the list of rtos to be kept sorted.

Change-Id: Iecf9250a14f6593d0a24a9f9b8930c0ec8d74bd2
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8953
Tested-by: jenkins
2025-06-29 07:32:34 +00:00
Antonio Borneo
df525290cb target: use array size to constraint the loop
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.

Change-Id: I3cdc0f6aef8a5110073aeef333c439e61fc54032
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8952
Tested-by: jenkins
Reviewed-by: Brandon Martin
2025-06-29 07:32:25 +00:00
Antonio Borneo
cd749419ca target: sort the targets by alphabetic order
Add comments to require the list of targets to be kept sorted.

Change-Id: Ie3d7e3f5d55a9f9214dc179c5c986b6682f59412
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8951
Tested-by: jenkins
2025-06-29 07:32:13 +00:00
Antonio Borneo
c92cf66c67 jtag: interfaces: sort the drivers by alphabetic order
Add comments to require the list of drivers to be kept sorted.
While there:
- align the check on BUILD_PRESTO and BUILD_USB_BLASTER;
- fix indentation of the closing parenthesis.

Change-Id: Ic78281b1cdfb5bf72ea41427233e76516001b429
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8950
Tested-by: jenkins
2025-06-29 07:32:04 +00:00
Antonio Borneo
5d192a9f70 flash: nand: use array size to constraint the loop
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.

Change-Id: I532a51a223061348e57bae3bd66ee6b346c1b070
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8949
Tested-by: jenkins
Reviewed-by: Brandon Martin
2025-06-29 07:31:55 +00:00
Antonio Borneo
6ab6d3475f flash: nand: sort the drivers by alphabetic order
Add comments to require the list of drivers to be kept sorted.

Change-Id: I21b52cc1f5e679b0ebf7797e204248507f53557b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8948
Tested-by: jenkins
2025-06-29 07:31:48 +00:00
Antonio Borneo
fa0fa25764 flash: nor: use array size to constraint the loop
Instead of using NULL terminated arrays to determine the last
element of the array, use the size of the array.

Change-Id: Ia3d739b0a9f201ba2e7b1d1244d60c8e5546c9c1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8947
Reviewed-by: Brandon Martin
Tested-by: jenkins
2025-06-29 07:31:37 +00:00
Antonio Borneo
a64ae963be flash: nor: sort the drivers by alphabetic order
Add comments to require the list of drivers to be kept sorted.

Change-Id: I57382605edc6a38d6c1ac18393421b18ae72215b
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8946
Tested-by: jenkins
2025-06-29 07:31:22 +00:00
Marc Schink
a9015ba79d tcl/target/lsch3_common: Remove 'mem2array'
The 'mem2array' function is deprecated and replaced by 'read_memory'.

Change-Id: Iea54a390d67978d20dbb99ab6f7f4178dda481c2
Reported-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8962
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-21 07:38:58 +00:00
Vitaly Cheptsov
1040bdec79 jlink: add nickname support
Using nicknames provides a human-readable alternative to serial
numbers for convenience purposes. Allow matching adapter serial
with device nickname.

Change-Id: I03b8d28a6c89412a825d42f4f66b3b528f217d9c
Signed-off-by: Vitaly Cheptsov <vit9696@protonmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8886
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
2025-06-21 07:38:17 +00:00
Marc Schink
99d642ca5b doc: Fix 'add_help_text' and 'add_usage_text' usage
Remove the quotation marks as they are used for strings and not
parameter names.

Change-Id: I7bb25eb251427e89256b73cf697d8ec5c1b401dc
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8963
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-21 07:37:52 +00:00
Marc Schink
06a0b8451f doc: Fix 'find' and 'ocd_find' usage
Remove the quotation marks as they are used for strings and not
parameter names.

Change-Id: Ib0629e1465f821f91cd1e837f4ef8c752013b6b7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8955
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-21 07:37:34 +00:00
Marc Schink
1afa12005c doc: Fix 'add_script_search_dir' usage
The 'directory' parameter is not optional.

Change-Id: Ifbc7b311692157dae0621dfa6d35a24b8fe8cbb2
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8954
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-21 07:37:03 +00:00
Tomas Vanek
82dc399e5e target/cortex_m: fix debug reason after reset halt
[1] removed target_halt() from cortex_m_assert_reset()
It broke debug_reason tracking and the previous reason
was shown after reset halt.

Set debug_reason to DBG_REASON_DBGRQ during reset halt
preparation.

Fixes: [1] commit 226085065b ("target/cortex_m: drop useless target_halt() call")
Reported-by: Marc Schink <dev@zapb.de>
Change-Id: I685618ed158abde11f6e00eeeee1dfa8ed90952d
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/8945
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
2025-06-21 07:36:40 +00:00
R. Diez
9e4b6b90c9 configure.ac: show 5 ARM adapters in config summary
Adapters: bcm2835gpio, imx_gpio, am335xgpio, ep93xx and at91rm9200
Allow the user to enable them regardless of the target architecture.

Change-Id: I9fbc7cbefe770ea2e2239b95a3305fd29127fa85
Signed-off-by: R. Diez <rdiez-2006@rd10.de>

Reviewed-on: https://review.openocd.org/c/openocd/+/8892
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-21 07:35:54 +00:00
Daniel Goehring
33ebae9abd target/armv8: update MPIDR decoding
Update MPIDR decode to support the multithreading (MT) bit.

If detected, socket, cluster, core and multithread affinity levels are
decoded and displayed.

Change-Id: I43569141fa0eef8ee8fc16c187a4af3c23e97db8
Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7190
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-21 07:35:31 +00:00
Antonio Borneo
1ebff3ab33 jep106: update to revision JEP106BM Jun 2025
Update to latest available document.

Change-Id: Ic1c892b42d3efbb35ad4a6c85deb17ab31ad9997
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8944
Tested-by: jenkins
2025-06-14 13:56:30 +00:00
R. Diez
9a7c85b163 configure.ac: remove usage of obsolete Automake macro AM_PROG_CC_C_O
Macro AM_PROG_CC_C_O has been obsolete since Automake 1.14,
released in June 2013 (12 years ago).

It used to check whether the C compiler supports the -c and -o options,
but that is now included in AC_PROG_CC.

Increase the minimum required Automake version to 1.14 accordingly.

Also remove the "not a GNU package" comment,
which does not really make sense.

Change-Id: I987ba8686721c7f36fba81e100f1c3ddf77f636d
Signed-off-by: R. Diez <rdiez-2006@rd10.de>

Reviewed-on: https://review.openocd.org/c/openocd/+/8942
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-13 16:31:26 +00:00
kryvosheiaivan
8046f2a38f cmsis-dap: Fix freeing pending transfers on close
Freeing pending transfers on shutdown is done in openOCD
and on libusb side. This created concurrency in freeing
memory and segmentation faults:
https://github.com/libusb/libusb/issues/1627
Bug is reproduced better if many targets are laucnhed.
Bug was reproduced with CMSIS-DAP on targets:
cyw20829, psoc4, stm32l5 if launching multiple times.
Proposed working fix: if some transfers pending/in-flight
on 'shutdown' then apply libusb_handle_events_timeout_completed()
to make transfer complete. In all cases transfer completed
due to tests.

Change-Id: I44621ac6096791714910220d04614d0a19ce47bd
Signed-off-by: kryvosheiaivan <Ivan.Kryvosheia@infineon.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8876
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-13 16:27:37 +00:00
Marc Schink
207ecaab33 adapter: Deprecate Gateworks GW16012 driver
The adapter is not available for years now. There is also no information
about this device from Gateworks. The poor hardware availability and the
lack of users prevents testing, maintenance and adaptations to future
changes.

Mark the adapter as deprecated as a first step to give potential users
the opportunity to upgrade the hardware until the next OpenOCD release.

Change-Id: I037325a6b018b26608733a36bef30db2785858f8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8651
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-13 16:26:53 +00:00
Marc Schink
88aec4b499 adapter: Deprecate Amontec JTAG Accelerator driver
The adapter is not available for years now and Amontec is not even a
company anymore. The poor hardware availability and the lack of users
prevents testing, maintenance and adaptations to future changes.

Mark the adapter as deprecated as a first step to give potential users
the opportunity to upgrade the hardware until the next OpenOCD release.

Change-Id: Idd9fb75588246bc39e12ea17a71435ed77f0f50b
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8349
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-13 16:26:38 +00:00
Antonio Borneo
c77ba0cf57 HACKING: describe keeping the 'Change-Id' on new patch versions
We often get on Gerrit a new version of an old patch with a new
'Change-Id' value. This breaks the history of the review, adding
more work to the review process.

Describe in HACKING why the hook 'commit-msg' is required and how
to handle the 'Change-Id' on new patch versions.

Change-Id: I5c060b19f966add7422704912b38e1ab2f788e5f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8940
Tested-by: jenkins
2025-06-13 16:25:42 +00:00
Electric Worry
fa83ca0bea tcl/board/orange_pi_zero_3: Add Orange Pi Zero 3 board
The Orange Pi Zero 3 is an SBC that uses an Allwinner H618
SoC. As such, JTAG support is fully available, however the
SoC multiplexes JTAG function with UART1 and microSD.
Unfortunately Xunlong has used UART1 for the Wifi-BT
chip, leaving JTAG accessible only via the microSD using
a microSD breakout board (for example).

Change-Id: I0dc078cd2f3176815271917eb5e948cc8ef94525
Signed-off-by: Electric Worry <me@electricworry.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/8938
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-06-13 16:24:58 +00:00
Electric Worry
e171959ede target: add support for Allwinner H618 SoC
The Allwinner H618 is an updated H616 but appears functionally
equivalent. It is used in small boards such as Orange Pi Zero 3.

Change-Id: I299a42be746189f3e8e31070aa26b83ab7d806a4
Signed-off-by: Electric Worry <me@electricworry.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/8936
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-13 16:24:47 +00:00
HAOUES Ahmed
2da332fa83 flash/bluenrg-x: support programming without loader
fallback programming without loader when resources are not available
while at there refactor reused code
(wait for interrupt and command execution)

Change-Id: I2cba0f53d3470bc324f4a72614c236cebf196f64
Signed-off-by: BOCHKATI Tarek <tarek.bochkati@st.com>
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8883
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-13 16:23:24 +00:00
HAOUES Ahmed
37a0f013f8 flash/bluenrg-x: fix programming for devices with 512k flash
flash ADDRESS register is encoded in 17 bits (was 16),
so fix the cast to uint32_t

Change-Id: I13384ee8967e65890577b12a42a0eb4f1e2a7467
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8882
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-13 16:22:52 +00:00