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. -->
12 >Cirrus Logic ARM EP7211 Development
13 Board Hardware Setup</TITLE
14 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
17 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
20 TITLE="eCos User Guide"
21 HREF="ecos-user-guide.html"><LINK
24 HREF="appendix-target-setup.html"><LINK
26 TITLE="ARM Cogent CMA230 Hardware Setup"
27 HREF="setup-arm-cma230.html"><LINK
29 TITLE="Cirrus Logic ARM EP7212 Development Board
31 HREF="setup-arm-ep7212.html"></HEAD
42 SUMMARY="Header navigation table"
59 HREF="setup-arm-cma230.html"
67 >Appendix A. Target Setup</TD
73 HREF="setup-arm-ep7212.html"
87 NAME="SETUP-ARM-EP7211">Cirrus Logic ARM EP7211 Development
88 Board Hardware Setup</H1
90 >eCos comes with two Flash ROM images that provide GDB support
91 for the Cirrus Logic EP7211 Development Board (also known as the
92 EDB7211).. Note that on some board revisions, the board is silk-screened
93 as EDB7111-2. The first Flash ROM image provides a port of the CygMon
94 ROM monitor, which includes a command-line interface and a GDB remote
95 stub. The second Flash ROM image provides a remote GDB stub only.</P
97 >Both ROM images are provided in the directory loaders/arm-edb7211
98 under the root of your eCos installation. CygMon images are prefixed
99 with the name 'edb7211_cygmon' and are
100 provided in a number of formats including binary (.bin extension)
101 and SREC (.srec) extension. GDB stub ROM images are given the prefix 'edb7211_gdb_module'. </P
103 >The ROM images provided for the EP7211 Development Board must
104 be programmed into the FLASH. Please refer to the section titled
105 "Loading the ROM image into On-Board flash" on how to program the
106 ROM onto the board.</P
108 >Both Cygmon and GDB Stub ROMS allow communication with GDB
109 via the serial connector labelled 'UART 1'. The
110 communication parameters are fixed at 38400 baud, 8 data bits, no
111 parity bit and 1 stop bit (8-N-1). No flow control is employed.
112 Connection to the host computer should be made using a null modem cable.
113 A gender changer may also be required. Note that the GDB Configuration tool
114 uses the serial port identifiers 0 and 1 to identify the EB7211
115 serial ports UART1 and UART2 respectively.</P
117 >Both eCos and the ROM images assume the core clock is generated
118 with a 3.6864 MHz PLL input. The CPU will be configured to run at
121 >Note: The EP7211 CPU needs a two step RESET process. After
122 pressing the `URESET' pushbutton, the `WAKEUP' pushbutton
123 must be pressed to complete the process.</P
131 >When an eCos program is run on an EDB7211 board fitted with
132 either CygMon or a GDB stub ROM, then the code in ROM loses control.
133 This means that if you require the ability to remotely stop execution
134 on the target, or want thread debugging capabilities, you must include
135 GDB stub support when configuring eCos.</P
143 NAME="AEN3826">Building programs for programming into FLASH</H2
145 >If your application is to be run directly from FLASH, you
146 must configure eCos appropriately for "ROM" startup. This can be
151 >eCos Configuration Tool</I
154 the "Startup type" HAL option to "ROM". If using the ecosconfig utility,
155 set the user_value of the CYG_HAL_STARTUP
156 option in ecos.ecc to "ROM".</P
158 >When you have linked your application with eCos, you will
159 then have an ELF executable. To convert this into a format appropriate
160 for the Cirrus Logic FLASH download utility, or the dl_7xxx
161 utility on Linux, you can use the utility arm-elf-objcopy, as in
162 the following example:</P
170 CLASS="PROGRAMLISTING"
171 >$ arm-elf-objcopy -O binary helloworld.exe helloworld.bin</PRE
176 >This will produce a binary format image helloworld.bin which
177 can be downloaded into FLASH.</P
184 NAME="AEN3833">Building the GDB Stub FLASH ROM images</H2
186 >Pre-built GDB stubs images are provided in the directory loaders/arm-edb7211 relative
187 to the root of your eCos installation, but here are instructions
188 on how to rebuild them if you should ever need to.</P
190 >CygMon images are prefixed with the name 'cygmon' and
191 GDB stub ROM images are given the prefix 'gdb_module'.
192 Images may be provided in a number of formats including ELF (.img
193 extension), binary (.bin extension) and SREC (.srec extension). </P
200 NAME="AEN3837">Building the ROM images with the eCos Configuration Tool</H2
207 >Start with a new document - selecting the
221 menu item if necessary to do this.</P
239 menu item, and then select the "Cirrus Logic development board"
244 >While still displaying the
260 dialog box, select either the "stubs" package template to build
261 a GDB stub image, or the "cygmon" template to build the CygMon ROM
292 >When the build completes, the image files can be found
293 in the bin/ subdirectory of the install tree. GDB stub
294 ROM images have the prefix "gdb_module". CygMon images
295 have the prefix "cygmon".</P
304 NAME="AEN3859">Building the ROM images with ecosconfig</H2
311 >Make an empty directory to contain the build tree,
316 >To build a GDB stub ROM image, enter the command:</P
324 CLASS="PROGRAMLISTING"
325 >$ ecosconfig new edb7xxx stubs</PRE
330 >or to build a CygMon ROM monitor image, enter the command:</P
338 CLASS="PROGRAMLISTING"
339 >$ ecosconfig new edb7xxx cygmon</PRE
346 >Enter the commands:</P
354 CLASS="PROGRAMLISTING"
363 >When the build completes, the image files can be found
364 in the bin/ subdirectory of the install tree. GDB stub
365 ROM images have the prefix "gdb_module". CygMon images
366 have the prefix "cygmon".</P
375 NAME="AEN3874">Loading the ROM Image into On-board Flash</H2
377 >Program images can be written into Flash memory by means of
378 a bootstrap program which is built into the EDB7211. This program
379 communicates with a support program on your host to download and
380 program an image into the Flash memory.</P
382 >Cirrus Logic provides such a program for use with Windows/DOS.
383 eCos comes with a similar program which will run under Linux. The
384 basic operation of both programs is the same.</P
391 >Connect a serial line to 'UART 1'.</P
395 >Power off the EDB7211.</P
399 >Install jumper 'PROGRAM ENABLE' which
400 enables this special mode for downloading Flash images. Note that
401 some board revisions have this jumper labelled “BOOT ENABLE”.</P
405 >Power on the EDB7211.</P
409 >Execute the Flash writing program on your host. On Linux,
418 CLASS="PROGRAMLISTING"
419 > # dl_edb7xxx <PATH>/gdb_module.bin</PRE
424 >where '<PATH>' is the path to
425 the binary format version of the ROM image you wish to load, either
426 as built in the previous section or the "loaders/arm-edb7211/" subdirectory
427 of your eCos installation. The download tool defaults to 38400 baud and
428 device /dev/ttyS1 for communication. To change
429 these, specify them as parameters, e.g.
438 CLASS="PROGRAMLISTING"
439 ># dl_edb7xxx <PATH>/gdb_module.bin 9600 /dev/ttyS0</PRE
446 >The download program will indicate that it is waiting
447 for the board to come alive. At this point, press 'RESET' and
448 then 'WAKEUP' switches in order. There should be
449 some indication of progress, first of the code being downloaded,
450 then of the programming process.</P
454 >Upon completion of the programming, power off the EDB7211.</P
458 >Remove the 'PROGRAM ENABLE/BOOT ENABLE' jumper.</P
462 >Power on the EDB7211, press 'RESET' and 'WAKEUP'.
463 The new ROM image should now be running on the board.</P
467 >The GDB debugger will now be able to communicate with
468 the board to download and debug RAM based programs.
470 This procedure also applies for loading ROM-startup eCos programs
471 into the on-board FLASH memory, given a binary format image of the
472 program from arm-elf-objcopy. Loading a ROM-startup eCos program
473 into Flash will overwrite the GDB Stub ROM/CygMon in Flash,
474 so you would have to reload the GDB Stub ROM/CygMon to
475 return to normal RAM-startup program development.</P
484 NAME="AEN3902">Building the Flash Downloader on Linux</H2
486 >eCos provides a Flash download program suitable for use with
487 the EP7211 Development Board which will run on Linux. Follow these
488 steps to build this program. Note: at the time of the writing of
489 these instructions, the download program is built directly within
490 the eCos source repository since it is
491 not configuration specific.</P
499 CLASS="PROGRAMLISTING"
500 > # cd <eCos install dir>/packages/hal/arm/edb7xxx/<TT
503 ><version></I
516 CLASS="PROGRAMLISTING"
522 >(where '# ' is your shell prompt)</P
524 >Note: this program was adapted from the Cirrus Logic original
525 DOS program and still contains some vestiges of that environment.</P
532 NAME="AEN3910">Developing eCos Programs with the ARM Multi-ICE</H2
534 >The EP7211 Development Board supports use of the ARM
535 Multi-processor EmbeddedICE(tm), also known as the
536 Multi-ICE. Full instructions on how to install and use the
537 Multi-ICE in conjunction with GDB are provided in the
542 >"GNUPro Toolkit Reference for eCos
545 > manual. However, the following
546 platform-specific details should be noted.</P
548 >You will need an ARM Multi-ICE Server configuration
549 file for the EP7211 Development Board. Here is a suggested
550 configuration file to use:</P
558 CLASS="PROGRAMLISTING"
559 >======== File "720T.cfg" ========
562 Multi-ICE configuration for EP7211
574 ==================================</PRE
579 >You must ensure that the board has the appropriate soldered
580 connections. For the EP7211 this involves connecting TEST0 and TEST1
581 of the EP7211 to ground. To do this you must solder a wire from
582 ground at JP33 to TP8 and TP9.</P
584 >With respect to using multiple devices simultaneously, note
585 that the EP7211 is not ID sensitive.</P
587 >If you wish to view diagnostic output from your program that
588 was downloaded via the Multi-ICE, you will note that by default
589 the output on the serial line (as viewed by a terminal such as Hyperterm
590 in Windows, or cu in Unix) is in the form of GDB packets.</P
592 >To get legible output, the solution is to set the "GDB Serial
593 port" to a different device from the "Diagnostic serial port", and
594 you should use the Diagnostic serial port to view the diagnostic
597 >Warning: The multi-ice-gdb-server will fail on startup if
598 the board has not been both reset and awakened before running the
601 >To resolve this, it is necessary to free up the connection
602 from within the ARM Multi-ICE server itself. However when this happens,
603 the next time you use GDB to load the program into the board, you
604 will see lots of "Readback did not match original data" messages
605 in the output of the multi-ice-gdb-server program. This indicates
606 your program did not load correctly, and you should restart the
607 multi-ice-gdb-server program, taking care to reset the board correctly
608 before reconnecting. </P
610 >As a reminder, you must specify --config-dialog to the
611 multi-ice-gdb-server program to connect to the board
612 correctly. If you do not, the multi-ice-gdb-server program
613 will not be able to connect.</P
621 SUMMARY="Footer navigation table"
632 HREF="setup-arm-cma230.html"
641 HREF="ecos-user-guide.html"
650 HREF="setup-arm-ep7212.html"
660 >ARM Cogent CMA230 Hardware Setup</TD
666 HREF="appendix-target-setup.html"
674 >Cirrus Logic ARM EP7212 Development Board