2022-06-12 16:42:27 -05:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2015-03-01 13:38:36 -06:00
|
|
|
#
|
|
|
|
# Spansion FM4 (ARM Cortex-M4)
|
|
|
|
#
|
|
|
|
|
|
|
|
if { [info exists CHIPNAME] } {
|
|
|
|
set _CHIPNAME $CHIPNAME
|
|
|
|
} else {
|
|
|
|
set _CHIPNAME fm4
|
|
|
|
}
|
|
|
|
|
|
|
|
source [find target/swj-dp.tcl]
|
|
|
|
|
|
|
|
if { [info exists CPUTAPID] } {
|
|
|
|
set _CPU_TAPID $CPUTAPID
|
2015-10-19 19:28:12 -05:00
|
|
|
} elseif { [using_jtag] } {
|
|
|
|
set _CPU_TAPID 0x4ba00477
|
2015-03-01 13:38:36 -06:00
|
|
|
} else {
|
|
|
|
set _CPU_TAPID 0x2ba01477
|
|
|
|
}
|
|
|
|
|
|
|
|
swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_TAPID
|
2018-03-23 15:17:29 -05:00
|
|
|
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
|
2015-03-01 13:38:36 -06:00
|
|
|
|
|
|
|
set _TARGETNAME $_CHIPNAME.cpu
|
2018-03-23 15:17:29 -05:00
|
|
|
target create $_TARGETNAME cortex_m -endian little -dap $_CHIPNAME.dap
|
2015-03-01 13:38:36 -06:00
|
|
|
|
2019-08-23 08:51:00 -05:00
|
|
|
adapter speed 500
|
2015-03-01 13:38:36 -06:00
|
|
|
|
|
|
|
if {![using_hla]} {
|
|
|
|
cortex_m reset_config sysresetreq
|
|
|
|
}
|