6 reset_config trst_and_srst separate
7 #reset_config srst_only srst_pulls_trst
9 if { [info exists CHIPNAME] } {
10 set _CHIPNAME $CHIPNAME
15 if { [info exists ENDIAN] } {
21 if { [info exists CPUTAPID ] } {
22 set _CPUTAPID $CPUTAPID
24 set _CPUTAPID 0x27b3645b
27 if { [info exists DSPTAPID ] } {
28 set _DSPTAPID $DSPTAPID
30 set _DSPTAPID 0x27b3645b
33 jtag newtap $_CHIPNAME dsp -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_DSPTAPID
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
39 set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
40 target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME
42 # C100's ARAM 64k SRAM
43 $_TARGETNAME configure -work-area-phys 0x0a000000 -work-area-size 0x10000 -work-area-backup 0
46 proc power_restore {} { puts "Sensed power restore. No action." }
47 proc srst_deasserted {} { puts "Sensed nSRST deasserted. No action." }
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"
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"
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