diff --git a/boards/arm/nucleo_h723zg/support/openocd.cfg b/boards/arm/nucleo_h723zg/support/openocd.cfg index c70e4ae5478..fa8097598db 100644 --- a/boards/arm/nucleo_h723zg/support/openocd.cfg +++ b/boards/arm/nucleo_h723zg/support/openocd.cfg @@ -13,11 +13,12 @@ set BOARDNAME NUCLEO-H723ZG source [find target/stm32h7x.cfg] +# Use connect_assert_srst here to be able to programm +# even when core is in sleep mode reset_config srst_only srst_nogate connect_assert_srst $_CHIPNAME.cpu0 configure -event gdb-attach { echo "Debugger attaching: halting execution" - reset halt gdb_breakpoint_override hard } @@ -25,3 +26,11 @@ $_CHIPNAME.cpu0 configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } + +# Due to the use of connect_assert_srst, running gdb requires +# to reset halt just after openocd init. +rename init old_init +proc init {} { + old_init + reset halt +} diff --git a/boards/arm/nucleo_h745zi_q/support/openocd.cfg b/boards/arm/nucleo_h745zi_q/support/openocd.cfg index 4f1ef697e3f..391d0d917a1 100644 --- a/boards/arm/nucleo_h745zi_q/support/openocd.cfg +++ b/boards/arm/nucleo_h745zi_q/support/openocd.cfg @@ -6,11 +6,12 @@ source [find board/st_nucleo_h745zi.cfg] +# Use connect_assert_srst here to be able to programm +# even when core is in sleep mode reset_config srst_only srst_nogate connect_assert_srst $_CHIPNAME.cpu0 configure -event gdb-attach { echo "Debugger attaching: halting execution" - reset halt gdb_breakpoint_override hard } @@ -18,3 +19,11 @@ $_CHIPNAME.cpu0 configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } + +# Due to the use of connect_assert_srst, running gdb requires +# to reset halt just after openocd init. +rename init old_init +proc init {} { + old_init + reset halt +} diff --git a/boards/arm/stm32h747i_disco/support/openocd_stm32h747i_disco_m7.cfg b/boards/arm/stm32h747i_disco/support/openocd_stm32h747i_disco_m7.cfg index efacb46ae9c..040feadc02e 100644 --- a/boards/arm/stm32h747i_disco/support/openocd_stm32h747i_disco_m7.cfg +++ b/boards/arm/stm32h747i_disco/support/openocd_stm32h747i_disco_m7.cfg @@ -5,11 +5,12 @@ transport select hla_swd source [find target/stm32h7x.cfg] +# Use connect_assert_srst here to be able to programm +# even when core is in sleep mode reset_config srst_only srst_nogate connect_assert_srst $_CHIPNAME.cpu0 configure -event gdb-attach { echo "Debugger attaching: halting execution" - reset halt gdb_breakpoint_override hard } @@ -17,3 +18,11 @@ $_CHIPNAME.cpu0 configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume } + +# Due to the use of connect_assert_srst, running gdb requires +# to reset halt just after openocd init. +rename init old_init +proc init {} { + old_init + reset halt +}