3 if { [info exists CHIPNAME] } {
4 set _CHIPNAME $CHIPNAME
9 if { [info exists ENDIAN] } {
15 if { [info exists CPUTAPID ] } {
16 set _CPUTAPID $CPUTAPID
18 # force an error till we get a good number
19 set _CPUTAPID 0x4f1f0f0f
23 #use combined on interfaces or targets that can't set TRST/SRST separately
24 reset_config trst_and_srst srst_pulls_trst
33 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
35 set _TARGETNAME $_CHIPNAME.cpu
36 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
38 $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
41 #flash bank <driver> <base> <size> <chip_width> <bus_width>
42 set _FLASHNAME $_CHIPNAME.flash
43 flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14745 calc_checksum