1 | ; bdiGDB configuration for TI OMAP3430 ES1.0 |
---|
2 | ; ------------------------------------------ |
---|
3 | ; |
---|
4 | ; To halt the core as soon as possible after power-up, |
---|
5 | ; select EMU1=1,EMU0=0 (Wait In Reset mode WIR). |
---|
6 | ; |
---|
7 | ; Commands supported in the SCANINIT and SCANPOST strings: |
---|
8 | ; |
---|
9 | ; I<n>=<...b2b1b0> write IR, b0 is first scanned |
---|
10 | ; D<n>=<...b2b1b0> write DR, b0 is first scanned |
---|
11 | ; n : the number of bits 1..256 |
---|
12 | ; bx : a data byte, two hex digits |
---|
13 | ; W<n> wait for n (decimal) micro seconds |
---|
14 | ; T1 assert TRST |
---|
15 | ; T0 release TRST |
---|
16 | ; R1 assert RESET |
---|
17 | ; R0 release RESET |
---|
18 | ; CH<n> clock TCK n (decimal) times with TMS high |
---|
19 | ; CL<n> clock TCK n (decimal) times with TMS low |
---|
20 | ; |
---|
21 | ; |
---|
22 | [INIT] |
---|
23 | WREG CPSR 0x000001D3 ;select ARM / supervisor mode |
---|
24 | |
---|
25 | WM32 0x48314048 0x0000aaaa ;disable watchdog WDT2 |
---|
26 | WM32 0x48314048 0x00005555 ;disable watchdog WDT2 |
---|
27 | |
---|
28 | WGPR 11 0x40200020 ;set frame pointer to free RAM |
---|
29 | WM32 0x40200020 0x40200028 ;dummy stack frame |
---|
30 | |
---|
31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
32 | ;; Initialize Pins |
---|
33 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
34 | |
---|
35 | WM32 0x48002170 0x01190019 ; Enable UART2 RX and TX |
---|
36 | WM32 0x48002a18 0x0018010f ; Enable SYS_CLKOUT1 |
---|
37 | WM32 0x480021e0 0x0018010f ; Enable SYS_CLKOUT2 |
---|
38 | |
---|
39 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
40 | ;; Initialize Clocks |
---|
41 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
42 | |
---|
43 | ;WM32 0x48306d70 0x00000000 ; disable sys_clk1 |
---|
44 | ;WM32 0x4830729C 0x00000006 ; set polarity |
---|
45 | WM32 0x48306814 0x00000000 ; Enable Interface clock to be Free running |
---|
46 | WM32 0x48004e10 0x00000001 ; Enable L3_ICLK and L4_ICLK |
---|
47 | WM32 0x48004a30 0x00006000 ; Enable Auto Clock for UART1 and UART2 |
---|
48 | ;WM32 0x48004d70 0x00000000 ; Enable source for SYS_CLKOUT2 |
---|
49 | ;WM32 0x48004d70 0x00000080 ; Enable SYS_CLKOUT2 |
---|
50 | WM32 0x48004a00 0xc3fffe01 ; Turn on all available module clocks |
---|
51 | WM32 0x48004a10 0x7ffffedb ; Turn on all available peripheral clocks |
---|
52 | ;WM32 0x48306d70 0x00000080 ; enable sys_clk1 |
---|
53 | |
---|
54 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
55 | ; Initialize CS0 |
---|
56 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
57 | |
---|
58 | WM32 0x6E000010 0x08 ; Set No-idle, Normal Mode, CLK free running |
---|
59 | WM32 0x6E000078 0x00000C48 ; Config7 |
---|
60 | WM32 0x6E000060 0x00001200 ; Config1 |
---|
61 | WM32 0x6E000064 0x000f0f01 ; Config2 |
---|
62 | WM32 0x6E000068 0x00020201 ; Config3 |
---|
63 | WM32 0x6E00006C 0x0C060C06 ; Config4 |
---|
64 | WM32 0x6E000070 0x01131F1F ; Config5 |
---|
65 | WM32 0x6E000074 0x0F030000 ; Config6 |
---|
66 | |
---|
67 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
68 | ; Initialize DDR |
---|
69 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
70 | |
---|
71 | ;/* SDRAM software reset */ |
---|
72 | ;/* No idle ack and RESET enable */ |
---|
73 | ;__raw_writel(0x1A, SDRC_REG(SYSCONFIG)); |
---|
74 | WM32 0x6D000010 0x0000001A ; reset DDR |
---|
75 | ;sdelay(100); |
---|
76 | DELAY 100 |
---|
77 | ;/* No idle ack and RESET disable */ |
---|
78 | ;__raw_writel(0x18, SDRC_REG(SYSCONFIG)); |
---|
79 | WM32 0x6D000010 0x00000018 ; release reset |
---|
80 | DELAY 100 |
---|
81 | ; |
---|
82 | ;/* SDRC Sharing register */ |
---|
83 | ;/* 32-bit SDRAM on data lane [31:0] - CS0 */ |
---|
84 | ;/* pin tri-stated = 1 */ |
---|
85 | ;__raw_writel(0x00000100, SDRC_REG(SHARING)); |
---|
86 | WM32 0x6D000044 0x00000100 |
---|
87 | ; |
---|
88 | ;/* ----- SDRC Registers Configuration --------- */ |
---|
89 | ;/* SDRC_MCFG0 register */ |
---|
90 | ;__raw_writel(0x02584099, SDRC_REG(MCFG_0)); |
---|
91 | WM32 0x6D000080 0x02584099 |
---|
92 | ; |
---|
93 | ;/* SDRC_RFR_CTRL0 register */ |
---|
94 | ;__raw_writel(0x54601, SDRC_REG(RFR_CTRL_0)); |
---|
95 | WM32 0x6D0000a4 0x00054601 |
---|
96 | ; |
---|
97 | ;/* SDRC_ACTIM_CTRLA0 register */ |
---|
98 | ;__raw_writel(0xA29DB4C6, SDRC_REG(ACTIM_CTRLA_0)); |
---|
99 | WM32 0x6D00009c 0xA29DB4C6 |
---|
100 | ; |
---|
101 | ;/* SDRC_ACTIM_CTRLB0 register */ |
---|
102 | ;__raw_writel(0x12214, SDRC_REG(ACTIM_CTRLB_0)); |
---|
103 | WM32 0x6D0000A0 0x00012214 |
---|
104 | ; |
---|
105 | ;/* Disble Power Down of CKE due to 1 CKE on combo part */ |
---|
106 | ;__raw_writel(0x00000081, SDRC_REG(POWER)); |
---|
107 | WM32 0x6D000070 0x00000081 |
---|
108 | ; |
---|
109 | ;/* SDRC_MANUAL command register */ |
---|
110 | ;/* NOP command */ |
---|
111 | ;__raw_writel(0x00000000, SDRC_REG(MANUAL_0)); |
---|
112 | WM32 0x6D0000A8 0x00000000 |
---|
113 | ; |
---|
114 | ;/* Precharge command */ |
---|
115 | ;__raw_writel(0x00000001, SDRC_REG(MANUAL_0)); |
---|
116 | WM32 0x6D0000A8 0x00000001 |
---|
117 | ; |
---|
118 | ;/* Auto-refresh command */ |
---|
119 | ;__raw_writel(0x00000002, SDRC_REG(MANUAL_0)); |
---|
120 | WM32 0x6D0000A8 0x00000002 |
---|
121 | ; |
---|
122 | ;/* Auto-refresh command */ |
---|
123 | ;__raw_writel(0x00000002, SDRC_REG(MANUAL_0)); |
---|
124 | WM32 0x6D0000A8 0x00000002 |
---|
125 | ; |
---|
126 | ;/* SDRC MR0 register Burst length=4 */ |
---|
127 | ;__raw_writel(0x00000032, SDRC_REG(MR_0)); |
---|
128 | WM32 0x6D000084 0x00000032 |
---|
129 | ; |
---|
130 | ;/* SDRC DLLA control register */ |
---|
131 | ;__raw_writel(0x0000000A, SDRC_REG(DLLA_CTRL)); |
---|
132 | WM32 0x6D000060 0x0000000A |
---|
133 | |
---|
134 | [TARGET] |
---|
135 | CPUTYPE OMAP3430 |
---|
136 | CLOCK 1 ; JTAG clock |
---|
137 | POWERUP 2000 ; power-up delay |
---|
138 | TRST PUSHPULL ; TRST driver type (OPENDRAIN | PUSHPULL) |
---|
139 | RESET HARD ; NONE | HARD <n> (ms) |
---|
140 | STARTUP HALT ; let boot code setup the system |
---|
141 | ;STARTUP RUN ; let boot code setup the system |
---|
142 | ENDIAN LITTLE ; memory model (LITTLE | BIG) |
---|
143 | ;MEMACCESS CORE 10 ; memory access via core (8 TCK's access delay) |
---|
144 | MEMACCESS AHB 8 ; memory access via AHB (64 TCK's access delay) |
---|
145 | ;VECTOR CATCH 0x1B ; catch Abort, Undef, Reset |
---|
146 | |
---|
147 | SCANPRED 1 6 ; count for ICEPick TAP |
---|
148 | SCANSUCC 1 8 ; Xilinx |
---|
149 | |
---|
150 | ; Configure ICEPick module to make Cortex-A8 DAP-TAP visible |
---|
151 | SCANINIT t1:w1000:t0:w1000: ; toggle TRST, |
---|
152 | SCANINIT ch10:w1000: ; clock TCK with TMS high and wait |
---|
153 | SCANINIT i6=07:d8=89:i6=02: ; connect and select router |
---|
154 | SCANINIT d32=81000080: ; IP control: KeepPowered |
---|
155 | SCANINIT d32=a3002048: ; TAP3: DebugConnect, ForcePower, ForceActive |
---|
156 | SCANINIT d32=81000081: ; IP control: KeepPowered, SysReset |
---|
157 | SCANINIT d32=a3002148: ; enable TAP3 |
---|
158 | SCANINIT cl10:i10=ffff ; clock 10 times in RTI, scan bypass |
---|
159 | |
---|
160 | ;assert SysSeset after debugger has setup |
---|
161 | ;SCANPOST i10=ffff: ; scan bypass |
---|
162 | ;SCANPOST i10=002f: ; IP(router) - TAP3(bypass) |
---|
163 | ;SCANPOST d33=0102000102: ; IP control = SysReset |
---|
164 | ;SCANPOST i10=ffff ; scan bypass |
---|
165 | |
---|
166 | [HOST] |
---|
167 | IP 192.168.1.3 |
---|
168 | FILE build_csb740\ramtst.elf |
---|
169 | FORMAT ELF |
---|
170 | LOAD MANUAL ;load file MANUAL or AUTO after reset |
---|
171 | PROMPT CSB740_> |
---|
172 | TELNET NOECHO |
---|
173 | |
---|
174 | [FLASH] |
---|
175 | WORKSPACE 0x80001000 ;workspace at 0x1000 |
---|
176 | CHIPSIZE 0x4000000 |
---|
177 | CHIPTYPE MIRRORX16 |
---|
178 | BUSWIDTH 16 |
---|
179 | FILE build_csb740\boot.bin |
---|
180 | FORMAT BIN 0x08000000 |
---|
181 | ERASE 0x08000000 |
---|
182 | ERASE 0x08020000 |
---|
183 | ERASE 0x08040000 |
---|
184 | ERASE 0x08060000 |
---|
185 | ERASE 0x08080000 |
---|
186 | |
---|
187 | [REGS] |
---|
188 | FILE C:\els\abatron\arm11\regOMAP3430.def |
---|