source [find interface/jlink.cfg] transport select swd set CHIPNAME atsamd21g18a source [find target/at91samdXX.cfg] reset_config trst_only $_TARGETNAME configure -event gdb-attach { echo "Debugger attaching: halting execution" reset halt } $_TARGETNAME configure -event gdb-detach { echo "Debugger detaching: resuming execution" resume }