jtag: gw2388.cfg

File gw2388.cfg, 3.3 KB (added by trac, 12 months ago)
Line 
1adapter_khz 1000
2
3reset_config trst_and_srst separate
4# c100 config.
5# This is ARM1136 dual core
6# this script only configures one core (that is used to run Linux)
7
8# assume no PLL lock, start slowly
9set _CHIPNAME arm
10set _ENDIAN little
11#set _CPUTAPID 0x0f67e8ef
12set _CPUTAPID 0x07b37477
13
14# Per ARM: DDI0211J_arm1136_r1p5_trm.pdf - the ARM 1136 as a 5 bit IR register
15jtag newtap $_CHIPNAME cpu -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
16jtag newtap $_CHIPNAME cpu1 -irlen 5 -ircapture 0x1 -irmask 0x1f -expected-id $_CPUTAPID
17# MSP430FR5857
18jtag newtap msp gsc -irlen 8 -ircapture 0x91 -irmask 0xff
19
20set _TARGETNAME $_CHIPNAME.cpu
21set _TARGETNAME1 $_CHIPNAME.cpu1
22target create $_TARGETNAME arm11 -endian $_ENDIAN -chain-position $_TARGETNAME -variant "ARM11 MPCore"
23target create $_TARGETNAME1 arm11 -endian $_ENDIAN -chain-position $_TARGETNAME1 -variant "ARM11 MPCore"
24
25# C100's ARAM 64k SRAM
26#$_TARGETNAME configure -event reset-init { cns3xxx_init }
27$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 0x10000 -work-area-backup 0
28
29flash bank test cfi 0x10000000 0x1000000 2 2 arm.cpu
30
31proc fwd {n} {
32        for {set i 0} {$i < n} {set i [expr $i+1]} {
33                step
34        }
35}
36
37proc cns3xxx_init {} {
38        reset
39        halt
40        targets 1
41        halt
42        targets 0
43        mww 0x72000400 0x0
44        mww 0x72000408 0x1410
45        mww 0x7200040C 0x6
46        mww 0x72000410 0x0
47        mww 0x72000414 0x0
48        mww 0x72000418 0x0
49        mww 0x7200041c 0x0
50        mww 0x72000420 0x0
51        mww 0x72000424 0x18
52        mww 0x72000404 0x1
53        mww 0x72000404 0x3
54
55        mww 0x72000428 0x6e550
56        mww 0x72000428 0x6e551
57
58        sleep 10
59
60        mww 0x72000428 0x6e550
61        mww 0x72000428 0x6e552
62        mww 0x72000428 0x6e550
63        mww 0x72000428 0x7e550
64        mww 0x72000430 0x2
65#CAS Latency
66        mww 0x72000014 0xc
67
68        mww 0x7200004c 0x44
69
70        mww 0x7200001c 0x2
71
72        mww 0x72000020 0x12
73        mww 0x72000024 0x18
74        mww 0x72000028 0x406
75        mww 0x7200002c 0x4d4f
76        mww 0x72000030 0x406
77        mww 0x72000034 0x4
78        mww 0x72000038 0x6
79        mww 0x7200003c 0x3
80        mww 0x72000054 0x1220
81
82        mww 0x72000040 0x3
83        mww 0x72000044 0xc8
84        mww 0x72000048 0xc8
85
86        mww 0x7200000c 0x14012
87        mww 0x72000010 0x618
88        mww 0x72000200 0xff
89        mww 0x72000008 0xc0000
90        mww 0x72000008 0x0
91        mww 0x72000008 0xa0000
92        mww 0x72000008 0xb0000
93        mww 0x72000008 0x90004
94        mww 0x72000008 0x80b62
95        mww 0x72000008 0x0
96        mww 0x72000008 0x40000
97        mww 0x72000008 0x40000
98        mww 0x72000008 0x80a62
99        mww 0x72000008 0x90384
100        mww 0x72000008 0x90004
101        mww 0x72000004 0x0
102
103        flash probe 0
104        flash write_image u-boot.bin 0x60000000
105}
106
107# Function sets MSP430FR5857 into JTAG4 and resets this board
108proc init_reset {mode} {
109        echo "default"
110        jtag_reset 0 0
111
112        echo "srst low"
113        jtag_reset 0 1
114        sleep 500
115
116        echo "srst high"
117        jtag_reset 0 0
118        sleep 1
119
120        echo "srst low"
121        jtag_reset 0 1
122        sleep 500
123
124        echo "toggle trst"
125        jtag_reset 1 1 0 1
126
127        echo "srst high"
128        jtag_reset 0 0
129        sleep 10
130}
131
132proc jtag_init {} {
133        init_reset startup
134        jtag arp_init
135}