1source [find board/st_nucleo_f103rb.cfg]
2
3reset_config connect_assert_srst
4
5$_TARGETNAME configure -event gdb-attach {
6        echo "Debugger attaching: halting execution"
7        reset halt
8        gdb_breakpoint_override hard
9}
10
11$_TARGETNAME configure -event gdb-detach {
12        echo "Debugger detaching: resuming execution"
13        resume
14}
15
16rename init old_init
17proc init {} {
18        old_init
19        reset halt
20}
21