|
From: openocd-gerrit <ope...@us...> - 2025-07-25 16:52:13
|
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 5d3f53363bc461fbc88f4e690c08f85057e17f5d (commit)
via 9bb6fa67ca6de6f725df78ac8a415b5b47fb9420 (commit)
from 1f56ea647d63b7495d513227622413f1826d75f9 (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 5d3f53363bc461fbc88f4e690c08f85057e17f5d
Author: Antonio Borneo <bor...@gm...>
Date: Fri Jul 4 16:29:47 2025 +0200
tcl: stm32mp13x: modify handshake to open debug port
Align the target script to the handshake implemented in the latest
version of stm32wrapper4dbg to get access to the debug port.
Change-Id: Ia1c7773330fda776abb4385331fddbf431d11c39
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8983
Tested-by: jenkins
diff --git a/tcl/target/st/stm32mp13x.cfg b/tcl/target/st/stm32mp13x.cfg
index bcf25c904..164e0ff1f 100644
--- a/tcl/target/st/stm32mp13x.cfg
+++ b/tcl/target/st/stm32mp13x.cfg
@@ -46,7 +46,7 @@ dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.tap -ignore-syspwrupack
# NOTE: do not change the order of target create
target create $_CHIPNAME.ap1 mem_ap -dap $_CHIPNAME.dap -ap-num 1
target create $_CHIPNAME.axi mem_ap -dap $_CHIPNAME.dap -ap-num 0
-target create $_CHIPNAME.cpu cortex_a -dap $_CHIPNAME.dap -ap-num 1 -coreid 0 -dbgbase 0xE00D0000
+target create $_CHIPNAME.cpu cortex_a -dap $_CHIPNAME.dap -ap-num 1 -coreid 0 -dbgbase 0xE00D0000 -defer-examine
$_CHIPNAME.cpu cortex_a maskisr on
$_CHIPNAME.cpu cortex_a dacrfixup on
@@ -76,27 +76,59 @@ proc axi_nsecure {} {
axi_secure
-proc dbgmcu_enable_debug {} {
+# mmw with target selection
+proc target_mmw {target reg setbits clearbits} {
+ set val [eval $target read_memory $reg 32 1]
+ set val [expr {($val & ~$clearbits) | $setbits}]
+ eval $target mww $reg $val
+}
+
+lappend _telnet_autocomplete_skip _enable_debug
+# Uses AP1
+proc _enable_debug {} {
# keep clock enabled in low-power
- ## catch {$::_CHIPNAME.ap1 mww 0xe0081004 0x00000004}
+ catch {$::_CHIPNAME.ap1 mww 0xe0081004 0x00000004}
# freeze watchdog 1 and 2 on core halted
catch {$::_CHIPNAME.ap1 mww 0xe008102c 0x00000004}
catch {$::_CHIPNAME.ap1 mww 0xe008104c 0x00000008}
}
-proc toggle_cpu_dbg_claim0 {} {
- # toggle CPU0 DBG_CLAIM[0]
- $::_CHIPNAME.ap1 mww 0xe00d0fa0 1
- $::_CHIPNAME.ap1 mww 0xe00d0fa4 1
+lappend _telnet_autocomplete_skip _handshake_with_wrapper
+# Uses AP1
+proc _handshake_with_wrapper { halt } {
+ set dbgmcu_cr 0
+ catch {set dbgmcu_cr [eval $::_CHIPNAME.ap1 read_memory 0xe0081004 32 1]}
+ if {[expr {($dbgmcu_cr & 0x07) == 0x00}]} {
+ echo "\nWARNING: FSBL wrapper not detected. Board in dev boot mode?\n"
+ return
+ }
+
+ if { $halt } {
+ $::_CHIPNAME.ap1 arp_halt
+ $::_CHIPNAME.ap1 mww 0xe00d0300 0
+ target_mmw $::_CHIPNAME.ap1 0xe00d0088 0x00004000 0
+ }
+
+ $::_CHIPNAME.ap1 mww 0xe0081004 0x7
}
# FIXME: most of handlers below will be removed once reset framework get merged
+$_CHIPNAME.ap1 configure -event reset-assert-post {
+ adapter assert srst
+}
+
$_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
+ $::_CHIPNAME.cpu arp_examine
+ if { $halt } {
+ $::_CHIPNAME.cpu arp_halt
+ }
+}
+
+$_CHIPNAME.ap1 configure -event examine-end {
+ _enable_debug
+ $::_CHIPNAME.cpu arp_examine
}
-$_CHIPNAME.cpu configure -event reset-deassert-pre {$::_CHIPNAME.cpu arp_examine}
-$_CHIPNAME.cpu configure -event reset-deassert-post {toggle_cpu_dbg_claim0; dbgmcu_enable_debug}
-$_CHIPNAME.ap1 configure -event examine-start {dap init}
-$_CHIPNAME.ap1 configure -event examine-end {dbgmcu_enable_debug}
commit 9bb6fa67ca6de6f725df78ac8a415b5b47fb9420
Author: Antonio Borneo <bor...@gm...>
Date: Fri Jul 4 16:50:46 2025 +0200
tcl: move STM32 MPU files in vendor folder
Move the existing files for STM32MP13x and STM32MP15x in the
folder "st".
Rename the board files using the correct names.
While there, add the missing URL to one of the boards.
Change-Id: If8b92f55e3390ebc75df6a2ea09fcf798ea0b8cf
Signed-off-by: Antonio Borneo <bor...@gm...>
Reviewed-on: https://review.openocd.org/c/openocd/+/8982
Tested-by: jenkins
Reviewed-by: zapb <de...@za...>
diff --git a/tcl/board/stm32mp13x_dk.cfg b/tcl/board/st/stm32mp135f-dk.cfg
similarity index 83%
rename from tcl/board/stm32mp13x_dk.cfg
rename to tcl/board/st/stm32mp135f-dk.cfg
index 8ece24844..2259e0425 100644
--- a/tcl/board/stm32mp13x_dk.cfg
+++ b/tcl/board/st/stm32mp135f-dk.cfg
@@ -7,6 +7,6 @@ source [find interface/stlink.cfg]
transport select swd
-source [find target/stm32mp13x.cfg]
+source [find target/st/stm32mp13x.cfg]
reset_config srst_only
diff --git a/tcl/board/stm32mp15x_dk2.cfg b/tcl/board/st/stm32mp157f-dk2.cfg
similarity index 72%
rename from tcl/board/stm32mp15x_dk2.cfg
rename to tcl/board/st/stm32mp157f-dk2.cfg
index ba1c7f78a..b193ae3a0 100644
--- a/tcl/board/stm32mp15x_dk2.cfg
+++ b/tcl/board/st/stm32mp157f-dk2.cfg
@@ -3,11 +3,12 @@
# board MB1272B
# http://www.st.com/en/evaluation-tools/stm32mp157a-dk1.html
# http://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html
+# http://www.st.com/en/evaluation-tools/stm32mp157f-dk2.html
source [find interface/stlink.cfg]
transport select swd
-source [find target/stm32mp15x.cfg]
+source [find target/st/stm32mp15x.cfg]
reset_config srst_only
diff --git a/tcl/file_renaming.cfg b/tcl/file_renaming.cfg
index 0a3c7ba65..20679b6ab 100644
--- a/tcl/file_renaming.cfg
+++ b/tcl/file_renaming.cfg
@@ -17,6 +17,8 @@ set _file_renaming {
board/nordic_nrf51822_mkit.cfg board/nordic/nrf51822-mkit.cfg
board/nordic_nrf51_dk.cfg board/nordic/nrf51-dk.cfg
board/nordic_nrf52_dk.cfg board/nordic/nrf52-dk.cfg
+ board/stm32mp13x_dk.cfg board/st/stm32mp135f-dk.cfg
+ board/stm32mp15x_dk2.cfg board/st/stm32mp157f-dk2.cfg
target/nrf51.cfg target/nordic/nrf51.cfg
target/nrf52.cfg target/nordic/nrf52.cfg
target/nrf53.cfg target/nordic/nrf53.cfg
diff --git a/tcl/target/stm32mp13x.cfg b/tcl/target/st/stm32mp13x.cfg
similarity index 100%
rename from tcl/target/stm32mp13x.cfg
rename to tcl/target/st/stm32mp13x.cfg
diff --git a/tcl/target/stm32mp15x.cfg b/tcl/target/st/stm32mp15x.cfg
similarity index 100%
rename from tcl/target/stm32mp15x.cfg
rename to tcl/target/st/stm32mp15x.cfg
-----------------------------------------------------------------------
Summary of changes:
.../{stm32mp13x_dk.cfg => st/stm32mp135f-dk.cfg} | 2 +-
.../{stm32mp15x_dk2.cfg => st/stm32mp157f-dk2.cfg} | 3 +-
tcl/file_renaming.cfg | 2 +
tcl/target/{ => st}/stm32mp13x.cfg | 58 +++++++++++++++++-----
tcl/target/{ => st}/stm32mp15x.cfg | 0
5 files changed, 50 insertions(+), 15 deletions(-)
rename tcl/board/{stm32mp13x_dk.cfg => st/stm32mp135f-dk.cfg} (83%)
rename tcl/board/{stm32mp15x_dk2.cfg => st/stm32mp157f-dk2.cfg} (72%)
rename tcl/target/{ => st}/stm32mp13x.cfg (67%)
rename tcl/target/{ => st}/stm32mp15x.cfg (100%)
hooks/post-receive
--
Main OpenOCD repository
|