source [find interface/stlink.cfg]

transport select hla_swd

source [find target/stm32l5x.cfg]

# use hardware reset
reset_config srst_only srst_nogate

$_TARGETNAME configure -event gdb-attach {
        echo "Debugger attaching: halting execution"
        reset halt
        gdb_breakpoint_override hard
}

$_TARGETNAME configure -event gdb-detach {
        echo "Debugger detaching: resuming execution"
        resume
}