1 # SPDX-License-Identifier: GPL-2.0-or-later
4 # Spansion FM4 (ARM Cortex-M4)
7 if { [info exists CHIPNAME] } {
8 set _CHIPNAME $CHIPNAME
13 source [find target/swj-dp.tcl]
15 if { [info exists CPUTAPID] } {
16 set _CPU_TAPID $CPUTAPID
17 } elseif { [using_jtag] } {
18 set _CPU_TAPID 0x4ba00477
20 set _CPU_TAPID 0x2ba01477
23 swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
24 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
26 set _TARGETNAME $_CHIPNAME.cpu
27 target create $_TARGETNAME cortex_m -endian little -dap $_CHIPNAME.dap
32 cortex_m reset_config sysresetreq