aboutsummaryrefslogtreecommitdiff
path: root/tcl/target/fm3.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tcl/target/fm3.cfg')
-rw-r--r--tcl/target/fm3.cfg16
1 files changed, 11 insertions, 5 deletions
diff --git a/tcl/target/fm3.cfg b/tcl/target/fm3.cfg
index 74a4e278..e2d78d1e 100644
--- a/tcl/target/fm3.cfg
+++ b/tcl/target/fm3.cfg
@@ -1,6 +1,8 @@
# MB9BF506
# Fujitsu Cortex-M3 with 512kB Flash and 64kB RAM
+source [find target/swj-dp.tcl]
+
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
@@ -21,12 +23,14 @@ if { [info exists CPUTAPID] } {
# delays on reset lines
adapter_nsrst_delay 100
-jtag_ntrst_delay 100
+if {[using_jtag]} {
+ jtag_ntrst_delay 100
+}
# Fujitsu cortex-M3 reset configuration
reset_config trst_only
-jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME
@@ -42,6 +46,8 @@ flash bank $_FLASHNAME fm3 0 0 0 0 $_TARGETNAME
# 4MHz / 6 = 666kHz, so use 500
adapter_khz 500
-# if srst is not fitted use SYSRESETREQ to
-# perform a soft reset
-cortex_m reset_config sysresetreq
+if {![using_hla]} {
+ # if srst is not fitted use SYSRESETREQ to
+ # perform a soft reset
+ cortex_m reset_config sysresetreq
+}