2 # Fujitsu Cortex-M3 with 512kB Flash and 64kB RAM
4 source [find target/swj-dp.tcl]
6 if { [info exists CHIPNAME] } {
7 set _CHIPNAME $CHIPNAME
12 if { [info exists ENDIAN] } {
18 if { [info exists CPUTAPID] } {
19 set _CPUTAPID $CPUTAPID
21 set _CPUTAPID 0x4ba00477
24 # delays on reset lines
25 adapter_nsrst_delay 100
30 # Fujitsu Cortex-M3 reset configuration
31 reset_config trst_only
33 swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
35 set _TARGETNAME $_CHIPNAME.cpu
36 target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position $_TARGETNAME
38 # MB9BF506 has 64kB of SRAM on its main system bus
39 $_TARGETNAME configure -work-area-phys 0x1FFF8000 -work-area-size 0x10000 -work-area-backup 0
41 # MB9BF506 has 512kB internal FLASH
43 set _FLASHNAME $_CHIPNAME.flash
44 flash bank $_FLASHNAME fm3 0 0 0 0 $_TARGETNAME
46 # 4MHz / 6 = 666kHz, so use 500
50 # if srst is not fitted use SYSRESETREQ to
51 # perform a soft reset
52 cortex_m reset_config sysresetreq