Add the gdb and openocd configuration script for the latest openocd version.
[bertos.git] / bertos / cpu / cortex-m3 / scripts / openocd_new_luminary_ram.cfg
1 # Script for luminary lm3s*
2
3 # Change the default telnet port...
4 telnet_port 4444
5
6 # Port for TCL connection.
7 tcl_port 6666
8
9 # GDB connects here
10 gdb_port 3333
11
12 # GDB can also flash my flash!
13 gdb_memory_map enable
14 gdb_flash_program disable
15 gdb_breakpoint_override soft
16
17 # ftdi interface
18 interface ft2232
19 #ft2232_device_desc "LM3S811 Evaluation Board A"
20 ft2232_layout evb_lm3s811
21 ft2232_vid_pid 0x0403 0xbcd9
22
23
24 if { [info exists CHIPNAME] } { 
25    set  _CHIPNAME $CHIPNAME    
26 } else {         
27    set  _CHIPNAME lm3s
28 }
29
30 if { [info exists ENDIAN] } {   
31    set  _ENDIAN $ENDIAN    
32 } else {         
33   # this defaults to a little endian
34    set  _ENDIAN little
35 }
36
37 if { [info exists CPUTAPID ] } {
38    set _CPUTAPID $CPUTAPID
39 } else {
40   # force an error till we get a good number
41    set _CPUTAPID 0xffffffff
42 }
43
44 # jtag speed
45 jtag_khz 500
46
47 jtag_nsrst_delay 100
48 jtag_ntrst_delay 100
49
50 #LM3S811 Evaluation Board has only srst
51 reset_config srst_only
52
53 #jtag scan chain
54 jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id $_CPUTAPID
55
56 # the luminary variant causes a software reset rather than asserting SRST
57 # this stops the debug registers from being cleared
58 # this will be fixed in later revisions of silicon
59 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
60 target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -variant lm3s
61
62 # 8k working area at base of ram
63 $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 0x2000 -work-area-backup 0
64
65 #flash configuration
66 flash bank stellaris 0 0 0 0 0
67