Commit Graph

1490 Commits

Author SHA1 Message Date
Antonio Borneo
a5a9121ad6 target: stm32mpxxx: fix return to SWD after reset
A target reset can cause a power cycle, causing the DAP to switch
from SWD to JTAG. The adapter can loose the connection because it
keeps using SWD, triggering error messages.
While some ST-Link FW can automatically reconnect the lost SWD
connection, this is not possible with older FW nor with other
adapters.

Force a DAP initialization after reset to eventually switch it
back to SWD.

Change-Id: I29ea49d2d5ee013ad33371265fd6996353f391d6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9462
Tested-by: jenkins
2026-03-08 10:18:36 +00:00
Tomas Vanek
5b3db97c42 tcl/target/nordic/nrf53: fix empty event handler
reset-assert of network CPU should be handled by empty dummy handler
to prevent the Cortex-M target native processing. Unfortunately configuring
the empty string does not define a new handler, it drops the existing one.

Use semicolon to fix configuration and to make the emtpy handler
clearly visible.

Fixes: commit 17be341d38 ("tcl/target: add nRF53 and nRF91 config files")
Reported-by: Lawrence King <lawrencek52@gmail.com>
Change-Id: I3bd229a78860ed05d694e708ab62cb1670a77010
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9492
Tested-by: jenkins
Reviewed-by: Lawrence King <lawrencek52@gmail.com>
2026-03-05 21:31:20 +00:00
Antonio Borneo
22bad00b9b target: stm32u0x: add transport swd
The STM32U0xx devices support only SWD.

Add swd transport in the target file.
Remove swd transport from the associated board files.

Change-Id: I2d31856951d15fcf2d1986ee5b1b31464e68db1c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9427
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-02-15 18:22:18 +00:00
Antonio Borneo
0e4d6d202a target: stm32l0x: drop swj on swd only target
The STM32L0xx devices support only SWD.

Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.

Change-Id: I5f8fb4344b33f8bdefd67fd86326f4dccb674d92
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9426
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
2026-02-15 18:22:04 +00:00
Antonio Borneo
c11a325ed8 target: stm32g0x: drop swj on swd only target
The datasheets for all STM32G0xx devices report that only SWD is
supported. No TDI/TDO pin is present.

Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.

Change-Id: Ib29171dd614eb84346e90cb447bc7292465095ac
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9425
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-02-15 18:21:48 +00:00
Antonio Borneo
a02550bafa target: stm32f0x: drop swj on swd only target
The datasheets for all STM32F0xx devices report that only SWD is
supported. No TDI/TDO pin is present.

Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.

Change-Id: I65a08b6a441d794aa209cff8583a971d3546f49e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9424
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 18:21:36 +00:00
Antonio Borneo
b164b65b3b target: stm32c0x: drop swj on swd only target
The datasheets for all STM32C0xx devices report that only SWD is
supported. No TDI/TDO pin is present.

Drop swj support.
Add swd transport.
Remove swd transport from the associated board files.

Change-Id: If6e630858aa64fbb3938a520604748f3f0ff7356
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9423
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
2026-02-15 18:21:21 +00:00
Tomas Vanek
e135ffe205 tcl/target/numicro*: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

There are no relevant board files.

Change-Id: I2119e0c0895ca97895ade92a1b1becef6bd6cfdb
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9438
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:19:46 +00:00
Tomas Vanek
86bdd88282 tcl/target/lpc8nxx: drop swj on swd only target
Historically swj_newdap was necessary to handle HLA properly
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

There are no relevant board files.

Change-Id: Id66a808475f061307fc6a0b3e0d2a9840b543e7f
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9437
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:19:34 +00:00
Tomas Vanek
0163d9ddba tcl/target/psoc4: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

There are no relevant board files.

Change-Id: I7ff7b2dee316c10a24e2ab38f8c03f504295d868
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9436
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:19:19 +00:00
Tomas Vanek
e85f9b2954 tcl/target/nordic: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

Drop 'transport select swd' from board files referring to
these targets.

While on it remove useless endianness option handling.

Change-Id: Icb4c04c79998369059044c203edcca61648aa936
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9435
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:19:02 +00:00
Tomas Vanek
a7d31c87e1 tcl/target/klx, ke0x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

No board files referring these targets select swd transport.

Change-Id: I002ce7029936f56b1d8b41505bca8dc771c33187
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9434
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:18:45 +00:00
Tomas Vanek
2374db956b tcl/target/at91samd, atsame5x: drop swj on swd only targets
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

No board files referring these targets select swd transport.

While on it remove useless endianness option handling.

Change-Id: I3b47750cc69fc9009fdd4cfdccfc213792d1b7ee
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9433
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2026-02-15 18:18:32 +00:00
Tomas Vanek
9b21a31eb7 tcl/target/rp2040, rp2350: use swd newdap instead of swj_newdap
Historically swj_newdap was necessary to handle HLA properly.
Since commit 60f104f450 ("hla_transport: split command
registration per transport") there is no point in using
swj_newdap on SWD only devices.

Change-Id: Ib4d7eb5935e0b44087cc8ea73ab187a417413db6
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9421
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-02-15 18:18:18 +00:00
Mikhail Iakhiaev
078a6b1f9f tcl/target/ti/mspm0.cfg: drop swj on swd only target
The MSPM0 devices support only SWD.
Drop swj support, add swd support.

This also gets rid of the following warnings:

Warn : DEPRECATED: auto-selecting transport "swd". Use 'transport ...
Warn : Transport "swd" was already selected

Tested by programming/verifying firmware on LP-MSPM0G3519 dev board.

Change-Id: Ieafd9c4691343124b2dfb2daa1c0d3a96b13e485
Signed-off-by: Mikhail Iakhiaev <iakhiaev@google.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9413
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-02-15 08:11:53 +00:00
Marc Schink
f36ab02a80 tcl/target: Move GigaDevice configs into vendor directory
Move the configuration files into a dedicated vendor folder as required
by the developer guidelines.

Change-Id: I9ed39e32b6281a9cb8510914690f3f7751b795c8
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9271
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-25 09:26:39 +00:00
Mark O'Donovan
22a7bda336 tcl/target: Fix include paths and standardise max32 configs
Corrected the include path for max32xxx_common.cfg in some files.
Cleaned up and standarised some comments in the max32... files.

Change-Id: I94dcc7ba6868bdd9730f03d3aa76fcdbbae33c3e
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9323
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:19:32 +00:00
Mark O'Donovan
f9ec0ed51f tcl/target: Add max32662.cfg
Config file added and tested on max32662evkit

Change-Id: I20cff70aaf8bb4577ba1e6f658afdd3b96e13145
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9325
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2026-01-23 11:19:02 +00:00
Mark O'Donovan
ab718d66ce tcl/target: Add max32660.cfg
Config file added and tested on max32660evsys

Change-Id: Ia9b77408be881f8b393e833c66762e0deb31221c
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9324
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:42 +00:00
Mark O'Donovan
46f7b185a1 tcl/target: Stop setting adapter speed in max32680.cfg
The assignment of adapter speed 500 was getting overwritten when
max32xxx_common.cfg is sourced at the end.

Also removed incorrect comment.

Change-Id: I49d69073d93dedf28ed69d63ece35758f4707137
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9322
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:25 +00:00
Mark O'Donovan
8f22bf7712 tcl/target: Stop setting adapter speed in max32xxx_common.cfg
Using the default speed is common and is preferred by OpenOCD.
Change-Id: I10f4ab7981aa6f9ae8e0882494287cc4b26b0398
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9382
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-23 11:18:05 +00:00
HAOUES Ahmed
7d688bc500 tcl/target: Add STM32N6x support
Add configuration file for STM32N6

Change-Id: Ia59786858724b6be141ec5f40a8d30459fb26dfb
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9355
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2026-01-18 22:42:48 +00:00
Guillaume Faussard
df14f58662 flash/stm32l4x: support STM32WBA6xx devices
STM32WBA6xx support, based on ST Reference Manual RM0515 Rev 4.

Change-Id: I0ddeadd5008a9f81ec638c9ad230b2f6f0349b5a
Signed-off-by: Guillaume Faussard <guillaume.faussard@withings.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9329
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2026-01-18 22:36:21 +00:00
Guillaume Faussard
b074fea079 tcl/target/stm32wba5x: Fix wrong addresses
According to ST Reference Manual RM093	Rev 7:
- OTP is 0x0BF90000
  2.3.2 Memory map and register boundary addresses, page 84
- DBGMCU registers starts at 0xE0044000
  43.5.1 System debug ROM table, page 1736

Change-Id: I735c6184d9f3fd767d9d776b238e88fcfbe8cc8d
Signed-off-by: Guillaume Faussard <guillaume.faussard@withings.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9328
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-01-18 22:36:07 +00:00
Guillaume Faussard
dab933b3ae tcl/target/stm32wba5x: Update post rename
This configuration file is not for all stm32wbax anymore.

Change-Id: I4399ba7cfdaeaff65a705b6d67e014614aef1b72
Signed-off-by: Guillaume Faussard <guillaume.faussard@withings.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9327
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-01-18 22:35:56 +00:00
Guillaume Faussard
c36f59d9b4 tcl/target/stm32wba5x: Rename configuration file
Prepare to add stm32wba6x support.
The OTP address is different between the stm32wb5xxx and stm32wb6xxx
microcontrollers, so the configuration file can't be the same for both.

Change-Id: Ib7485e0211779d98cca56e73397197b712460c69
Signed-off-by: Guillaume Faussard <guillaume.faussard@withings.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9326
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2026-01-18 22:35:44 +00:00
Marek Kraus
df2eb07086 flash/nor/bl602: add bl602 flash driver
Initial release of Flash bank driver for Bouffalo chips.
The driver currently supports BL602, BL702, BL702L series of chips.
Similar SFlash core is inside of BL808, BL606P and BL616 series,
so those might be supported in future as well.

With adapter speed set to 8000, it can reach speed 140 KiB/s.

Since chips have eXecute In Place support, and they also require
boot config in Flash at offset 0x0, it's required to have properly
crafted linker script, so OpenOCD knows where to write firmware
through gdb.

There is required flash bank parameter, which specifies the chip type.
This is required because BL702 and BL702L have same TAP ID CODE, and
there are no usable indicators to use for automatic chip type
recognition in the chip.

Change-Id: Id57336d447be3c608b39ba3ed143527bfdc0af98
Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8527
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-29 11:55:01 +00:00
Tomas Vanek
3e86eaaf7d tcl/target/gd32vf103: adjust reset workaround to new riscv target
Configure reset-start event to set/clear DM resethaltreq bit.

In reset-assert event check if srst is configured.
Avoid unnecessary double reset if srst is configured.

Write dmcontrol ackhavereset in reset-deassert-post event if necessary.

Change-Id: I06b201bc5651c301912158c1436b9b3e3bc042a0
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9316
Reviewed-by: Tom Hebb <tommyhebb@gmail.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-29 11:54:34 +00:00
Tomas Vanek
41d5fcc0b1 tcl/target/gd32vf103: simplify passing of reset halt option
The pluggable reset events are invoked only in the context of
proc ocd_process_reset_inner, so we can use $halt variable
directly and avoid proc init_reset redefinition.

Change-Id: Ie74c340c51cb2c55d8ffc9f74bb1a1a8e3461515
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9315
Tested-by: jenkins
Reviewed-by: Tom Hebb <tommyhebb@gmail.com>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-29 11:54:16 +00:00
Evgeniy Naydanov
21e345a2f7 target/riscv: tcl/target: move the WA for GD32VF103 to Tcl
The GD32VF103 has a perculiar reset procedure that does not fully comply
with the RISC-V Debug Specification.
Move the workaroung to the `deassert-reset-post` handler.

Change-Id: I153c866a5b7e2dff2552cc92772ce6ed77ad606b
Signed-off-by: Evgeniy Naydanov <eugnay@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9314
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2025-12-29 11:54:03 +00:00
Ryan QIAN
0e2f990c87 tcl: add config file for hpmicro devices and boards
- add board and device config files
- add interface config file for hpmicro evk boards

Change-Id: I8afb0b734b1064d71c4af3c118c7777d0ead9e6b
Signed-off-by: Ryan QIAN <jianghao.qian@hpmicro.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8697
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-12-19 21:17:21 +00:00
Maximilian Schneider
41e165eee2 Change default WORKAREASIZE to 12kbytes for stm32f3x.
stm32f334k8 only has 12kbytes of SRAM and
flashing with the default WORKAREA of 16kbytes
will fail for images > 12k.

Change-Id: If9be0b0e7cd6e4ba15a130d8e06c74e4a0e22a61
Signed-off-by: Maximilian Schneider <max@schneidersoft.net>
Reviewed-on: https://review.openocd.org/c/openocd/+/9283
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-12-14 20:53:22 +00:00
Antonio Borneo
517fd8e4b5 tcl: file_renaming: add missing rename ti_beaglebone-base
Add the file renaming still not covered.

Change-Id: I74e22b3b66a27b9618356272553331ef3ada50cb
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9280
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Marc Schink <dev@zapb.de>
2025-12-13 17:21:09 +00:00
Antonio Borneo
4e3ec2474a tcl: file_renaming: drop automatic replecement check
With 'proc find' able to handle the replacement of '_' to '-',
drop the now unnecessary hardcoded renames.

Change-Id: I67fe3b5de8bad7611b2229fed8d2eefee848eb81
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9279
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm@ti.com>
2025-12-13 17:21:00 +00:00
Nishanth Menon
f8501461c1 tcl/board/ti/*: Rename files using "-" separator
Replace "_" file separator with "-" file separator as recommended by
coding standards guidelines. While doing this, add the files that were
present in previous v0.12.0 release to file_renaming.cfg for this
non-trivial rename.

Signed-off-by: Nishanth Menon <nm@ti.com>
Change-Id: I88685f08f4a0cc580fa3b03f6db0d85061d65b94
Reviewed-on: https://review.openocd.org/c/openocd/+/9236
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-13 17:20:40 +00:00
Nishanth Menon
6a5e4dc2a3 board/ti: Rename _swd_native.cfg as -self-hosted.cfg
Rename the _swd_native.cfg files as -self-hosted.cfg files as a better
representation of what we are using the configuration files to be.

Change-Id: I4eb469a219b83de6a9e7a8dfef5607306f59a7cd
Suggested-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9206
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-12-13 17:20:28 +00:00
Nishanth Menon
13a082fc7e board/ti_*.cfg: Move TI evm platform configurations to board/ti folder
As part of the cfg file cleanups, let us move the TI evms, launchpads
and other development platform configuration files to board/ti folder.

While at this, drop the "ti_" prefix as the folder structure gives us
the details anyways.

Change-Id: I929b88e0cf6527f3181820ad0b9b4744185eabaf
Suggested-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9205
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-13 17:20:16 +00:00
Nishanth Menon
19f5e20715 tcl/board/ti_beagle* move to board/beagle/ folder
Move the BeagleBoard.org Foundation boards to it's own folder. This
allows additional support such as BeagleV-Fire and other non TI SoC
vendor support to be subsequently added.

While doing this,
* Use "-" as separator for the file names as recommended
  by coding standards.
* To maintain compatibility, add the non-trivial renames to
  file_renaming.cfg

Change-Id: Ie916c9bf81fc3922bf19ed9ed2db841549d29ca9
Suggested-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9204
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-12-13 17:20:05 +00:00
Nishanth Menon
2f8ddc0835 tcl/target: Move TI targets to ti folder
Move the ti targets to a TI folder. Since the folder is ti, we can
drop the "ti" prefix from the files themselves.

Done via the following script:

 mkdir target/ti
 FILES=`ls target/ti*.cfg target/omap*.cfg target/am335x.cfg
           target/amdm37x.cfg target/icepick.cfg target/stellaris.cfg
		   target/davinci.cfg`
 for cname in $FILES
 do
   bname=`basename $cname`
   nname=`echo $bname|sed -e "s/^ti-//g"|sed -e "s/ti_//g"`
   npath="target/ti/$nname"
   echo "$cname => $npath"
   fref=`git grep $cname .|cut -d ':' -f1|sort -u`
   sed -i -e "s&$cname&$npath&g" $fref
   git mv $cname $npath
 done

Change-Id: I9f94dc6bb01f73721d4ff96be92cb51de2cbf0e2
Suggested-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9203
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-12-13 17:19:48 +00:00
Niklas Gürtler
5479c58d23 tcl/target/stm32l4, tcl/target/stm32w*: Fix clock configuration
For stm32l4, stm32wbx, stm32wlx the target tcl scripts try to change the
MSI oscillator's speed to 24 MHz before boosting the interface
frequency, but don't clear the RCC_CR_MSIRANGE field correctly before.
This causes the register write access to fail and leaves the clock
frequency unchanged. For the stm32wlx, the script also neglects to set
the MSIRGSEL bit, such that the frequency setting is not actually
applied.

The issue appears to not cause a problem when using an ST-Link adapter.
When using an FT4232HP, communication to the target fails after the
reset-init event, possibly because this adapter actually supports the
higher interface frequency.

This commit fixes the register accesses to make sure the RCC_CR_MSIRANGE
is cleared to zero before OR-ing the new value. For the stm32wlx, also
set the MSIRGSEL bit. Just to be safe, also fix the write access to the
FLASH_ACR_LATENCY field to clear it before OR-ing, even though it should
be zero at reset anyways.

Change-Id: Ie8320fa6ee2086981c0b1f3c18f51e171709078d
Signed-off-by: Niklas Gürtler <profclonk@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9282
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2025-12-12 19:14:30 +00:00
Thomas Hebb
8115c28663 tcl/target/gd32vf103: copy a few minor settings from riscv-openocd
These changes bring over some lines from the independently-developed
gd32vf103.cfg that I contributed[1] to the riscv-openocd fork of
OpenOCD. They're all minor, so I'm squashing them into one review. The
changes are as follows:

 - Add boundary scan TAP.
 - Mention inconsistency of CPU ID between vendor SDK and real hardware.
 - Specify that there's no MMU so we don't look for one at runtime.

Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Change-Id: Ie8033eff436d6dbdc3eab156769a8908ccb547f6
Reviewed-on: https://review.openocd.org/c/openocd/+/6959
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-12-12 17:41:31 +00:00
Antonio Borneo
fc8f939d95 Support two-wire cJTAG OSCAN1 and JScan3 using FTDI adapters
cJTAG OSCAN1, in lieu of 4-wire JTAG, is starting to be a configuration
option for some SiFive hardware. An FTDI-based adapter that can be
configured to drive the bidirectional pin TMSC is assumed for this
topology. Specifically, the Olimex ARM-USB-TINY-H with the ARM-JTAG-SWD
adapter, connected to a SiFive cJTAG-enabled target board is the only
known concrete topology, currently. But in theory, other FTDI based
devices that can drive a two-wire bidirectional signaling pattern could
be made to work in this scheme in the future.

These code changes are offered as a way to drive that topology. It's
translating IR/DR and JTAG traversal commands to the two-wire clocking
and signaling.

See:
- https://github.com/riscv-collab/riscv-openocd/pull/320
- https://github.com/riscv-collab/riscv-openocd/pull/736

Signed-off-by: Greg Savin <greg.savin@sifive.com>
Signed-off-by: mrv96 <mrv96@users.noreply.github.com>
Signed-off-by: Tim Newsome <tim@sifive.com>
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Change-Id: Ia1daa2c01227c4b0005be947b2bb0de81a800874
Reviewed-on: https://review.openocd.org/c/openocd/+/6981
Tested-by: jenkins
2025-11-30 10:23:52 +00:00
Tomas Vanek
3903c80480 tcl/interface/raspberrypi-native: adjust speed offsets
Change 7732: jtag/drivers/bcm2835gpio: Support all 54 GPIO pins [1]
reduces the time needed for GPIO handling.

Adjust the speed offsets to the new and faster bcm2835gpio code.

Measured with Sigrok/PulseView, sampled at 800 MHz.
Configured as SWD with the fast path in the driver - other
modes are expected to be slower.
Adjusted to keep all half periods of SWCLK in the sampled poll
sequence longer or equal than the half period of the nominal
adapter speed.

Link: [1] https://review.openocd.org/c/openocd/+/7732
Change-Id: Ia9e932dfd7547c8011c1d20d9e90bc0294050e8a
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9234
Tested-by: jenkins
Reviewed-by: Vincent Fazio <vfazio@gmail.com>
2025-11-18 06:28:35 +00:00
Tomas Vanek
d7fb95d800 tcl/target: update riscv commands in configs
Adjust configs for the changed command riscv virt2phys_mode.

Change-Id: Ib365bbb74b3b17e8f0b594e08ab73871f86cf89e
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9190
Tested-by: jenkins
2025-11-12 20:52:47 +00:00
Erhan Kurubas
04c6a6ee0e tcl: add Espressif RISC-V config files
Add configuration files for Espressif RISC-V based chips:
- ESP32-C2, ESP32-C3, ESP32-C6, ESP32-H2 target configs
- Board configs for builtin USB-JTAG and FTDI interfaces

while adding the new config files:
- Fix indentation in existing Espressif config files
- Adapt esp_common.cfg with RISC-V support
- Add explicit 'transport select jtag' to interface configs to avoid
  'DEPRECATED: auto-selecting transport' warning

Change-Id: I45fcbca2fe50888750e2e98a0a6773de86aad6d0
Signed-off-by: Erhan Kurubas <erhan.kurubas@espressif.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9195
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-11-08 15:59:03 +00:00
Daniel Anselmi
52ea420dd2 ipdbg: simplify command chains
simplify ipdbg commands:
$hub_name ipdbg start -> $hub_name start

ipdbg/fix: While there, handle the multi-word deprecated commands
by adding quotes.

Change-Id: I5a56df2dbf2a5710442242727fa9384e5541ed53
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Fixes: https://sourceforge.net/p/openocd/tickets/434/
Reported-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8873
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-11-08 15:57:05 +00:00
HAOUES Ahmed
1afb3e75f0 tcl/target/stm32h7x: modify speed at OpenOCD initialization and
drop unneeded reset-init event

The speed is set to 1800 kHz at initialization, but increases to 4000 kHz
before flash programming, with debugging continuing at this higher speed.
So, setting 4000 kHz from the start makes sense.

Change-Id: I6bccb5837c624943212b727368b40153e42ccebb
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9027
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2025-11-06 08:10:34 +00:00
HAOUES Ahmed
03b79387cc flash/stm32h7x: support STM32H7R/H7Sx
The STM32H7R/H7Sx has a flash size up to 64 Kb
Change-Id: I2e9d80758d1bc88defdd6bbd1787026373b39fa4
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8890
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2025-11-06 08:10:15 +00:00
Tomas Vanek
a482b78941 tcl/target: drop more useless reset-start events
These target configs implement neither device clock setting
nor boost of adapter speed in reset-init event.
Therefore it's not necessary to set back the safe speed in reset-start

Change-Id: I7dcd6f6d1a977388c7a0bc45fe46ede955bd45cb
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9129
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-11-02 13:42:37 +00:00
Tomas Vanek
c168761983 tcl/target/stm32g4x: drop useless reset-start event
There is no boost of adapter speed in reset-init event
so it's not necessary to set back the safe speed in reset-start

Change-Id: I8b78442471390f7183c39d67b29788cccc98d018
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9128
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: zapb <dev@zapb.de>
Reviewed-by: Ahmed Haoues <ahmed.haoues@st.com>
2025-11-02 13:42:11 +00:00