📄 setup-arm-ebsa285.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>StrongARM EBSA-285 Hardware Setup</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Target Setup"HREF="appendix-target-setup.html"><LINKREL="PREVIOUS"TITLE="Cirrus Logic ARM CL-PS7111 Evaluation Board Hardware Setup"HREF="setup-arm-clps7111.html"><LINKREL="NEXT"TITLE=" Compaq iPAQ PocketPC Hardware Setup"HREF="setup-arm-ipaq.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="setup-arm-clps7111.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix A. Target Setup</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="setup-arm-ipaq.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="SETUP-ARM-EBSA285">StrongARM EBSA-285 Hardware Setup</H1><P>The eCos Developer’s Kit package comes with a ROMimage which provides GDB support forthe Intel® StrongARM® Evaluation Board EBSA-285. Both eCos and the Stub ROM image assume the clocks are: 3.6864MHz PLL input for generating the core clock, and 50MHz osc inputfor external clocks. An image of this ROM is also provided at <TTCLASS="FILENAME">loaders/arm-ebsa285/gdbload.bin</TT> underthe root of your eCos installation.</P><P>The ROM monitor image (an eCos GDBstub) provided for the EBSA-285 board must be programmed into theflash, replacing the Angel monitor on the board. Please refer tothe section titled "Loading the ROM Image into On-Board flash" on howto program the ROM onto the board.</P><P>The Stub ROM allows communication with GDB via the serialconnector on the bulkhead mounting bracket COM0. The communicationparameters are fixed at 38400 baud, 8 data bits, no parity bit and1 stop bit (8-N-1). No flow control is employed.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3981">Building the GDB Stub FLASH ROM images</H2><P>Pre-built GDB stubs images are provided in the directory loaders/arm-ebsa285 relativeto the root of your eCos installation, but here are instructionson how to rebuild them if you should ever need to.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3984">Building the GDB Stubs with the eCos Configuration Tool</H2><P></P><OLTYPE="1"><LI><P>Start with a new document - selecting the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">File</I></SPAN>-><SPANCLASS="emphasis"><ICLASS="EMPHASIS">New</I></SPAN> menu item if necessary to do this.</P></LI><LI><P>Choose the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Build</I></SPAN>-><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Templates</I></SPAN> menu item, and then select the StrongARM EBSA285 hardware.</P></LI><LI><P>While still displaying the <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Build</I></SPAN>-><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Templates</I></SPAN> dialog box, select the "stubs" package template to build a GDBstub image. Click <SPANCLASS="emphasis"><ICLASS="EMPHASIS">OK</I></SPAN>.</P></LI><LI><P>Build eCos using <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Build</I></SPAN>-><SPANCLASS="emphasis"><ICLASS="EMPHASIS">Library</I></SPAN></P></LI><LI><P>When the build completes, the image files can be foundin the bin/ subdirectory of the install tree. The GDB stubROM images have the prefix "gdb_module".</P></LI></OL></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN4006">Building the GDB Stub ROMs with ecosconfig</H2><P>(See “Using ecosconfig on UNIX” on page 72)</P><P></P><OLTYPE="1"><LI><P>Make an empty directory to contain the build tree,and cd into it.</P></LI><LI><P>To build a GDB stub ROM image, enter the command:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig new ebsa285 stubs</PRE></TD></TR></TABLE></P></LI><LI><P>Enter the commands: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ ecosconfig tree$ make</PRE></TD></TR></TABLE></P></LI><LI><P>When the build completes, the image files can be foundin the bin/ subdirectory of the install tree. The GDB stubROM images have the prefix "gdb_module".</P></LI></OL></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN4020">Loading the ROM Image into On-board Flash</H2><P>There are several ways to install the eCos gdb stub ROM imagein the EBSA board’s flash memory. Once installed, the gdbstub ROM provides standard eCos download and debug via the EBSAboard"s serial port. The options available include theLinux based EBSA flash upgrade utility provided by Red Hat, direct writingof the flash via MultiICE (JTAG) hardware debugger, and other flash managementutilities from Intel (these only support DOS, and proprietary ARM toolsand image formats). Only the Red Hat flash upgrade tool is supportedand tested in this release.</P><P>The flash upgrade tool requires the EBSA board to be configuredas a PCI slave (rather than a master, its normal operating mode)and plugged into a Linux host computer"s PCI bus.</P><P>Configuring the board for flash loading: Follow the instructionsin the EBSA-285 Reference Manual, pages A-2 and A-3 to configurethe board as an add-in card, and enable flash blank programming. Briefly: assuming the board was in the default setting to executeas a bus master ("Host Bridge") make jumper 9 (J9), move jumper10 (J10) to external reset (PCI_RST), and move jumper 15(J15) link 4-6-5 to connect 5-6 instead of 4-6.</P><P>Configuring the board for execution of eCos programs: Followthe instructions in the EBSA-285 Reference Manual, pages A-2 andA-3 to configure the board as a "Host Bridge" with "Central Function". Briefly: unset J9, move J10 to on-board reset (BRD_RST),and set J15 to make 4-6 instead of 5-6 (see page A-8 also). Plugthe card into its own PCI bus, not the Linux PC used for the flash-programmingprocess.</P><P>Building the Linux software: the Linux software sources arein directory</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> <BASE_DIR>/packages/hal/arm/ebsa285/v1_3/support/linux/safl_util</PRE></TD></TR></TABLE><P>in the eCos source repository. There are two parts to thesystem: a loadable kernel module and the flash utility. The loadablekernel module is safl.o and the utility is sa_flash. Tobuild:</P><P> cd to this directory, or a copy of it.</P><P> make</P><P>This builds safl.o and sa_flash. The kernel modulemust be installed, and a device file created for it. Both of theseoperations require root permissions. Create the device file by: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> % mknod /dev/safl c 10 178</PRE></TD></TR></TABLE><P>Programming the flash: switch off the EBSA-285, and removethe EBSA-285 board from its PCI bus. Take appropriate anti-staticprecautions. Configure it for flash loading as above, halt yourLinux system and turn it off. Install the EBSA-285 board in thePCI bus of the Linux system and boot it up. (Single user is good enough,assuming your image and safl_util build dir are on a localdisc partition.) Change directory to the safl_util directory,then, to load the kernel module and flash an image onto the evalboard (as root): </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> % insmod safl.o % sa_flash <image_file></PRE></TD></TR></TABLE><P>Halt and turn off the Linux machine and remove the EBSA-285card. Take appropriate anti-static precautions. Configure it forexecution of eCos programs as above, and plug it into its own PCIbus. Restart the Linux machine however you wish.</P><P>This information is replicated in the README file within thesafl_util directory and its parents, and in the EBSA-285Reference Manual from Intel, appendix A "Configuration Guide". If in doubt, please refer to those documents also.</P><P>This procedure also applies for loading ROM-startup eCos programsinto the on-board flash memory, given a binary format image of theprogram from arm-elf-objcopy. Loading a ROM-startup eCos programinto flash will overwrite the StubROM in flash, so you would haveto reload the StubROM to return to normal RAM-startup program development.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN4038">Running your eCos Program Using GDB and the StubROM</H2><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>Note: </B>You must first load the StubROM image into the flash memoryon the EBSA-285 board before doing this. See “Loadingthe ROM Image into On-board Flash”, page 93 for details.</P></BLOCKQUOTE></DIV><P>Connect to the StubROM in the board and run your eCos program <PROGRAM> as</P><P>follows:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> $ arm-elf-gdb -nw <PROGRAM> (gdb) set remotebaud 38400 (gdb) target remote <DEVICE></PRE></TD></TR></TABLE><P>Where <DEVICE> is /dev/ttyS0or COM1: or similar, depending on your environment and how you connectedyour serial line to the host computer. Expect some output here,for example:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> Remote debugging using /dev/ttyS0 0x410026a4 in ?? ()</PRE></TD></TR></TABLE><P>then, to load the program</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> (gdb) load </PRE></TD></TR></TABLE><P>which will report locations and sizes of sections as theyload, then begin execution using</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> (gdb) continue</PRE></TD></TR></TABLE><P>If you have no eCos program yet, but you want to connect tothe board just to verify serial communications, tell gdb "set endianlittle" before anything else, so that it understands the board (GDBnormally infers this from information within the eCos program).</P><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>Note: </B>When an eCos program is run on the EBSA-285 board, the GDBstub in ROM loses control. This means that if you require the abilityto stop execution on the target remotely, or want thread debuggingcapabilities, you must include GDB stub support when configuring<SPANCLASS="PRODUCTNAME">eCos</SPAN>.</P></BLOCKQUOTE></DIV></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="setup-arm-clps7111.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="setup-arm-ipaq.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Cirrus Logic ARM CL-PS7111 Evaluation Board Hardware Setup</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="appendix-target-setup.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Compaq iPAQ PocketPC Hardware Setup</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -