Skip to content

Commit dcf4201

Browse files
erwangommahadevan108
authored andcommitted
boards: stm32h735g_disco: Provide a working openocd configuration
Openocd configuration for this board was broken. Fix it. Tested on both SDK 0.15.0 and SDK 0.15.1-RC1. Debug is also functional Fixes #50306 Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 6cb0967 commit dcf4201

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed
Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,30 @@
1-
source [find interface/stlink.cfg]
1+
source [find interface/stlink-dap.cfg]
2+
transport select dapdirect_swd
23

3-
transport select hla_swd
4+
set WORKAREASIZE 0x2000
5+
set CHIPNAME STM32H735IG
6+
set BOARDNAME STM23H735G_DK
47

58
source [find target/stm32h7x.cfg]
69

7-
reset_config connect_assert_srst
10+
# Use connect_assert_srst here to be able to program
11+
# even when core is in sleep mode
12+
reset_config srst_only srst_nogate connect_assert_srst
13+
14+
$_CHIPNAME.cpu0 configure -event gdb-attach {
15+
echo "Debugger attaching: halting execution"
16+
gdb_breakpoint_override hard
17+
}
18+
19+
$_CHIPNAME.cpu0 configure -event gdb-detach {
20+
echo "Debugger detaching: resuming execution"
21+
resume
22+
}
23+
24+
# Due to the use of connect_assert_srst, running gdb requires
25+
# to reset halt just after openocd init.
26+
rename init old_init
27+
proc init {} {
28+
old_init
29+
reset halt
30+
}

0 commit comments

Comments
 (0)