?? target-setup.sgml
字號:
can be determined by setting up the board according to the belowinstructions and powering up the board. The EPPC-Bug prompt shouldappear on the SMC1 connector at 9600 baud, 8N1.</PARA><ORDEREDLIST><LISTITEM><PARA>Set jumper 3 to 2-3 [allow XU2 FLASH tobe programmed]</PARA></LISTITEM><LISTITEM><PARA>Set jumper 4 to 2-3 [boot EPPC-Bug]</PARA></LISTITEM></ORDEREDLIST><SECT4><TITLE> Program FLASH</TITLE><ORDEREDLIST><LISTITEM><PARA> Prepare EPPC-Bug for download:</PARA><PROGRAMLISTING>EPPC-Bug>lo 0</PROGRAMLISTING><PARA>At this point the monitor is ready for input. It will not returnthe prompt until the file has been downloaded.</PARA></LISTITEM><LISTITEM><PARA>Use the terminal emulator’s ASCII download feature(or a simple clipboard copy/paste operation) to downloadthe gdb_module.srec data.Note that on Linux, Minicom’s ASCII download feature seemsto be broken. A workaround is to load the file into Emacs (or anothereditor) and copy the full contents to the clipboard. Then pressthe mouse paste-button (usually the middle one) over the Minicomwindow.</PARA></LISTITEM><LISTITEM><PARA>Program the FLASH with the downloaded data: <PROGRAMLISTING>EPPC-Bug>pflash 40000 60000 fc000000</PROGRAMLISTING></PARA></LISTITEM><LISTITEM><PARA>Switch off the power, and change jumper 4 to 1-2. Turnon the power again. The board should now boot using the newly programmedstubs.</PARA></LISTITEM></ORDEREDLIST></SECT4></SECT3></SECT2></SECT1><SECT1 id="setup-ppc-sim"><TITLE>PowerPC Architectural Simulator Setup</TITLE><PARA>The PowerPC simulator is an architectural simulator whichimplements all the features of the PowerPC needed to run eCos. Thecurrent implementation provides accurate simulation of the instructionset and timers, as well as having generic support for diagnosticoutput and exceptions.</PARA><PARA>The simulator also allows devices to be simulated, but nodevice simulation support has been defined for the serial devicedrivers in this release.</PARA><PARA>To simplify connection to the simulator, you are advised tocreate a GDB macro by putting the following code in your personalGDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA><PROGRAMLISTING>define psim target sim -o ’/iobus/pal@0xf0001000/reg 0xf0001000 32’ rbreak cyg_test_exit rbreak cyg_assert_fail end</PROGRAMLISTING><PARA>You can then connect to the simulator by invoking the command <command>psim</command> onthe command line:</PARA><PROGRAMLISTING>(gdb) psim</PROGRAMLISTING><PARA>You can achieve the same effect by typing out the macro’scontent on the command line if necessary.</PARA><NOTE><PARA>The PowerPC simulator cannot execute binaries built for anyof the supported hardware targets. You must generate a configurationusing the PowerPC simulator platform: <PROGRAMLISTING>$ ecosconfig new psim</PROGRAMLISTING> or some such.</PARA></NOTE></SECT1><SECT1 id="setup-sparclite-sleb"><TITLE>SPARClite Hardware Setup</TITLE><PARA>The eCos Developer’s Kit package comes with a ROMwhich provides GDB support for the Fujitsu SPARClite EvaluationBoard by way of CygMon<PRODUCTNAME>. </PRODUCTNAME></PARA><PARA>An image of this ROM is also provided at <filename>BASE_DIR/loaders/sparclite-sleb/cygmon.bin.</filename> TheROM is installed in socket IC9 on the evaluation board. Attentionshould be paid to the correct orientation of the ROM during installation.</PARA><PARA>The GDB stub allows communication with GDB using a TCP channelvia the ethernet port at connector J5.</PARA><SECT2><TITLE><!-- <index></index> --><!-- <xref> -->Ethernet Setup</TITLE><PARA>The ethernet setup is described in the board’s manual,but here is a recapitulation.</PARA><PARA>Set the board’s ethernet address using SW1 on themotherboard:</PARA><PROGRAMLISTING> SW1-4 SW1-3 SW1-2 SW1-1 Ethernet Address ----- ----- ----- ----- ---------------- OFF OFF OFF OFF No ethernet, use serial OFF OFF OFF ON 00:00:0E:31:00:01 OFF OFF ON OFF 00:00:0E:31:00:02 OFF OFF ON ON 00:00:0E:31:00:03 OFF ON OFF OFF 00:00:0E:31:00:04 OFF ON OFF ON 00:00:0E:31:00:05 OFF ON ON OFF 00:00:0E:31:00:06 OFF ON ON ON 00:00:0E:31:00:07 ON OFF OFF OFF 00:00:0E:31:00:08 ON OFF OFF ON 00:00:0E:31:00:09 ON OFF ON OFF 00:00:0E:31:00:0A ON OFF ON ON 00:00:0E:31:00:0B ON ON OFF OFF 00:00:0E:31:00:0C ON ON OFF ON 00:00:0E:31:00:0D ON ON ON OFF 00:00:0E:31:00:0E ON ON ON ON 00:00:0E:31:00:0F</PROGRAMLISTING><SECT3><!-- <index></index> --><TITLE>BOOTP/DHCP service on Linux</TITLE><PARA>Configure the BOOTP or DHCP server on the network to recognizethe evaluation board’s ethernet address so it can assignthe board an IP address. Below is a sample DHCP server configurationfrom a Linux system (<filename>/etc/dhcpd.conf</filename>).It shows a setup for three evaluation boards.</PARA><PROGRAMLISTING>## DHCP server configuration.#allow bootp;subnet 192.168.1.0 netmask 255.255.255.0 { host mb831evb { hardware ethernet 00:00:0e:31:00:01; fixed-address mb831evb; } host mb832evb { hardware ethernet 00:00:0e:31:00:02; fixed-address mb832evb; } host mb833evb { hardware ethernet 00:00:0e:31:00:03; fixed-address mb833evb; }} </PROGRAMLISTING></SECT3><SECT3><!-- <index></index> --><TITLE>BOOTP/DHCP boot process</TITLE><PARA>Even when configured to use a TCP channel, CygMon will stillprint a boot message to the serial channel. If the BOOTP processwas successful and an IP address was found, a message “BOOTPfound xxx.xxx.xxx.xxx” will be printed where xxx.xxx.xxx.xxxis the IP address assigned by the BOOTP or DHCP server. If the BOOTPprocess fails, a message indicating failure will be printed andthe serial port will be used as the debug channel.</PARA><PARA>Once the board finds an IP address it will respond to ICMPecho request packets (ping). This gives a simple means to test thehealth of the board.</PARA><PARA>As described in “Ethernet Setup” on page 72,it should now be possible to connect to the SPARClite board fromwithin GDB by using the command:</PARA><PROGRAMLISTING>(gdb) target remote <host>:1000</PROGRAMLISTING></SECT3></SECT2><SECT2><TITLE>Serial Setup</TITLE><PARA>The CygMon stubs also allow communication with GDB by wayof the serial port at connector CON1. The communication parametersare fixed at 19200 baud, 8 data bits, no parity bit and 1 stop bit(8-N-1). No flow control is employed. Connection to the host computershould be made using a null modem cable. A gender changer may alsobe required.</PARA></SECT2></SECT1><SECT1 id="setup-sparclite-sim"><TITLE>SPARClite Architectural Simulator Setup</TITLE><PARA>The ESA SPARClite simulator is an architectural simulatorwhich implements all the features of the SPARClite needed to runeCos. The current implementation provides accurate simulation ofthe instruction set, interrupt controller, and timers, as well ashaving generic support for diagnostic output and exceptions.</PARA><PARA>Note that the ESA SPARClite simulator is unsupported, butis included in the release as a convenience.</PARA><PARA>To simplify connection to the simulator, you are advised tocreate a GDB macro by putting the following code in your personalGDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA><PROGRAMLISTING>define ssim target sim -nfp -sparclite -dumbio rbreak cyg_test_exit rbreak cyg_assert_fail end</PROGRAMLISTING><PARA>You can then connect to the simulator by invoking the command <command>ssim</command> onthe command line:</PARA><PROGRAMLISTING>(gdb) ssim</PROGRAMLISTING><PARA>You can achieve the same effect by typing out the macro’scontent on the command line if necessary.</PARA></SECT1><SECT1 ID="setup-arm-pid"><TITLE><!-- <index></index> --><!-- <xref> -->ARM PID Hardware Setup</TITLE><PARA>eCos comes with two ROM images that provide GDB support forthe ARM PID board. The first ROM image provides a port of the CygMonROM monitor, which includes a command-line interface and a GDB remotestub. The second ROM image provides a remote GDB stub only, whichis a minimal environment for downloading and debugging eCos programssolely using GDB.</PARA><PARA>eCos, CygMon and the GDB stubs all support the PID fittedwith both ARM7T and ARM9 daughterboards. CygMon and the stubs canbe programmed into either the programmable ROM (U12) or the FLASH(U13). Pre-built forms of both ROM images are provided in the directoryloaders/arm-pid under the root of your eCos installation,along with a tool that will program the stubs into the FLASH memory onthe board. CygMon images are prefixed with the name 'cygmon' andGDB stub ROM images are given the prefix 'gdb_module'.Images may be provided in a number of formats including ELF (.imgextension), binary (.bin extension) and SREC (.srec extension).Note that some unreliability has been experienced in downloadingfiles using Angel 1.00. Angel 1.02 appears to be more robust inthis application.</PARA><SECT2><TITLE>Installing the Stubs into FLASH</TITLE><SECT3><TITLE>Preparing the Binaries</TITLE><PARA>These two binary preparation steps are not strictly necessaryas the eCos distribution ships with pre-compiled binaries in thedirectory loaders/arm-pid relative to the installationroot.</PARA></SECT3><SECT3><TITLE>Building the ROM images with the eCos Configuration Tool</TITLE><ORDEREDLIST><LISTITEM><PARA>Start with a new document - selecting the <EMPHASIS>File</EMPHASIS>-><EMPHASIS>New</EMPHASIS> menu item if necessary to do this.</PARA></LISTITEM><LISTITEM><PARA>Choose the <EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Templates</EMPHASIS> menu item, and then select the ARM PID hardware.</PARA></LISTITEM><LISTITEM><PARA>While still displaying the <EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Templates</EMPHASIS> dialog box, select either the "stubs" package template to builda GDB stub image, or the "cygmon" template to build the CygMon ROMMonitor. Click <EMPHASIS>OK</EMPHASIS>.</PARA></LISTITEM><LISTITEM><PARA>Build eCos using <EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Library</EMPHASIS></PARA></LISTITEM><LISTITEM><PARA>When the build completes, the image files can be foundin the bin/ subdirectory of the install tree. GDB stubROM images have the prefix "gdb_module". CygMon imageshave the prefix "cygmon".</PARA></LISTITEM></ORDEREDLIST></SECT3><SECT3><TITLE>Building the ROM images with ecosconfig</TITLE><!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> --><ORDEREDLIST><LISTITEM><PARA> Make an empty directory to contain the build tree,and cd into it.</PARA></LISTITEM><LISTITEM><PARA>To build a GDB stub ROM image, enter the command:</PARA><PROGRAMLISTING>$ ecosconfig new pid stubs</PROGRAMLISTING><PARA>or to build a CygMon ROM monitor image, enter the command:</PARA><PROGRAMLISTING>$ ecosconfig new pid cygmon</PROGRAMLISTING></LISTITEM><LISTITEM><PARA>Enter the commands:</PARA><PROGRAMLISTING>$ ecosconfig tree$ make</PROGRAMLISTING></LISTITEM><LISTITEM><PARA>When the build completes, the image files can be foundin the bin/ subdirectory of the install tree. GDB stubROM images have the prefix "gdb_module". CygMon imageshave the prefix "cygmon".</PARA></LISTITEM></ORDEREDLIST></SECT3><SECT3><TITLE>Building the FLASH Tool with the eCos Configuration Tool</TITLE><ORDEREDLIST><LISTITEM><PARA>Start with a new document - selecting the <EMPHASIS>File</EMPHASIS>-><EMPHASIS>New</EMPHASIS> menu item if necessary to do this.</PARA></LISTITEM><LISTITEM><PARA>Choose the<EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Templates</EMPHASIS> menu item, and then select the ARM PID hardware.</PARA></LISTITEM><LISTITEM><PARA>Enable the "Build flash programming tool" option in theARM PID HAL (CYGBLD_BUILD_FLASH_TOOL)and resolve any resulting configuration conflicts.</PARA></LISTITEM><LISTITEM><PARA>Build eCos using <EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Library</EMPHASIS></PARA></LISTITEM><LISTITEM><PARA>When the build completes, the FLASH tool image file canbe found in the bin/ subdirectory of the install tree,with the prefix "prog_flash"</PARA></LISTITEM></ORDEREDLIST></SECT3><SECT3><TITLE>Building the FLASH Tool with ecosconfig</TITLE><!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> --><ORDEREDLIST><LISTITEM>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -