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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [user-guide/] [setup-arm-ebsa285.html] - Blame information for rev 842

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
>StrongARM EBSA-285 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="Cirrus Logic ARM CL-PS7111 Evaluation Board Hardware Setup"
26
HREF="setup-arm-clps7111.html"><LINK
27
REL="NEXT"
28
TITLE=" Compaq iPAQ PocketPC Hardware Setup"
29
HREF="setup-arm-ipaq.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-arm-clps7111.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-arm-ipaq.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-ARM-EBSA285">StrongARM EBSA-285 Hardware Setup</H1
86
><P
87
>The eCos Developer&#8217;s Kit package comes with a ROM
88
image which provides GDB support for
89
the Intel&reg; StrongARM&reg; Evaluation Board EBSA-285.
90
 Both eCos and the Stub ROM image assume the clocks are: 3.6864
91
MHz PLL input for generating the core clock, and 50MHz osc input
92
for external clocks. An image of this ROM is also provided at <TT
93
CLASS="FILENAME"
94
>loaders/arm-ebsa285/gdbload.bin</TT
95
> under
96
the root of your eCos installation.</P
97
><P
98
>The ROM monitor image (an eCos GDB
99
stub) provided for the EBSA-285 board must be programmed into the
100
flash, replacing the Angel monitor on the board. Please refer to
101
the section titled "Loading the ROM Image into On-Board flash" on how
102
to program the ROM onto the board.</P
103
><P
104
>The Stub ROM allows communication with GDB via the serial
105
connector on the bulkhead mounting bracket COM0.  The communication
106
parameters are fixed at 38400 baud, 8 data bits, no parity bit and
107
1 stop bit (8-N-1).  No flow control is employed.</P
108
><DIV
109
CLASS="SECT2"
110
><H2
111
CLASS="SECT2"
112
><A
113
NAME="AEN3981">Building the GDB Stub FLASH ROM images</H2
114
><P
115
>Pre-built GDB stubs images are provided in the directory loaders/arm-ebsa285 relative
116
to the root of your eCos installation, but here are instructions
117
on how to rebuild them if you should ever need to.</P
118
></DIV
119
><DIV
120
CLASS="SECT2"
121
><H2
122
CLASS="SECT2"
123
><A
124
NAME="AEN3984">Building the GDB Stubs with the eCos Configuration Tool</H2
125
><P
126
></P
127
><OL
128
TYPE="1"
129
><LI
130
><P
131
>Start with a new document - selecting the
132
<SPAN
133
CLASS="emphasis"
134
><I
135
CLASS="EMPHASIS"
136
>File</I
137
></SPAN
138
>
139
-&#62;
140
<SPAN
141
CLASS="emphasis"
142
><I
143
CLASS="EMPHASIS"
144
>New</I
145
></SPAN
146
>
147
 menu item if necessary to do this.</P
148
></LI
149
><LI
150
><P
151
>Choose the
152
<SPAN
153
CLASS="emphasis"
154
><I
155
CLASS="EMPHASIS"
156
>Build</I
157
></SPAN
158
>
159
-&#62;
160
<SPAN
161
CLASS="emphasis"
162
><I
163
CLASS="EMPHASIS"
164
>Templates</I
165
></SPAN
166
>
167
 menu item, and then select the StrongARM EBSA285 hardware.</P
168
></LI
169
><LI
170
><P
171
>While still displaying the
172
<SPAN
173
CLASS="emphasis"
174
><I
175
CLASS="EMPHASIS"
176
>Build</I
177
></SPAN
178
>
179
-&#62;
180
<SPAN
181
CLASS="emphasis"
182
><I
183
CLASS="EMPHASIS"
184
>Templates</I
185
></SPAN
186
>
187
 dialog box, select the "stubs" package template to build a GDB
188
stub image. Click
189
<SPAN
190
CLASS="emphasis"
191
><I
192
CLASS="EMPHASIS"
193
>OK</I
194
></SPAN
195
>.</P
196
></LI
197
><LI
198
><P
199
>Build eCos using
200
<SPAN
201
CLASS="emphasis"
202
><I
203
CLASS="EMPHASIS"
204
>Build</I
205
></SPAN
206
>
207
-&#62;
208
<SPAN
209
CLASS="emphasis"
210
><I
211
CLASS="EMPHASIS"
212
>Library</I
213
></SPAN
214
></P
215
></LI
216
><LI
217
><P
218
>When the build completes, the image files can be found
219
in the bin/ subdirectory of the install tree. The GDB stub
220
ROM images have the prefix "gdb_module".</P
221
></LI
222
></OL
223
></DIV
224
><DIV
225
CLASS="SECT2"
226
><H2
227
CLASS="SECT2"
228
><A
229
NAME="AEN4006">Building the GDB Stub ROMs with ecosconfig</H2
230
><P
231
>(See &#8220;Using ecosconfig on UNIX&#8221; on&nbsp;page&nbsp;72)</P
232
><P
233
></P
234
><OL
235
TYPE="1"
236
><LI
237
><P
238
>Make an empty directory to contain the build tree,
239
and cd into it.</P
240
></LI
241
><LI
242
><P
243
>To build a GDB stub ROM image, enter the command:
244
 
245
<TABLE
246
BORDER="5"
247
BGCOLOR="#E0E0F0"
248
WIDTH="70%"
249
><TR
250
><TD
251
><PRE
252
CLASS="PROGRAMLISTING"
253
>$ ecosconfig new ebsa285 stubs</PRE
254
></TD
255
></TR
256
></TABLE
257
></P
258
></LI
259
><LI
260
><P
261
>Enter the commands:
262
 
263
<TABLE
264
BORDER="5"
265
BGCOLOR="#E0E0F0"
266
WIDTH="70%"
267
><TR
268
><TD
269
><PRE
270
CLASS="PROGRAMLISTING"
271
>$ ecosconfig tree
272
$ make</PRE
273
></TD
274
></TR
275
></TABLE
276
></P
277
></LI
278
><LI
279
><P
280
>When the build completes, the image files can be found
281
in the bin/ subdirectory of the install tree. The GDB stub
282
ROM images have the prefix "gdb_module".</P
283
></LI
284
></OL
285
></DIV
286
><DIV
287
CLASS="SECT2"
288
><H2
289
CLASS="SECT2"
290
><A
291
NAME="AEN4020">Loading the ROM Image into On-board Flash</H2
292
><P
293
>There are several ways to install the eCos gdb stub ROM image
294
in the EBSA board&#8217;s flash memory. Once installed, the gdb
295
stub ROM provides standard eCos download and debug via the EBSA
296
board&quot;s serial port. The options available include the
297
Linux based EBSA flash upgrade utility provided by Red Hat, direct writing
298
of the flash via MultiICE (JTAG) hardware debugger, and other flash management
299
utilities from Intel (these only support DOS, and proprietary ARM tools
300
and image formats). Only the Red Hat flash upgrade tool is supported
301
and tested in this release.</P
302
><P
303
>The flash upgrade tool requires the EBSA board to be configured
304
as a PCI slave (rather than a master, its normal operating mode)
305
and plugged into a Linux host computer&quot;s PCI bus.</P
306
><P
307
>Configuring the board for flash loading: Follow the instructions
308
in the EBSA-285 Reference Manual, pages A-2 and A-3 to configure
309
the board as an add-in card, and enable flash blank programming.
310
 Briefly: assuming the board was in the default setting to execute
311
as a bus master ("Host Bridge") make jumper 9 (J9), move jumper
312
10 (J10) to external reset (PCI_RST), and move jumper 15
313
(J15) link 4-6-5 to connect 5-6 instead of 4-6.</P
314
><P
315
>Configuring the board for execution of eCos programs: Follow
316
the instructions in the EBSA-285 Reference Manual, pages A-2 and
317
A-3 to configure the board as a "Host Bridge" with "Central Function".
318
 Briefly: unset J9, move J10 to on-board reset (BRD_RST),
319
and set J15 to make 4-6 instead of 5-6 (see page A-8 also).  Plug
320
the card into its own PCI bus, not the Linux PC used for the flash-programming
321
process.</P
322
><P
323
>Building the Linux software: the Linux software sources are
324
in directory</P
325
><TABLE
326
BORDER="5"
327
BGCOLOR="#E0E0F0"
328
WIDTH="70%"
329
><TR
330
><TD
331
><PRE
332
CLASS="PROGRAMLISTING"
333
>      &lt;BASE_DIR&#62;/packages/hal/arm/ebsa285/v1_3/support/linux/safl_util</PRE
334
></TD
335
></TR
336
></TABLE
337
><P
338
>in the eCos source repository.  There are two parts to the
339
system: a loadable kernel module and the flash utility.  The loadable
340
kernel module is safl.o and the utility is sa_flash.  To
341
build:</P
342
><P
343
>  cd to this directory, or a copy of it.</P
344
><P
345
>  make</P
346
><P
347
>This builds safl.o and sa_flash. The kernel module
348
must be installed, and a device file created for it. Both of these
349
operations require root permissions.  Create the device file by: </P
350
><TABLE
351
BORDER="5"
352
BGCOLOR="#E0E0F0"
353
WIDTH="70%"
354
><TR
355
><TD
356
><PRE
357
CLASS="PROGRAMLISTING"
358
>      % mknod /dev/safl c 10 178</PRE
359
></TD
360
></TR
361
></TABLE
362
><P
363
>Programming the flash: switch off the EBSA-285, and remove
364
the EBSA-285 board from its PCI bus.  Take appropriate anti-static
365
precautions. Configure it for flash loading as above, halt your
366
Linux system and turn it off.  Install the EBSA-285 board in the
367
PCI bus of the Linux system and boot it up. (Single user is good enough,
368
assuming your image and safl_util build dir are on a local
369
disc partition.)  Change directory to the safl_util directory,
370
then, to load the kernel module and flash an image onto the eval
371
board (as root): </P
372
><TABLE
373
BORDER="5"
374
BGCOLOR="#E0E0F0"
375
WIDTH="70%"
376
><TR
377
><TD
378
><PRE
379
CLASS="PROGRAMLISTING"
380
>       % insmod safl.o
381
       % sa_flash &lt;image_file&#62;</PRE
382
></TD
383
></TR
384
></TABLE
385
><P
386
>Halt and turn off the Linux machine and remove the EBSA-285
387
card.  Take appropriate anti-static precautions.  Configure it for
388
execution of eCos programs as above, and plug it into its own PCI
389
bus.  Restart the Linux machine however you wish.</P
390
><P
391
>This information is replicated in the README file within the
392
safl_util directory and its parents, and in the EBSA-285
393
Reference Manual from Intel, appendix A "Configuration Guide".
394
If in doubt, please refer to those documents also.</P
395
><P
396
>This procedure also applies for loading ROM-startup eCos programs
397
into the on-board flash memory, given a binary format image of the
398
program from arm-elf-objcopy.  Loading a ROM-startup eCos program
399
into flash will overwrite the StubROM in flash, so you would have
400
to reload the StubROM to return to normal RAM-startup program development.</P
401
></DIV
402
><DIV
403
CLASS="SECT2"
404
><H2
405
CLASS="SECT2"
406
><A
407
NAME="AEN4038">Running your eCos Program Using GDB and the StubROM</H2
408
><DIV
409
CLASS="NOTE"
410
><BLOCKQUOTE
411
CLASS="NOTE"
412
><P
413
><B
414
>Note: </B
415
>You must first load the StubROM image into the flash memory
416
on the EBSA-285 board before doing this.  See &#8220;Loading
417
the ROM Image into On-board Flash&#8221;, page 93 for details.</P
418
></BLOCKQUOTE
419
></DIV
420
><P
421
>Connect to the StubROM in the board and run your eCos program &lt;PROGRAM&#62; as</P
422
><P
423
>follows:</P
424
><TABLE
425
BORDER="5"
426
BGCOLOR="#E0E0F0"
427
WIDTH="70%"
428
><TR
429
><TD
430
><PRE
431
CLASS="PROGRAMLISTING"
432
>      $ arm-elf-gdb -nw &lt;PROGRAM&#62;
433
      (gdb) set remotebaud 38400
434
      (gdb) target remote &lt;DEVICE&#62;</PRE
435
></TD
436
></TR
437
></TABLE
438
><P
439
>Where &lt;DEVICE&#62; is /dev/ttyS0
440
or COM1: or similar, depending on your environment and how you connected
441
your serial line to the host computer. Expect some output here,
442
for example:</P
443
><TABLE
444
BORDER="5"
445
BGCOLOR="#E0E0F0"
446
WIDTH="70%"
447
><TR
448
><TD
449
><PRE
450
CLASS="PROGRAMLISTING"
451
>      Remote debugging using /dev/ttyS0
452
      0x410026a4 in ?? ()</PRE
453
></TD
454
></TR
455
></TABLE
456
><P
457
>then, to load the program</P
458
><TABLE
459
BORDER="5"
460
BGCOLOR="#E0E0F0"
461
WIDTH="70%"
462
><TR
463
><TD
464
><PRE
465
CLASS="PROGRAMLISTING"
466
>        (gdb) load
467
    </PRE
468
></TD
469
></TR
470
></TABLE
471
><P
472
>which will report locations and sizes of sections as they
473
load, then begin execution using</P
474
><TABLE
475
BORDER="5"
476
BGCOLOR="#E0E0F0"
477
WIDTH="70%"
478
><TR
479
><TD
480
><PRE
481
CLASS="PROGRAMLISTING"
482
>      (gdb) continue</PRE
483
></TD
484
></TR
485
></TABLE
486
><P
487
>If you have no eCos program yet, but you want to connect to
488
the board just to verify serial communications, tell gdb "set endian
489
little" before anything else, so that it understands the board (GDB
490
normally infers this from information within the eCos program).</P
491
><DIV
492
CLASS="NOTE"
493
><BLOCKQUOTE
494
CLASS="NOTE"
495
><P
496
><B
497
>Note: </B
498
>When an eCos program is run on the EBSA-285 board, the GDB
499
stub in ROM loses control. This means that if you require the ability
500
to stop execution on the target remotely, or want thread debugging
501
capabilities, you must include GDB stub support when configuring
502
<SPAN
503
CLASS="PRODUCTNAME"
504
>eCos</SPAN
505
>.</P
506
></BLOCKQUOTE
507
></DIV
508
></DIV
509
></DIV
510
><DIV
511
CLASS="NAVFOOTER"
512
><HR
513
ALIGN="LEFT"
514
WIDTH="100%"><TABLE
515
SUMMARY="Footer navigation table"
516
WIDTH="100%"
517
BORDER="0"
518
CELLPADDING="0"
519
CELLSPACING="0"
520
><TR
521
><TD
522
WIDTH="33%"
523
ALIGN="left"
524
VALIGN="top"
525
><A
526
HREF="setup-arm-clps7111.html"
527
ACCESSKEY="P"
528
>Prev</A
529
></TD
530
><TD
531
WIDTH="34%"
532
ALIGN="center"
533
VALIGN="top"
534
><A
535
HREF="ecos-user-guide.html"
536
ACCESSKEY="H"
537
>Home</A
538
></TD
539
><TD
540
WIDTH="33%"
541
ALIGN="right"
542
VALIGN="top"
543
><A
544
HREF="setup-arm-ipaq.html"
545
ACCESSKEY="N"
546
>Next</A
547
></TD
548
></TR
549
><TR
550
><TD
551
WIDTH="33%"
552
ALIGN="left"
553
VALIGN="top"
554
>Cirrus Logic ARM CL-PS7111 Evaluation Board Hardware Setup</TD
555
><TD
556
WIDTH="34%"
557
ALIGN="center"
558
VALIGN="top"
559
><A
560
HREF="appendix-target-setup.html"
561
ACCESSKEY="U"
562
>Up</A
563
></TD
564
><TD
565
WIDTH="33%"
566
ALIGN="right"
567
VALIGN="top"
568
>Compaq iPAQ PocketPC Hardware Setup</TD
569
></TR
570
></TABLE
571
></DIV
572
></BODY
573
></HTML
574
>

powered by: WebSVN 2.1.0

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