1# Copyright (c) 2021, ATL-Electronics
2# Copyright (c) 2021, Teslabs Engineering S.L.
3# Copyright (c) 2022, Rtone.
4# SPDX-License-Identifier: Apache-2.0
5
6source [find interface/cmsis-dap.cfg]
7transport select swd
8
9set CHIPNAME gd32f470ik
10set CPUTAPID 0x790007a3
11
12source [find target/stm32f4x.cfg]
13
14reset_config trst_and_srst separate
15
16$_TARGETNAME configure -event gdb-attach {
17	echo "Debugger attaching: halting execution"
18	reset halt
19	gdb_breakpoint_override hard
20}
21
22$_TARGETNAME configure -event gdb-detach {
23	echo "Debugger detaching: resuming execution"
24	resume
25}
26