From b164b65b3be74601c306f5880cbd20c4ddc5bf3b Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sun, 1 Feb 2026 13:32:20 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.openocd.org/c/openocd/+/9423 Reviewed-by: Tomas Vanek Reviewed-by: Ahmed Haoues Tested-by: jenkins --- tcl/board/st_nucleo_c0.cfg | 2 -- tcl/target/stm32c0x.cfg | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tcl/board/st_nucleo_c0.cfg b/tcl/board/st_nucleo_c0.cfg index 845b7b50e..a4c0c4f42 100644 --- a/tcl/board/st_nucleo_c0.cfg +++ b/tcl/board/st_nucleo_c0.cfg @@ -2,8 +2,6 @@ source [find interface/stlink.cfg] -transport select swd - source [find target/stm32c0x.cfg] reset_config srst_only diff --git a/tcl/target/stm32c0x.cfg b/tcl/target/stm32c0x.cfg index d01512031..35c0c5dc4 100644 --- a/tcl/target/stm32c0x.cfg +++ b/tcl/target/stm32c0x.cfg @@ -4,8 +4,8 @@ # # stm32c0 devices support SWD transports only. # +transport select swd -source [find target/swj-dp.tcl] source [find mem_helper.tcl] if { [info exists CHIPNAME] } { @@ -32,7 +32,7 @@ if { [info exists CPUTAPID] } { set _CPUTAPID 0x0bc11477 } -swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID +swd newdap $_CHIPNAME cpu -expected-id $_CPUTAPID dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu