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 srst 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
34 dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
36 set _TARGETNAME $_CHIPNAME.cpu
37 target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
39 # MB9BF506 has 64kB of SRAM on its main system bus
40 $_TARGETNAME configure -work-area-phys 0x1FFF8000 -work-area-size 0x10000 -work-area-backup 0
42 # MB9BF506 has 512kB internal FLASH
44 set _FLASHNAME $_CHIPNAME.flash
45 flash bank $_FLASHNAME fm3 0 0 0 0 $_TARGETNAME
47 # 4MHz / 6 = 666kHz, so use 500
51 # if srst is not fitted use SYSRESETREQ to
52 # perform a soft reset
53 cortex_m reset_config sysresetreq