-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathopenocd.cfg
More file actions
37 lines (28 loc) · 805 Bytes
/
openocd.cfg
File metadata and controls
37 lines (28 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
try {
source [find .interface]
} on error {result options} {
error "Couldn't open the .interface file.\nPlease run ./dbgcfg and select your debug adapter.\n"
}
if {$interface == "stlink-v2"} {
source [find interface/stlink-v2.cfg]
transport select hla_swd
} elseif {$interface == "stlink-v2-1"} {
source [find interface/stlink-v2-1.cfg]
transport select hla_swd
} elseif {$interface == "jlink"} {
source [find interface/jlink.cfg]
transport select swd
} elseif {$interface == "cmsis-dap"} {
source [find interface/cmsis-dap.cfg]
transport select swd
} else {
error "Invalid interface: $interface"
}
echo "Selected interface: $interface"
source [find target/stm32f1x.cfg]
$_TARGETNAME configure -event gdb-attach {
halt
}
$_TARGETNAME configure -event gdb-detach {
resume
}