michal smulski <michal.smulski@ooma.com> arm11 target config files
[fw/openocd] / tcl / target / c100.cfg
1 # c100 config
2 #
3 #jtag_nsrst_delay 5000
4 #jtag_ntrst_delay 3000
5 #reset_config none
6 reset_config trst_and_srst separate
7 #reset_config srst_only srst_pulls_trst
8
9 if { [info exists CHIPNAME] } { 
10    set  _CHIPNAME $CHIPNAME    
11 } else {         
12    set  _CHIPNAME c100
13 }
14
15 if { [info exists ENDIAN] } {   
16    set  _ENDIAN $ENDIAN    
17 } else {         
18    set  _ENDIAN little
19 }
20
21 if { [info exists CPUTAPID ] } {
22    set _CPUTAPID $CPUTAPID
23 } else {
24    set _CPUTAPID 0x27b3645b
25 }
26
27 if { [info exists DSPTAPID ] } {
28    set _DSPTAPID $DSPTAPID
29 } else {
30    set _DSPTAPID 0x27b3645b
31 }
32
33 jtag newtap $_CHIPNAME dsp -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_DSPTAPID
34
35
36 # Per ARM: DDI0211J_arm1136_r1p5_trm.pdf - the ARM 1136 as a 5 bit IR register
37 jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
38
39 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
40 target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME
41
42 # C100's ARAM 64k SRAM
43 $_TARGETNAME configure -work-area-phys 0x0a000000 -work-area-size 0x10000 -work-area-backup 0
44
45
46 proc power_restore {} { puts "Sensed power restore. No action." } 
47 proc srst_deasserted {} { puts "Sensed nSRST deasserted. No action." }
48
49
50 # issue telnet: reset init
51 # issue gdb: monitor reset init
52 $_TARGETNAME configure -event reset-init {
53         # Force target into ARM state.
54 #       soft_reset_halt # not implemented on ARM11
55         puts "Halting C100.CPU"
56         halt
57 }
58
59 $_TARGETNAME configure -event reset-deassert-post {
60         # Force target into ARM state.
61 #       soft_reset_halt # not implemented on ARM11
62         puts "Detected SRSRT asserted on C100.CPU"
63         
64 }
65 # Valid events: old-gdb_program_config, old-pre_resume, early-halted, halted, resumed, resume-start, resume-end, gdb-start, gdb-end, reset-start, reset-assert-pre, reset-assert-post, reset-deassert-pre, reset-deassert-post, reset-halt-pre, reset-halt-post, reset-wait-pre, reset-wait-post, reset-init, reset-end, examine-start, examine-end, debug-halted, debug-resumed, gdb-attach, gdb-detach, gdb-flash-write-start, gdb-flash-write-end, gdb-flash-erase-start, gdb-flash-erase-end, resume-start, resume-ok, or resume-end