tcl/target: add SPDX tag
[fw/openocd] / tcl / target / infineon / tle987x.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Infineon TLE987x family (Arm Cortex-M3 @ up to 40 MHz)
5 #
6
7 if { [info exists CHIPNAME] } {
8         set _CHIPNAME $CHIPNAME
9 } else {
10         set _CHIPNAME tle987x
11 }
12
13 source [find target/swj-dp.tcl]
14
15 if { [info exists CPU_SWD_TAPID] } {
16         set _CPU_SWD_TAPID $CPU_SWD_TAPID
17 } else {
18         set _CPU_SWD_TAPID 0x2BA01477
19 }
20
21 if { [using_jtag] } {
22         # JTAG not supported, only SWD
23         set _CPU_TAPID 0
24 } else {
25         set _CPU_TAPID $_CPU_SWD_TAPID
26 }
27
28 swj_newdap $_CHIPNAME dap -irlen 4 -expected-id $_CPU_TAPID
29 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.dap
30
31 set _TARGETNAME $_CHIPNAME.cpu
32 target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
33
34 if { ![using_hla] } {
35         cortex_m reset_config sysresetreq
36 }
37
38 adapter speed 1000