tcl/target: add SPDX tag
[fw/openocd] / tcl / target / fm4.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 #
4 # Spansion FM4 (ARM Cortex-M4)
5 #
6
7 if { [info exists CHIPNAME] } {
8         set _CHIPNAME $CHIPNAME
9 } else {
10         set _CHIPNAME fm4
11 }
12
13 source [find target/swj-dp.tcl]
14
15 if { [info exists CPUTAPID] } {
16         set _CPU_TAPID $CPUTAPID
17 } elseif { [using_jtag] } {
18         set _CPU_TAPID 0x4ba00477
19 } else {
20         set _CPU_TAPID 0x2ba01477
21 }
22
23 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
24 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
25
26 set _TARGETNAME $_CHIPNAME.cpu
27 target create $_TARGETNAME cortex_m -endian little -dap $_CHIPNAME.dap
28
29 adapter speed 500
30
31 if {![using_hla]} {
32         cortex_m reset_config sysresetreq
33 }