2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-08-16 18:57:55 +10:00
Commit Graph

11006 Commits

Author SHA1 Message Date
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
HAOUES Ahmed
0644a88a1b flash/bluenrg-x: Support STM32WB09 AKA BlueNRG-LPF device
The BlueNRG-LPF has a flash size up to 512 Kb

Change-Id: I4c71b716330351004f4f2ab8bf8eac7d5bb694eb
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8881
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-13 16:22:39 +00:00
HAOUES Ahmed
990ee1be73 flash/bluenrg-x: Add blueNRG alternate names
BlueNRG-LP -> STM32WB07
BlueNRG-LPS -> STM32WB05

Change-Id: I8e05ea29e84d3a7842e145fb66f448d0c82bd004
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8880
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-06-13 16:22:29 +00:00
Antonio Borneo
4732e40637 configure: hide build issue of amt_jtagaccel driver by disabling it
With commit d8a2f6dbcf ("configure.ac: show the Amontec
JTAG-Accelerator driver in the config summary") the driver
amt_jtagaccel is now build by default on Linux.
This highlights the dependency of some include files, dependency
that is not properly managed and that can cause build failure.

The driver is queued to be dropped soon, so there is no real
interest to fix the dependencies.

Change the default so the driver is not built if the user does not
require it at configure time.

Change-Id: Ifb74e2c802abda290efbf59ca4ce02048c94e6f8
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8939
Reviewed-by: R. Diez <rdiez-2006@rd10.de>
Tested-by: jenkins
2025-06-07 10:23:57 +00:00
Antonio Borneo
1347b693a5 configure: fix for missing include files on Linux
By merging [1] and [2], the drivers 'xlnx-pcie-xvc' and 'linuxspidev'
are now build by default on Linux.
This highlights the dependency of some include files under subfolder
'linux' that are not installed by default in all Linux boxes.

Add the check in 'configure' for the presence of the include file
and conditionally enable the build of the driver.

Change-Id: Ie88645c3455ab07622f069a0cc7bf09d1a5a2c75
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Link: [1] 7214c8be46 ("configure: show adapter Xilinx XVC/PCIe in the configuration summary")
Link: [2] 83e0293f7b ("Add Linux SPI device SWD adapter support")
Reviewed-on: https://review.openocd.org/c/openocd/+/8935
Tested-by: jenkins
2025-06-07 10:22:53 +00:00
Kevin Yang
d9b614a56d target/armv8: Handle modeswitch for aarch32 secure EL3
For aarch32 secure EL3
- Change target_el to 3 for SVC/ABT/IRQ/FIQ/UND/SYS for aarch32 secure
EL3
- Do not update SPSR for SYS, behavior is UNPREDICTABLE (ARMv8-A F5.1.121)
- Do not execute DRPS for SYS, behavior is UNPREDICTABLE (ARMv8-A
F5.1.51)

Change-Id: Ic1484665cd53afcccb5c20b152993a3f0407f8a2
Signed-off-by: Kevin Yang <kangyang@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5854
Tested-by: jenkins
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
Reviewed-by: Plamena Marinova <pmarinova@hilscher.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 10:13:41 +00:00
Jonathan Bell
e23a6bbc63 tcl: fix broken Raspberry Pi website links
raspberrypi.com is the home for technical information, raspberrypi.org
is the Foundation's site (though there are intelligent redirects).

Several pages have moved around, fix these.

Also tweak a few comments for style and correctness.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I7f52bcc362fb213b50987e3a42866fe4a6fec883
Reviewed-on: https://review.openocd.org/c/openocd/+/8885
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-06-07 10:06:31 +00:00
Jonathan Bell
7abc0f9e65 doc: bcm2835gpio: remove broken link and clarify usage
The peripheral address details have been removed from the documentation
part of the website (instead presented in the SoC datasheets).

Pi 5 GPIOs are provided by the RP1 southbridge, which requires the use
of libgpiod. The associated Linux driver for the GPIO interface must be
used when bitbashing on Pi 5, as the timing of pin state changes is not
guaranteed across the PCIe link without special treatment.

Using libgpiod, the typical maximum swclk speed is 1MHz.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
Change-Id: I8b2c44ec5edd71abaa0a763ba4d4f4603a211348
Reviewed-on: https://review.openocd.org/c/openocd/+/8884
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-06-07 10:06:19 +00:00
Marc Schink
6a40fe64d6 flash/nor/tcl: Add 'read_memory' command
This command allows to read non-memory mapped flash content directly
via Tcl script. The API is the same as for the 'read_memory' command
for targets.

Change-Id: I4a8d0d7ea2f778ac8f1501227b60b964c881cb84
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8634
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 10:05:48 +00:00
Jacek Wuwer
2065bac380 jtag/vdebug: implement a polling mechanism
This change adds a polling mechanism to the driver. When not busy
the driver issues a wait, allowing the target to advance time.
The wait period gets adjusted to match the polling setting.

Change-Id: I67f481d05d7c5ce5352b5cb97de78dbaa97d82ae
Signed-off-by: Jacek Wuwer <jacekmw8@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8221
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 10:05:05 +00:00
Marc Schink
db8db90333 tcl/target/stm32f4x: Enable the trace port clock
Enable the trace port (GPIOE) clock, otherwise the following pin
configurations have no effect.

Change-Id: I3942d2527c64340463c3b6c607addb4214f83081
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8823
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-06-07 10:02:22 +00:00
Matthias Breithaupt
125d4f106d flash/nor/spi: add puya p25q flash devices
P25Q16 can be found in the Efinix T13/20Q100F3, so that one is necessary
for jtagspi on those chips. The other ones were added for completeness.

Change-Id: Ifb6f3c6fbd23938d6fd26bce7742c3484ece130c
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8223
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-06-07 10:01:31 +00:00
Antonio Borneo
40e6c98dfc helper: configuration: check for empty search dirs
The function find_file() is supposed to be called when the search
dirs in 'script_search_dirs' has already been populated.

This is not the case when the command 'ocd_find' is used in one of
the embedded scripts 'startup.tcl'. It then triggers SIGSEGV.

Check for 'script_search_dirs' and eventually skip searching in
the dirs.

Change-Id: I9e75a8739c94de72041fb64487910d60dffcb2bd
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8931
Tested-by: jenkins
2025-06-07 09:58:53 +00:00
Marc Schink
3fbca95ae1 tcl/board: Add config for nRF5340 development kit
Tested with nRF5340 development kit.

Change-Id: I44f1ba176dd4ac491b5dccea4c4d6d6d9bfaf479
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8867
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:58:31 +00:00
Marc Schink
20d7e83576 tcl/board: Add config for nRF9160 development kit
Tested with nRF9160 development kit.

Change-Id: I367b869b9707bef0547b5d3575b24e19db74cd21
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8866
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:58:08 +00:00
Marc Schink
895dfb5d87 tcl/board: Deprecate nordic_nrf52_ftx232.cfg
Board configuration files for specific external debug adapters are not /
no longer supported.

Checkpatch-ignore: LONG_LINE_STRING

Change-Id: I0f391dfb1a2d7ceb92c2ad3e34eaeb8a85b2cdc5
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8865
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:57:44 +00:00
Marc Schink
84f6c561f3 tcl/board: Deprecate old nordic configuration files
Add the old configuration files to the 'file_renaming' list in order to
ensure backwards compatibility.

Change-Id: Ia61df8e5cd8c19cee19a494635c8025e36f3f4a7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8907
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:57:14 +00:00
Marc Schink
1ee7c09d95 tcl/board: Move nordic configuration files
Move board configuration files into a dedicated vendor directory as
required by the new guideline for configuration files.

Change-Id: Icbf368d7a453c82813e685d2935b186eb738c3ea
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8864
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:09:30 +00:00
Marc Schink
fbdb86adbd tcl/board: Use moved nordic target files
Use the moved nordic target configuration files.

Change-Id: Ie0e2eb7f9514eedb1ae6678eeee59291856c2674
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8906
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-06-07 09:09:13 +00:00