2017-06-15 05:40:31 +08:00
|
|
|
if {[info exists env(OPENOCD_INTERFACE)]} {
|
|
|
|
set INTERFACE $env(OPENOCD_INTERFACE)
|
|
|
|
} else {
|
|
|
|
# By default connect over Debug USB port using the EDBG chip
|
|
|
|
set INTERFACE "cmsis-dap"
|
|
|
|
}
|
|
|
|
|
|
|
|
source [find interface/$INTERFACE.cfg]
|
|
|
|
|
|
|
|
transport select swd
|
|
|
|
|
|
|
|
set CHIPNAME atsame70q21
|
|
|
|
|
|
|
|
source [find target/atsamv.cfg]
|
|
|
|
|
|
|
|
reset_config srst_only
|
2017-02-02 01:46:32 +08:00
|
|
|
|
|
|
|
$_TARGETNAME configure -event gdb-attach {
|
2017-06-15 05:40:31 +08:00
|
|
|
echo "Debugger attaching: halting execution"
|
|
|
|
reset halt
|
|
|
|
gdb_breakpoint_override hard
|
2017-02-02 01:46:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$_TARGETNAME configure -event gdb-detach {
|
2017-06-15 05:40:31 +08:00
|
|
|
echo "Debugger detaching: resuming execution"
|
|
|
|
resume
|
2017-02-02 01:46:32 +08:00
|
|
|
}
|