OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [user-guide/] [setup-am33-stb.html] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>AM33 STB Hardware Setup</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos User Guide"
20
HREF="ecos-user-guide.html"><LINK
21
REL="UP"
22
TITLE="Target Setup"
23
HREF="appendix-target-setup.html"><LINK
24
REL="PREVIOUS"
25
TITLE="MN10300 Architectural Simulator Setup"
26
HREF="setup-mn10300-sim.html"><LINK
27
REL="NEXT"
28
TITLE="TX39 Hardware Setup"
29
HREF="setup-tx39-jmr3904.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos User Guide</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="setup-mn10300-sim.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Appendix A. Target Setup</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="setup-tx39-jmr3904.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECT1"
82
><H1
83
CLASS="SECT1"
84
><A
85
NAME="SETUP-AM33-STB">AM33 STB Hardware Setup</H1
86
><P
87
>The Matsushita AM33 STB System Reference Board may be used
88
in two modes: via a JTAG debugger, or by means of a GDB stub ROM.</P
89
><DIV
90
CLASS="SECT2"
91
><H2
92
CLASS="SECT2"
93
><A
94
NAME="AEN3223">Use with GDB Stub ROM</H2
95
><P
96
>The eCos Developer&#8217;s Kit package comes with a ROM
97
image which provides GDB support for
98
the Matsushita(R) AM33 STB System Reference Board. To install the
99
GDB stub ROM requires the use of the JTAG debugger and the Flash ROM
100
programming code available from Matsushita. An image of this ROM
101
is also provided at <TT
102
CLASS="FILENAME"
103
>loaders/am33-stb/gdbload.bin</TT
104
> under
105
the root of your eCos installation.</P
106
><P
107
>Ensure that there is a Flash ROM card in MAIN MEMORY SLOT &lt;0&#62;.
108
Follow the directions for programming a Flash ROM supplied with
109
the programming software.</P
110
><P
111
>The final programming of the ROM will need to be done with
112
a command similar to the following:</P
113
><TABLE
114
BORDER="5"
115
BGCOLOR="#E0E0F0"
116
WIDTH="70%"
117
><TR
118
><TD
119
><PRE
120
CLASS="PROGRAMLISTING"
121
>fdown "gdbload.bin",0x80000000,16,1</PRE
122
></TD
123
></TR
124
></TABLE
125
><P
126
>Once the ROM has been programmed, close down the JTAG debugger,
127
turn the STB off, and disconnect the JTAG cable. Ensure that the
128
hardware switches are in the following configuration:</P
129
><TABLE
130
BORDER="5"
131
BGCOLOR="#E0E0F0"
132
WIDTH="70%"
133
><TR
134
><TD
135
><PRE
136
CLASS="PROGRAMLISTING"
137
>U U D D D U D D
138
 
139
D = lower part of rocker switch pushed in
140
U = upper part of rocker switch pushed in</PRE
141
></TD
142
></TR
143
></TABLE
144
><P
145
>This is also the configuration required by the Flash programming
146
code, so it should not be necessary to change these.</P
147
><P
148
>Restart the STB and the stub ROM will now be able to communicate
149
with <SPAN
150
CLASS="PRODUCTNAME"
151
>GDB</SPAN
152
>. eCos programs should be built
153
with RAM startup.</P
154
><P
155
>Programs can then be downloaded via a standard RS232 null
156
modem serial cable connected to the SERIAL1 connector on the STB
157
front panel (the AM33&quot;s serial port 0). This line is programmed
158
to run at 38400 baud, 8 data bits, no parity and 1 stop bit (8-N-1)
159
with no flow control. A gender changer may also be required. Diagnostic
160
output will be output to GDB using the same connection.</P
161
><P
162
>This procedure also applies for programming ROM startup eCos
163
programs into ROM, given a binary format image of the program from<TABLE
164
BORDER="5"
165
BGCOLOR="#E0E0F0"
166
WIDTH="70%"
167
><TR
168
><TD
169
><PRE
170
CLASS="PROGRAMLISTING"
171
> mn10300-elf-objcopy.</PRE
172
></TD
173
></TR
174
></TABLE
175
></P
176
></DIV
177
><DIV
178
CLASS="SECT2"
179
><H2
180
CLASS="SECT2"
181
><A
182
NAME="AEN3238">Use with the JTAG debugger</H2
183
><P
184
>To use eCos from the JTAG debugger, executables must be built
185
with ROM startup and then downloaded via the JTAG debugger. For
186
this to work there must be an SDRAM memory card in SUB MEMORY SLOT &lt;0&#62; and
187
the hardware switches on the front panel set to the following: </P
188
><TABLE
189
BORDER="5"
190
BGCOLOR="#E0E0F0"
191
WIDTH="70%"
192
><TR
193
><TD
194
><PRE
195
CLASS="PROGRAMLISTING"
196
>D U D D D U D D
197
 
198
D = lower part of rocker switch pushed in
199
U = upper part of rocker switch pushed in</PRE
200
></TD
201
></TR
202
></TABLE
203
><P
204
>Connect the JTAG unit and run the debugger as described in
205
the documentation that comes with it.</P
206
><P
207
>eCos executables should be renamed to have a &#8220;.out&#8221; extension
208
and may then be loaded using the debugger&quot;s &#8220;l&#8221; or &#8220;lp&#8221; commands.</P
209
><P
210
>Diagnostic output generated by the program will be sent out
211
of the AM33&quot;s serial port 0 which is connected to the SERIAL1
212
connector on the STB front panel. This line is programmed to run
213
at 38400 baud, 8 data bits, no parity, and one stop bit (8-N-1)
214
with no flow control. Connection to the host computer should be
215
using a standard RS232 null modem serial cable. A gender changer
216
may also be required.</P
217
></DIV
218
><DIV
219
CLASS="SECT2"
220
><H2
221
CLASS="SECT2"
222
><A
223
NAME="AEN3245">Building the GDB stub ROM image</H2
224
><P
225
>eCos comes with a pre-built GDB stub ROM image for the AM33-STB
226
platform. This can be found at <TT
227
CLASS="FILENAME"
228
>loaders/am33-stb/gdbload.bin</TT
229
> relative
230
to the eCos installation directory.</P
231
><P
232
>If necessary, the ROM image can be re-built as follows:</P
233
><P
234
></P
235
><OL
236
TYPE="1"
237
><LI
238
><P
239
>               On Windows hosts, open a Bash session using
240
<SPAN
241
CLASS="emphasis"
242
><I
243
CLASS="EMPHASIS"
244
>Start-&#62;Programs-&#62;Red Hat eCos-&#62;eCos
245
Development Environment</I
246
></SPAN
247
></P
248
></LI
249
><LI
250
><P
251
>Create a build directory and cd into it</P
252
></LI
253
><LI
254
><P
255
>Run (all as one line):
256
 
257
<TABLE
258
BORDER="5"
259
BGCOLOR="#E0E0F0"
260
WIDTH="70%"
261
><TR
262
><TD
263
><PRE
264
CLASS="PROGRAMLISTING"
265
>cygtclsh80 BASE_DIR/packages/pkgconf.tcl                          \
266
  --target=mn10300_am33 --platform stb --startup rom              \
267
  --disable-kernel --disable-uitron --disable-libc --disable-libm \
268
  --disable-io --disable-io_serial --disable-wallclock
269
--disable-watchdog</PRE
270
></TD
271
></TR
272
></TABLE
273
>
274
            </P
275
><P
276
>where BASE_DIR is the path to the eCos installation
277
directory.</P
278
></LI
279
><LI
280
><P
281
>Edit the configuration file
282
<TT
283
CLASS="FILENAME"
284
>pkgconf/hal.h</TT
285
>
286
 in the build directory tree by ensuring the following configuration
287
options are set as follows:
288
 
289
<TABLE
290
BORDER="5"
291
BGCOLOR="#E0E0F0"
292
WIDTH="70%"
293
><TR
294
><TD
295
><PRE
296
CLASS="PROGRAMLISTING"
297
>#define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
298
#define CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
299
#undef  CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
300
#define CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
301
#define CYG_HAL_ROM_MONITOR</PRE
302
></TD
303
></TR
304
></TABLE
305
>
306
            </P
307
></LI
308
><LI
309
><P
310
>Run: make</P
311
></LI
312
><LI
313
><P
314
>Run: make -C hal/common/current/current/src/stubrom</P
315
></LI
316
><LI
317
><P
318
>The file
319
<TT
320
CLASS="FILENAME"
321
>hal/common/current/src/stubrom</TT
322
>
323
 will be an ELF format executable of the ROM image. Use mn10300-elf-objcopy to
324
convert this to the appropriate format for loading into the Matsushita
325
FLASH ROM programmer, mode &#8220;binary&#8221; in this case:
326
 
327
<TABLE
328
BORDER="5"
329
BGCOLOR="#E0E0F0"
330
WIDTH="70%"
331
><TR
332
><TD
333
><PRE
334
CLASS="PROGRAMLISTING"
335
>$ mn10300-elf-objcopy -O binary hal/common/current/src/stubrom/ \
336
  stubrom stubrom.img</PRE
337
></TD
338
></TR
339
></TABLE
340
></P
341
></LI
342
></OL
343
></DIV
344
></DIV
345
><DIV
346
CLASS="NAVFOOTER"
347
><HR
348
ALIGN="LEFT"
349
WIDTH="100%"><TABLE
350
SUMMARY="Footer navigation table"
351
WIDTH="100%"
352
BORDER="0"
353
CELLPADDING="0"
354
CELLSPACING="0"
355
><TR
356
><TD
357
WIDTH="33%"
358
ALIGN="left"
359
VALIGN="top"
360
><A
361
HREF="setup-mn10300-sim.html"
362
ACCESSKEY="P"
363
>Prev</A
364
></TD
365
><TD
366
WIDTH="34%"
367
ALIGN="center"
368
VALIGN="top"
369
><A
370
HREF="ecos-user-guide.html"
371
ACCESSKEY="H"
372
>Home</A
373
></TD
374
><TD
375
WIDTH="33%"
376
ALIGN="right"
377
VALIGN="top"
378
><A
379
HREF="setup-tx39-jmr3904.html"
380
ACCESSKEY="N"
381
>Next</A
382
></TD
383
></TR
384
><TR
385
><TD
386
WIDTH="33%"
387
ALIGN="left"
388
VALIGN="top"
389
>MN10300 Architectural Simulator Setup</TD
390
><TD
391
WIDTH="34%"
392
ALIGN="center"
393
VALIGN="top"
394
><A
395
HREF="appendix-target-setup.html"
396
ACCESSKEY="U"
397
>Up</A
398
></TD
399
><TD
400
WIDTH="33%"
401
ALIGN="right"
402
VALIGN="top"
403
>TX39 Hardware Setup</TD
404
></TR
405
></TABLE
406
></DIV
407
></BODY
408
></HTML
409
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.