]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/user-guide/setup-arm-aeb1.html
e37a1e440a2b2f04386ba906041d04cc19721a27
[karo-tx-redboot.git] / doc / html / user-guide / setup-arm-aeb1.html
1 <!-- 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 >ARM AEB-1 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="ARM PID Hardware Setup"
26 HREF="setup-arm-pid.html"><LINK
27 REL="NEXT"
28 TITLE="ARM Cogent CMA230 Hardware Setup"
29 HREF="setup-arm-cma230.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-pid.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-cma230.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-AEB1">ARM AEB-1 Hardware Setup</H1
86 ><DIV
87 CLASS="SECT2"
88 ><H2
89 CLASS="SECT2"
90 ><A
91 NAME="AEN3686">Overview</H2
92 ><P
93 >The ARM AEB-1 comes with tools in ROM. These include a simple
94 FLASH management tool and the Angel&reg; monitor. eCos for
95 the ARM AEB-1 comes with GDB stubs suitable for programming into
96 the onboard FLASH. GDB is the preferred debug environment for GDB,
97 and while Angel provides a subset of the features in the eCos GDB
98 stub, Angel is unsupported.</P
99 ><P
100 >Both eCos and the stubs support both Revision B and Revision
101 C of the AEB-1 board. Stub ROM images for both types of board can
102 be found in the loaders/arm-aeb directory under the root
103 of your eCos installation. You can select which board you are using
104 by selecting either the aeb or aebC platform by selecting the appropriate
105 platform HAL in the <SPAN
106 CLASS="emphasis"
107 ><I
108 CLASS="EMPHASIS"
109 >eCos Configuration Tool</I
110 ></SPAN
111 >.</P
112 ><P
113 >The GDB stub can be downloaded to the board for programming
114 in the FLASH using the board's on-board ROM monitor:</P
115 ><P
116 ></P
117 ><OL
118 TYPE="1"
119 ><LI
120 ><P
121 >talk to the AEB-1 board with a terminal emulator (or
122 a real terminal!)</P
123 ></LI
124 ><LI
125 ><P
126 >use the board's rom menu to download a UU-encoded
127 version of the GDB stubs which will act as a ROM monitor</P
128 ></LI
129 ><LI
130 ><P
131 >tell the board to use this new monitor, and then hook
132 GDB up to it for real debugging</P
133 ></LI
134 ></OL
135 ></DIV
136 ><DIV
137 CLASS="SECT2"
138 ><H2
139 CLASS="SECT2"
140 ><A
141 NAME="AEN3699">Talking to the Board</H2
142 ><P
143 >Connect a terminal or computer's serial port to the
144 ARM AEB-1. On a PC with a 9-pin serial port, you can use the cable
145 shipped by ARM with no modification. </P
146 ><P
147 >Set the terminal or terminal emulator to 9600N1 (9600 baud,
148 no parity, 1 stop bit). </P
149 ><P
150 >Reset the board by pressing the little reset button on the
151 top. You will see the following text: </P
152 ><TABLE
153 BORDER="5"
154 BGCOLOR="#E0E0F0"
155 WIDTH="70%"
156 ><TR
157 ><TD
158 ><PRE
159 CLASS="PROGRAMLISTING"
160 >       ARM Evaluation Board Boot Monitor 0.01 (19 APR 1998)
161         Press ENTER within 2 seconds to stop autoboot</PRE
162 ></TD
163 ></TR
164 ></TABLE
165 ><P
166 >Press ENTER quickly, and you will get the boot prompt: </P
167 ><TABLE
168 BORDER="5"
169 BGCOLOR="#E0E0F0"
170 WIDTH="70%"
171 ><TR
172 ><TD
173 ><PRE
174 CLASS="PROGRAMLISTING"
175 >       Boot:</PRE
176 ></TD
177 ></TR
178 ></TABLE
179 ></DIV
180 ><DIV
181 CLASS="SECT2"
182 ><H2
183 CLASS="SECT2"
184 ><A
185 NAME="AEN3707">Downloading the Stubs via the Rom Menu</H2
186 ><P
187 >Using the AEB-1 rom menu to download the GDB stubs from the
188 provided ".UU" file.</P
189 ><DIV
190 CLASS="NOTE"
191 ><BLOCKQUOTE
192 CLASS="NOTE"
193 ><P
194 ><B
195 >Note: </B
196 >This is an annotated 'terminal' session
197 with the AEB-1 monitor:</P
198 ></BLOCKQUOTE
199 ></DIV
200 ><TABLE
201 BORDER="5"
202 BGCOLOR="#E0E0F0"
203 WIDTH="70%"
204 ><TR
205 ><TD
206 ><PRE
207 CLASS="PROGRAMLISTING"
208 >+Boot: help
209 Module is BootStrap       1.00 (14 Aug 1998)</PRE
210 ></TD
211 ></TR
212 ></TABLE
213 ><TABLE
214 BORDER="5"
215 BGCOLOR="#E0E0F0"
216 WIDTH="70%"
217 ><TR
218 ><TD
219 ><PRE
220 CLASS="PROGRAMLISTING"
221 >Help is available on:</PRE
222 ></TD
223 ></TR
224 ></TABLE
225 ><TABLE
226 BORDER="5"
227 BGCOLOR="#E0E0F0"
228 WIDTH="70%"
229 ><TR
230 ><TD
231 ><PRE
232 CLASS="PROGRAMLISTING"
233 >Help          Modules       ROMModules    UnPlug        PlugIn
234 Kill          SetEnv        UnSetEnv      PrintEnv      DownLoad
235 Go            GoS           Boot          PC            FlashWrite
236 FlashLoad     FlashErase</PRE
237 ></TD
238 ></TR
239 ></TABLE
240 ><TABLE
241 BORDER="5"
242 BGCOLOR="#E0E0F0"
243 WIDTH="70%"
244 ><TR
245 ><TD
246 ><PRE
247 CLASS="PROGRAMLISTING"
248 >Boot: download c000
249 Ready to download. Use 'transmit' option on terminal
250 emulator to download file.</PRE
251 ></TD
252 ></TR
253 ></TABLE
254 ><TABLE
255 BORDER="5"
256 BGCOLOR="#E0E0F0"
257 WIDTH="70%"
258 ><TR
259 ><TD
260 ><PRE
261 CLASS="PROGRAMLISTING"
262 >... at this point, download the ASCII file "loaders/arm-aeb/
263     gdb_module.img.UU". The details of this operation differ
264     depending on which terminal emulator is used. It may be
265     necessary to enter "^D" (control+D) when the download completes
266    to get the monitor to return to command mode. </PRE
267 ></TD
268 ></TR
269 ></TABLE
270 ><TABLE
271 BORDER="5"
272 BGCOLOR="#E0E0F0"
273 WIDTH="70%"
274 ><TR
275 ><TD
276 ><PRE
277 CLASS="PROGRAMLISTING"
278 >Loaded file gdb_module.img.bin at address
279 0000c000, size = 19392 </PRE
280 ></TD
281 ></TR
282 ></TABLE
283 ></DIV
284 ><DIV
285 CLASS="SECT2"
286 ><H2
287 CLASS="SECT2"
288 ><A
289 NAME="AEN3718">Activating the GDB Stubs</H2
290 ><P
291 >Commit the GDB stubs module to FLASH: </P
292 ><TABLE
293 BORDER="5"
294 BGCOLOR="#E0E0F0"
295 WIDTH="70%"
296 ><TR
297 ><TD
298 ><PRE
299 CLASS="PROGRAMLISTING"
300 >       Boot: flashwrite 4018000 C000 8000
301     </PRE
302 ></TD
303 ></TR
304 ></TABLE
305 ><P
306 >Verify that the eCos/"GDB stubs" module is now added
307 in the list of modules in the board: </P
308 ><TABLE
309 BORDER="5"
310 BGCOLOR="#E0E0F0"
311 WIDTH="70%"
312 ><TR
313 ><TD
314 ><PRE
315 CLASS="PROGRAMLISTING"
316 >       Boot: rommodules
317     </PRE
318 ></TD
319 ></TR
320 ></TABLE
321 ><P
322 >You should see output similar to the following: </P
323 ><TABLE
324 BORDER="5"
325 BGCOLOR="#E0E0F0"
326 WIDTH="70%"
327 ><TR
328 ><TD
329 ><PRE
330 CLASS="PROGRAMLISTING"
331 >       Header   Base     Limit
332         04000004 04000000 040034a8 BootStrap       1.00 (14 Aug 1998) 
333         04003a74 04003800 04003bc0 Production Test 1.00 (13 Aug 1998) 
334         0400e4f4 04004000 0400e60f Angel           1.02 (12 MAY 1998) 
335         0401c810 04018000 0401cbc0 eCos              1.3  (27 Jan 2000)
336 GDB stubs
337     </PRE
338 ></TD
339 ></TR
340 ></TABLE
341 ><P
342 >Now make the eCos/"GDB stubs" module be the default
343 monitor: </P
344 ><TABLE
345 BORDER="5"
346 BGCOLOR="#E0E0F0"
347 WIDTH="70%"
348 ><TR
349 ><TD
350 ><PRE
351 CLASS="PROGRAMLISTING"
352 >       Boot: plugin eCos
353     </PRE
354 ></TD
355 ></TR
356 ></TABLE
357 ><DIV
358 CLASS="NOTE"
359 ><BLOCKQUOTE
360 CLASS="NOTE"
361 ><P
362 ><B
363 >Note: </B
364 >Since the GDB stubs are always linked at the same address
365 (0x4018000), the operation of writing to the FLASH and selecting
366 the stubs as default monitor is an idempotent operation. You can
367 download a new set of stubs following the same procedure - you do
368 not have to unregister or delete anything.</P
369 ></BLOCKQUOTE
370 ></DIV
371 ></DIV
372 ><DIV
373 CLASS="SECT2"
374 ><H2
375 CLASS="SECT2"
376 ><A
377 NAME="AEN3730">Building the GDB Stub FLASH ROM Images</H2
378 ><P
379 >Pre-built GDB stubs images are provided in the directory loaders/arm-aeb
380 relative to the root of your eCos installation, but here are instructions
381 on how to rebuild them if you should ever need to.</P
382 ></DIV
383 ><DIV
384 CLASS="SECT2"
385 ><H2
386 CLASS="SECT2"
387 ><A
388 NAME="AEN3733">Building the GDB Stubs with the eCos Configuration Tool</H2
389 ><P
390 ></P
391 ><OL
392 TYPE="1"
393 ><LI
394 ><P
395 >Start with a new document - selecting the 
396 <SPAN
397 CLASS="emphasis"
398 ><I
399 CLASS="EMPHASIS"
400 >File</I
401 ></SPAN
402 >
403 -&#62;
404 <SPAN
405 CLASS="emphasis"
406 ><I
407 CLASS="EMPHASIS"
408 >New</I
409 ></SPAN
410 >
411  menu item if necessary to do this.</P
412 ></LI
413 ><LI
414 ><P
415 >Choose the 
416 <SPAN
417 CLASS="emphasis"
418 ><I
419 CLASS="EMPHASIS"
420 >Build</I
421 ></SPAN
422 >
423 -&#62;
424 <SPAN
425 CLASS="emphasis"
426 ><I
427 CLASS="EMPHASIS"
428 >Templates</I
429 ></SPAN
430 >
431  menu item, and then select the ARM AEB-1 hardware.</P
432 ></LI
433 ><LI
434 ><P
435 >While still displaying the 
436 <SPAN
437 CLASS="emphasis"
438 ><I
439 CLASS="EMPHASIS"
440 >Build-&#62;Templates</I
441 ></SPAN
442 >
443  dialog box, select the "stubs" package template to build a GDB
444 stub image. Click 
445 <SPAN
446 CLASS="emphasis"
447 ><I
448 CLASS="EMPHASIS"
449 >OK</I
450 ></SPAN
451 >.</P
452 ></LI
453 ><LI
454 ><P
455 >If applicable, set the "AEB board revision" option to
456 "C" from "B" depending on the board revision being used.</P
457 ></LI
458 ><LI
459 ><P
460 >Build eCos using 
461 <SPAN
462 CLASS="emphasis"
463 ><I
464 CLASS="EMPHASIS"
465 >Build</I
466 ></SPAN
467 >
468 -&#62;
469 <SPAN
470 CLASS="emphasis"
471 ><I
472 CLASS="EMPHASIS"
473 >Library.</I
474 ></SPAN
475 ></P
476 ></LI
477 ><LI
478 ><P
479 >When the build completes, the image files can be found
480 in the bin/ subdirectory of the install tree. The GDB stub
481 ROM images have the prefix "gdb_module".</P
482 ></LI
483 ></OL
484 ></DIV
485 ><DIV
486 CLASS="SECT2"
487 ><H2
488 CLASS="SECT2"
489 ><A
490 NAME="AEN3756">Building the GDB Stub ROMs with ecosconfig</H2
491 ><P
492 ></P
493 ><OL
494 TYPE="1"
495 ><LI
496 ><P
497 >Make an empty directory to contain the build tree,
498 and cd into it.</P
499 ></LI
500 ><LI
501 ><P
502 >To build a GDB stub ROM image, enter the command:</P
503 ><TABLE
504 BORDER="5"
505 BGCOLOR="#E0E0F0"
506 WIDTH="70%"
507 ><TR
508 ><TD
509 ><PRE
510 CLASS="PROGRAMLISTING"
511 >$ ecosconfig new aeb stubs</PRE
512 ></TD
513 ></TR
514 ></TABLE
515 ></LI
516 ><LI
517 ><P
518 >If applicable, edit ecos.ecc and set the AEB board revision. (CYGHWR_HAL_ARM_AEB_REVISION)
519 from the default "B" to "C" by uncommenting the user_value
520 property and setting it to "C".</P
521 ></LI
522 ><LI
523 ><P
524 >Enter the commands
525  
526 <TABLE
527 BORDER="5"
528 BGCOLOR="#E0E0F0"
529 WIDTH="70%"
530 ><TR
531 ><TD
532 ><PRE
533 CLASS="PROGRAMLISTING"
534 >$ ecosconfig tree
535 $ make</PRE
536 ></TD
537 ></TR
538 ></TABLE
539 ></P
540 ></LI
541 ><LI
542 ><P
543 >When the build completes, the image files can be found
544 in the bin/ subdirectory of the install tree. The GDB stub
545 ROM images have the prefix "gdb_module".</P
546 ></LI
547 ></OL
548 ></DIV
549 ></DIV
550 ><DIV
551 CLASS="NAVFOOTER"
552 ><HR
553 ALIGN="LEFT"
554 WIDTH="100%"><TABLE
555 SUMMARY="Footer navigation table"
556 WIDTH="100%"
557 BORDER="0"
558 CELLPADDING="0"
559 CELLSPACING="0"
560 ><TR
561 ><TD
562 WIDTH="33%"
563 ALIGN="left"
564 VALIGN="top"
565 ><A
566 HREF="setup-arm-pid.html"
567 ACCESSKEY="P"
568 >Prev</A
569 ></TD
570 ><TD
571 WIDTH="34%"
572 ALIGN="center"
573 VALIGN="top"
574 ><A
575 HREF="ecos-user-guide.html"
576 ACCESSKEY="H"
577 >Home</A
578 ></TD
579 ><TD
580 WIDTH="33%"
581 ALIGN="right"
582 VALIGN="top"
583 ><A
584 HREF="setup-arm-cma230.html"
585 ACCESSKEY="N"
586 >Next</A
587 ></TD
588 ></TR
589 ><TR
590 ><TD
591 WIDTH="33%"
592 ALIGN="left"
593 VALIGN="top"
594 >ARM PID Hardware Setup</TD
595 ><TD
596 WIDTH="34%"
597 ALIGN="center"
598 VALIGN="top"
599 ><A
600 HREF="appendix-target-setup.html"
601 ACCESSKEY="U"
602 >Up</A
603 ></TD
604 ><TD
605 WIDTH="33%"
606 ALIGN="right"
607 VALIGN="top"
608 >ARM Cogent CMA230 Hardware Setup</TD
609 ></TR
610 ></TABLE
611 ></DIV
612 ></BODY
613 ></HTML
614 >