|
From: openocd-gerrit <ope...@us...> - 2026-03-08 10:19:09
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via a5a9121ad66b2d2ead1c3d44a7d10a19d9e98fac (commit)
from 687dd5c5df4583ec0ef4b9dcc9ebd4a6c1968dd8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a5a9121ad66b2d2ead1c3d44a7d10a19d9e98fac
Author: Antonio Borneo <bor...@gm...>
Date: Fri Jan 30 09:37:47 2026 +0100
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 <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/9462
Tested-by: jenkins
diff --git a/tcl/target/st/stm32mp13x.cfg b/tcl/target/st/stm32mp13x.cfg
index 164e0ff1f..acd2ce0ed 100644
--- a/tcl/target/st/stm32mp13x.cfg
+++ b/tcl/target/st/stm32mp13x.cfg
@@ -119,6 +119,8 @@ $_CHIPNAME.ap1 configure -event reset-assert-post {
$_CHIPNAME.ap1 configure -event reset-deassert-pre {
adapter deassert srst deassert trst
+ catch {dap init}
+ catch {$::_CHIPNAME.dap apid 1}
$::_CHIPNAME.ap1 arp_examine
_handshake_with_wrapper $halt
_enable_debug
diff --git a/tcl/target/st/stm32mp15x.cfg b/tcl/target/st/stm32mp15x.cfg
index 979a5a491..3d7225271 100644
--- a/tcl/target/st/stm32mp15x.cfg
+++ b/tcl/target/st/stm32mp15x.cfg
@@ -175,6 +175,8 @@ $_CHIPNAME.ap1 configure -event reset-assert-post {
$_CHIPNAME.ap1 configure -event reset-deassert-pre {
adapter deassert srst deassert trst
+ catch {dap init}
+ catch {$::_CHIPNAME.dap apid 1}
$::_CHIPNAME.ap1 arp_examine
_handshake_with_wrapper $halt
if { $::EN_CA7_0 } {
diff --git a/tcl/target/st/stm32mp21x.cfg b/tcl/target/st/stm32mp21x.cfg
index f4073a9f5..9a102c6d9 100644
--- a/tcl/target/st/stm32mp21x.cfg
+++ b/tcl/target/st/stm32mp21x.cfg
@@ -182,6 +182,8 @@ $_CHIPNAME.axi configure -event reset-assert-post {
$_CHIPNAME.axi configure -event reset-deassert-pre {
adapter deassert srst deassert trst
+ catch {dap init}
+ catch {$::_CHIPNAME.dap apid 0}
$::_CHIPNAME.axi arp_examine
set is_dev_boot [_enable_dbgmcu_on_devboot]
if { !$is_dev_boot } {
diff --git a/tcl/target/st/stm32mp23x.cfg b/tcl/target/st/stm32mp23x.cfg
index 015f816e4..7ca1830e3 100644
--- a/tcl/target/st/stm32mp23x.cfg
+++ b/tcl/target/st/stm32mp23x.cfg
@@ -171,7 +171,8 @@ $_CHIPNAME.axi configure -event reset-assert-post {
$_CHIPNAME.axi configure -event reset-deassert-pre {
adapter deassert srst deassert trst
-
+ catch {dap init}
+ catch {$::_CHIPNAME.dap apid 0}
$::_CHIPNAME.ap0 arp_examine
_handshake_with_wrapper $halt
diff --git a/tcl/target/st/stm32mp25x.cfg b/tcl/target/st/stm32mp25x.cfg
index 6807d64a1..92410c7b5 100644
--- a/tcl/target/st/stm32mp25x.cfg
+++ b/tcl/target/st/stm32mp25x.cfg
@@ -191,7 +191,8 @@ $_CHIPNAME.axi configure -event reset-assert-post {
$_CHIPNAME.axi configure -event reset-deassert-pre {
adapter deassert srst deassert trst
-
+ catch {dap init}
+ catch {$::_CHIPNAME.dap apid 0}
$::_CHIPNAME.ap0 arp_examine
_handshake_with_wrapper $halt
-----------------------------------------------------------------------
Summary of changes:
tcl/target/st/stm32mp13x.cfg | 2 ++
tcl/target/st/stm32mp15x.cfg | 2 ++
tcl/target/st/stm32mp21x.cfg | 2 ++
tcl/target/st/stm32mp23x.cfg | 3 ++-
tcl/target/st/stm32mp25x.cfg | 3 ++-
5 files changed, 10 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|