Commit Graph

1476 Commits

Author SHA1 Message Date
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
Joao Lima
f5478eb112 tcl/target/ti_k3.cfg: Add support for direct memory access via SWD
Adds support for direct memory access via SWD emulation for AM64x and
J784s4 boards, configuring addresses and parameters required for
direct memory operations.

Change-Id: Iebc16612b3990b2ef19ddc4143b66ab1bcbfe0f3
Signed-off-by: Joao Lima <joao.lima@hbkworld.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9021
Reviewed-by: Nishanth Menon <nm@ti.com>
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-11-02 13:41:14 +00:00
Joao Lima
c1cca2155b tcl/board/ti_*_swd_native.cfg: Add support for direct memory access via SW
Add support for SWD emulation as a transport method for
direct memory operations of boards TI AM64x and TI J784s4

Change-Id: I17fe9b2bef5c58886625bfdb88d92645ba4d7da7
Signed-off-by: Joao Lima <joao.lima@hbkworld.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9020
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Nishanth Menon <nm@ti.com>
2025-11-02 13:41:01 +00:00
Marc Schink
6d51e6b900 tcl/interface: Remove flashlink config
Remove the configuration file, a replacement is already available.

Link the old filename to the new configuration file to ensure backwards
compatibility.

Change-Id: I77cbd62d805b1c9b9bb8f56a823c3f6476d1a5a9
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9150
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-10-11 16:13:44 +00:00
Marc Schink
4805ecad76 tcl/interface: Remove chameleon config
Remove the configuration file, a replacement is already available.

Link the old filename to the new configuration file to ensure backwards
compatibility.

Change-Id: I11361e471bb7ec277a850f956e51cd7d0fab408d
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9149
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-10-11 16:13:34 +00:00
Marek Kraus
382f067b6e tcl/target: add Bouffalo Lab BL616 chip series support
Adds support for BL616 series of chips, BL616 and BL618.
No flash bank support yet.

BL616 in comparison with BL602-series have new architecture,
using T-Head E907 RISC-V cores, instead of SiFive ones.

As BL602-series, the ndmreset bit in RISC-V Debug Module
does not reset the chip as it should, so we need to do it
manually with registers almost the same way as in BL602.

Additionally, JTAG Debug Transport Module in the chip have wrongly
implemented Test-Logic-Reset state, causing automatic chain scan
not working at all after initial JTAG usage. This is because
Test-Logic-State do not set IR instruction to IDCODE,
as it should by JTAG spec. We can fix this by getting state machine
to known state and configure IR instruction manually to IDCODE.
This bug was so far found in T-Head C906 and E907 IP cores.

This patch was tested heavily and works reliably on
BL616, BL618 and QCC74X.

Change-Id: Idc80a702e817d78fc0ca925572c68d4d0c28ce4e
Signed-off-by: Marek Kraus <gamelaster@outlook.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9145
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-10-11 16:07:02 +00:00
EasyDevKits
5fa74d4ee8 jtag/ch347: Refine driver and configs for EasyDevKits adapters
This commit improves support for CH347-based JTAG adapters:

- configure.ac: removed "Mode3" restriction (CH347F does not require mode).
- configs: added board config for ESP32-WROVER-E WCH JTAG DevKit and
  ESP32-WROVER-E FTDI JTAG DevKit
- ch347 driver: removed `ch347 activity_led` command; activity LED
  is now controlled via the generic `adapter gpio led` command.
- doc/openocd.texi: updated documentation accordingly.

Change-Id: I5524290297adcc004e00af919181868d2b6303af
Signed-off-by: EasyDevKits <info@easydevkits.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9015
Reviewed-by: zapb <dev@zapb.de>
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-10-11 16:02:18 +00:00
Daniel Anselmi
3b03e439de tcl/board/digilent_zybo: clarify supported/tested hardware
Clarify that this config has been tested with the Zybo board but
not with the Zybo Z7 board.

Change-Id: Id826480444364e5916f25c1c219c5ddaa3ec827d
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/9019
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-09-27 14:52:45 +00:00
Paul Fertser
4ae92ee3b9 tcl/target/rp2040: fix reset-init rom_api_call invocation
The reset-init handler needs to call the ROM API function to enable
XIP from flash.

Correct syntax for this command is to supply two-letter function code
as the first argument, flash bank number sholudn't be there.

Reported-by: Thomas D. Dean <tomdean@wavecable.com>
Fixes: 376d11c2e3
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Change-Id: I94713630300ead32bc9db6a1a77658fa5d5214d4
Reviewed-on: https://review.openocd.org/c/openocd/+/9134
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-09-20 04:48:15 +00:00
Tomas Vanek
874be7dc03 tcl/target/rp2040: fix typo in the comment
and use better wording.

Change-Id: I733283a957957354bdf527240be73b711631e372
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9112
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-09-12 16:40:52 +00:00
Peter Lawrence
c2cfeee471 add tcl/board/pico2-debug.cfg; update tcl/board/pico-debug.cfg
pico-debug and pico2-debug are virtual CMSIS-DAP adapters that
run on the otherwise dormant second core of the RP2040 and RP2350
respectively.

Change-Id: Ifd7dcbbabeb86c738cc58854add0e897633197de
Signed-off-by: Peter Lawrence <majbthrd@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9099
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
2025-09-10 05:01:03 +00:00
Daniel Anselmi
9a5212560b tcl/board: Add digilent Zybo Zynq-7000 board
Add configuration for digilents Zybo Z7 board.
Documentation:
https://digilent.com/reference/programmable-logic/zybo-z7/start

Change-Id: I4b607e60f2bf531ee8f96739deb737376248fb8b
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Reviewed-on: https://review.openocd.org/c/openocd/+/8088
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
2025-09-06 08:19:37 +00:00
Marc Schink
7bc74de62d adapter: Rework parallel port driver
Make the driver more flexible and define adapter-specific configurations
in Tcl instead of C using the adapter GPIO subsystem.

The rework also includes coding style fixes and improvements of the
documentation. All modifications are done such that backwards
compatibility is ensured.

Tested with Olimex ARM-JTAG cable [1] and APM32F103 target device on
Linux and FreeBSD. The driver works on Linux using direct I/O and PPDEV.
On FreeBSD, only PPDEV works. The build with direct I/O already failed
before the patch. This problem will be fixed in a subsequent patch.

The patch is not tested on Windows because there is no documentation
for it.

[1] https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG/

Change-Id: Ib671d52a919eaf2959cf6365f2c8004257ae074c
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/8943
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-09-06 08:19:09 +00:00
Brian Kuschak
fcff4b712c jtag/drivers/cmsis_dap: add new backend cmsis_dap_tcp
Create a new backend for cmsis_dap driver that allows CMSIS-DAP protocol
to run over TCP/IP instead of USB.

An example implementation of the firmware for an SWD programmer that
uses this cmsis_dap_tcp protocol can be found at the link below.
https://github.com/bkuschak/cmsis_dap_tcp_esp32

Using this cmsis_dap_tcp backend with the firmware above on an ESP32-C6
programmer and STM32F401RE target shows the following performance:
- loading 96KB image to RAM: 80 KB/sec
- dumping 96KB image from RAM: 72 KB/sec
- flashing 512KB image completes in about 13.5 seconds (including erase,
  program, and verify).

Change-Id: I6e3e45016bd16ef2259561b1046788f5536b0687
Signed-off-by: Brian Kuschak <bkuschak@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8973
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
2025-09-01 07:46:39 +00:00
HAOUES Ahmed
64ed1c74d5 flash/stm32l4x: Support STM32U37/U38x devices
STM32U37/U38x devices have 1Mb flash (split into pages of 4 Kb)

Note: add wait for the BSY bit to be cleared in FLASH_SR

Change-Id: I8208aa81951b9e2f7b0a6bbfce3f7c8ad0f78ade
Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8874
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
2025-09-01 07:43:30 +00:00