]> git.sur5r.net Git - openocd/blob - tcl/target/lpc2129.cfg
5b2a2f74b5b3c25558cdb5d87e916e57b60b5def
[openocd] / tcl / target / lpc2129.cfg
1 #LPC-2129 CPU
2
3
4 if { [info exists CHIPNAME] } {
5    set  _CHIPNAME $CHIPNAME
6 } else {
7    set  _CHIPNAME lpc2129
8 }
9
10 if { [info exists ENDIAN] } {
11    set  _ENDIAN $ENDIAN
12 } else {
13    set  _ENDIAN little
14 }
15
16 if { [info exists CPUTAPID ] } {
17    set _CPUTAPID $CPUTAPID
18 } else {
19   # force an error till we get a good number
20    set _CPUTAPID 0xffffffff
21 }
22
23
24 #use combined on interfaces or targets that can't set TRST/SRST separately
25 reset_config trst_and_srst srst_pulls_trst
26
27 # reset delays
28 adapter_nsrst_delay 100
29 jtag_ntrst_delay 100
30
31 #jtag scan chain
32 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
33
34
35 set _TARGETNAME $_CHIPNAME.cpu
36 target create $_TARGETNAME arm7tdmi -endian $_ENDIAN -chain-position $_TARGETNAME -variant arm7tdmi-s_r4
37
38 $_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
39
40 #flash bank <driver> <base> <size> <chip_width> <bus_width>
41 set _FLASHNAME $_CHIPNAME.flash
42 flash bank $_FLASHNAME lpc2000 0x0 0x40000 0 0 $_TARGETNAME lpc2000_v1 14765 calc_checksum