1source [find interface/stlink-dap.cfg] 2transport select "dapdirect_swd" 3 4set WORKAREASIZE 0x8000 5set CHIPNAME STM32H7S7XX 6set BOARDNAME STM32H7S78_DK 7 8# Enable debug when in low power modes 9set ENABLE_LOW_POWER 1 10 11# Stop Watchdog counters when halt 12set STOP_WATCHDOG 1 13 14# Reset configuration 15# use hardware reset, connect under reset 16# connect_assert_srst needed if low power mode application running (WFI...) 17# reset_config srst_only srst_nogate connect_assert_srst 18 19#set CONNECT_UNDER_RESET 1 20#set CORE_RESET 0 21 22source [find target/stm32h7rx.cfg] 23 24 25$_CHIPNAME.cpu0 configure -event gdb-attach { 26 echo "Debugger attaching: halting execution" 27 gdb_breakpoint_override hard 28} 29 30$_CHIPNAME.cpu0 configure -event gdb-detach { 31 echo "Debugger detaching: resuming execution" 32 resume 33} 34 35# Due to the use of connect_assert_srst, running gdb requires 36# to reset halt just after openocd init. 37rename init old_init 38proc init {} { 39 old_init 40 reset halt 41} 42