Xiaofan Chen <xiaofanc@gmail.com> Add config file for TI-Luminary LM3S1968 chip and...
[fw/openocd] / tcl / target / lm3s1968.cfg
1 # Script for TI/Luminary Stellaris LM3S1968
2
3 if { [info exists CHIPNAME] } { 
4    set  _CHIPNAME $CHIPNAME    
5 } else {         
6    set  _CHIPNAME lm3s1968
7 }
8
9 if { [info exists ENDIAN] } {   
10    set  _ENDIAN $ENDIAN    
11 } else {         
12   # this defaults to a little endian
13    set  _ENDIAN little
14 }
15
16 if { [info exists CPUTAPID ] } {
17    set _CPUTAPID $CPUTAPID
18 } else {
19    set _CPUTAPID 0x3ba00477
20 }
21
22 #jtag scan chain
23 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id $_CPUTAPID
24
25 # the luminary variant causes a software reset rather than asserting SRST
26 # this stops the debug registers from being cleared
27 # this will be fixed in later revisions of silicon
28 set _TARGETNAME $_CHIPNAME.cpu
29 target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -variant lm3s
30
31 # 4k working area at base of ram
32 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 0x4000 -work-area-backup 0
33
34 #flash configuration
35 flash bank stellaris 0 0 0 0 0