?? target-setup.sgml
字號(hào):
<PARA>Build eCos stubs using <EMPHASIS>Build->Library</EMPHASIS>.</PARA></LISTITEM><LISTITEM><PARA>When the build completes, the image files can be foundin the bin/ subdirectory of the install tree. GDB stubimages have the prefix gdb_module.</PARA></LISTITEM></ORDEREDLIST></SECT3><SECT3><TITLE> Building the GDB stub image with ecosconfig</TITLE><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 ref4955 stubs </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 stubimages have the prefix gdb_module.</PARA></LISTITEM></ORDEREDLIST></SECT3></SECT2><SECT2><TITLE> Installing GDB stubs into FLASH</TITLE><PARA>Boot into the board’s firmware in little-endian mode:</PARA><PARA>Set the switches like this: </PARA><PARA>SW1: 10000000 (first lever up, the rest down) SW2: 10000010</PARA><PARA>Connect serial cable on the lower connector, configure terminalemulator for 38400, 8-N-1.</PARA><PARA>When booting the board, you should get this prompt:</PARA><PROGRAMLISTING>HCP5 rev 0.9B . HCP5?</PROGRAMLISTING><PARA>Select o (option), a (FLASH) and b (boot write). You shouldsee this:</PARA><PROGRAMLISTING>Boot ROM Write ROM address-ffffffffbd000000, Boot Bus-[32bit] ID2 0 4 ffffffffa002ad40 zzz SS-40000 IV-1 CS-20000 CC-2 Flash ROM-[28F640J5], [16bit chip] * 2 * 1Block size-00040000 count-64 ROM adr ffffffffbd000000-ffffffffbe000000 mask-00fc0000Send Srecord file sa=00000000 size=ffffffffffffffffra=fffffffffe000000 </PROGRAMLISTING><PARA>Now send the stub SREC data down to the board using the terminal emulator’s ‘send ASCII’ (or similar)functionality. </PARA><PARA>Red Hat has experienced some sensitivity to how fast the datais written to the board. Under Windows you should configure Minicomto use a line delay of 100 milliseconds. Under Linux, use the slow_cat.tcl script:</PARA><PROGRAMLISTING>% cd BASE_DIR/packages/hal/mips/ref4955/<replaceable>&Version;</replaceable>/misc% slow_cat.tcl < [path]/gdb_module.srec > /dev/ttyS0</PROGRAMLISTING><PARA>Power off the board, and change it to boot the GDB stubs inbig-endian mode by setting the switches like this:</PARA><PARA>SW1: 00000000 (all levers down) SW2: 10001010</PARA><PARA>The GDB stubs allow communication with GDB using the serialport at connector PJ7A (lower connector). The communication parametersare fixed at 38400 baud, 8 data bits, no parity bit and 1 stopbit (8-N-1). No flow control is employed. Connection to the hostcomputer should be made using a straight through serial cable.</PARA></SECT2></SECT1><!-- ==================================================== --><SECT1 id="setup-vr4300-vrc4373"><TITLE>VR4300 Hardware Setup</TITLE><PARA>The eCos Developer’s Kit package comes with an EPROMwhich provides GDB support for the NECVRC4373 evaluation board. An image of this EPROM is also providedat <filename>loaders/vr4300-vrc4373/gdbload.bin</filename> underthe root of your eCos installation.</PARA><PARA>The EPROM is installed to socket U12 on the board. Attentionshould be paid to the correct orientation of the EPROM during installation.Only replace the board"s existing ROM using a proper PLCCextraction tool, as the socket would otherwise risk getting damaged. </PARA><PARA>The GDB stub in the EPROM allows communication with GDB usingthe serial port at connector J1. The communication parameters arefixed at 38400 baud, 8 data bits, no parity bit and 1 stop bit (8-N-1).No flow control is employed. Connection to the host computer shouldbe made using a straight-through serial cable. </PARA></SECT1><SECT1 id="setup-vr4300-vrc4375"><TITLE>VRC4375 Hardware Setup</TITLE><PARA>For information about setting up the VRC4375 to run with RedBoot,consult the RedBoot User"s Guide. If using serial debugging,the serial line runs at 38400 baud 8-N-1 and should be connectedto the debug host using the cable supplied with the board.</PARA></SECT1><SECT1 id="setup-mips-atlasmalta"><TITLE>Atlas/Malta Hardware Setup</TITLE><PARA>For information about setting up the Atlas and Malta boards torun with RedBoot, consult the RedBoot User"s Guide.</PARA></SECT1><SECT1 id="setup-ppc-cogent"><TITLE>PowerPC Cogent Hardware Setup</TITLE><PARA>The eCos Developer’s Kit package comes with an EPROMwhich provides GDB support for the Cogentevaluation board. An image of this EPROM is also provided at <filename>loaders/powerpc-cogent/gdbload.bin</filename> underthe root of your eCos installation. The same EPROM and image canbe used on all three supported daughterboards: CMA287-23 (MPC823),CMA287-50 (MPC850), and CMA286-60 (MPC860).</PARA><PARA>The EPROM is installed to socket U4 on the board. Attentionshould be paid to the correct orientation of the EPROM during installation. </PARA><PARA>If you are going to burn a new EPROM using the binary image,be careful to get the byte order correct. It needs to be big-endian.If the EPROM burner software has a hex-editor, check that the firstfew bytes of the image look like: </PARA><PROGRAMLISTING>00000000: 3c60 fff0 6063 2000 7c68 03a6 4e80 0020 <`..`c.|h..N.. </PROGRAMLISTING><PARA>If the byte order is wrong you will see 603c instead of 3c60etc. Use the EPROM burner software to make a byte-swap before youburn to image to the EPROM. </PARA><PARA>If the GDB stub EPROM you burn does not work, try reversingthe byte-order, even if you think you have it the right way around.At least one DOS-based EPROM burner program is known to have thebyte-order upside down.</PARA><PARA>The GDB stub in the EPROM allows communication with GDB usingthe serial port at connector P12 (CMA101) or P3 (CMA102). The communication parametersare fixed at 38400 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 dedicated serial cable as specified in theCogent CMA manual.</PARA><SECT2><TITLE>Installing the Stubs into ROM</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 <filename>loaders/powerpc-cogent</filename> relative to the installationroot.</PARA><SECT4><TITLE>Building the ROM images with the eCos Configuration Tool</TITLE><ORDEREDLIST><LISTITEM><PARA>Start with a new document - selecting the <EMPHASIS>File->New</EMPHASIS> menu item if necessary to do this.</PARA></LISTITEM><LISTITEM><PARA>Choose the <EMPHASIS>Build->Templates</EMPHASIS> menu item, and then select the PowerPC CMA28x hardware.</PARA></LISTITEM><LISTITEM><PARA>While still displaying the <EMPHASIS>Build->Templates</EMPHASIS> dialog box, select the “stubs” package templateto build a GDB stub. Click <EMPHASIS>OK</EMPHASIS>.</PARA></LISTITEM><LISTITEM><PARA>Build eCos using <EMPHASIS>Build->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”.</PARA></LISTITEM></ORDEREDLIST></SECT4><SECT4><TITLE>Building the ROM images with ecosconfig</TITLE><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: <PROGRAMLISTING>$ ecosconfig new cma28x stubs </PROGRAMLISTING></PARA></LISTITEM><LISTITEM><PARA>Enter the commands: <PROGRAMLISTING>$ ecosconfig tree$ make</PROGRAMLISTING> </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”.</PARA></LISTITEM></ORDEREDLIST></SECT4></SECT3><SECT3><TITLE> Installing the Stubs into ROM or FLASH</TITLE><ORDEREDLIST><LISTITEM><PARA>Program the binary image file gdb_module.bininto ROM or FLASH referring to the instructions of your ROM programmer.</PARA></LISTITEM><LISTITEM><PARA> Plug the ROM/FLASH into socket U4 as describedat the beginning of this <EMPHASIS>Hardware Setup</EMPHASIS> section.</PARA></LISTITEM></ORDEREDLIST></SECT3></SECT2></SECT1><SECT1 id="setup-ppc-mbx860"><TITLE>PowerPC MBX860 Hardware Setup</TITLE><PARA>The eCos Developer’s Kit package comes with an EPROMwhich provides GDB support for the MotorolaPowerPC MBX860 evaluation board. An image of this EPROM is alsoprovided at <filename>loaders/powerpc-mbx/gdbload.bin</filename> underthe root of your eCos installation.</PARA><PARA>The EPROM is installed to socket XU1 on the board. Attentionshould be paid to the correct orientation of the EPROM during installation.Only replace the board"s existing ROM using a proper PLCCextraction tool, as the socket would otherwise risk getting damaged.</PARA><PARA>The GDB stub in the EPROM allows communication with GDB usingthe serial port at connector SMC1/COM1. The communicationparameters are fixed at 38400 baud, 8 data bits, no parity bit and1 stop bit (8-N-1). No flow control is employed. Connection to thehost computer should be made using a suitable serial cable.</PARA><PARA>In order to make the board execute the EPROM that you justinstalled (rather than the on-board FLASH memory), it may be necessarymove some links on the board. Specifically, ensure that link J4is in position 1-2. If in doubt, refer to the MBX documentationfrom Motorola, ensuring that Boot Port Size=8 Bits/ROMfor BOOT (CS#7), in their terminology.</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 <filename>loaders/powerpc-mbx</filename> relative to the installationroot.</PARA><SECT4><TITLE>Building the ROM images with the eCos Configuration Tool</TITLE><ORDEREDLIST><LISTITEM><PARA>Start with a new document - selecting the <EMPHASIS>File->New</EMPHASIS> menu item if necessary to do this.</PARA></LISTITEM><LISTITEM><PARA>Choose the <EMPHASIS>Build->Templates</EMPHASIS> menu item, and then select the PowerPC Motorola MBX860/821hardware.</PARA></LISTITEM><LISTITEM><PARA>While still displaying the <EMPHASIS>Build->Templates</EMPHASIS> dialog box, select the “stubs” package templateto build a GDB stub. Click <EMPHASIS>OK</EMPHASIS>.</PARA></LISTITEM><LISTITEM><PARA>Build eCos using <EMPHASIS>Build->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”.</PARA></LISTITEM></ORDEREDLIST></SECT4><SECT4><TITLE>Building the ROM images with ecosconfig</TITLE><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: <PROGRAMLISTING>$ ecosconfig new mbx stubs </PROGRAMLISTING></PARA></LISTITEM><LISTITEM><PARA>Enter the commands: <PROGRAMLISTING>$ ecosconfig tree$ make </PROGRAMLISTING></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”.</PARA></LISTITEM></ORDEREDLIST></SECT4></SECT3><SECT3><TITLE> Installing the Stubs into ROM</TITLE><ORDEREDLIST><LISTITEM><PARA> Program the binary image file gdb_module.bininto ROM or FLASH referring to the instructions of your ROM programmer.</PARA></LISTITEM><LISTITEM><PARA> Plug the ROM/FLASH into socket XU1 as describednear the beginning of this <EMPHASIS>Hardware Setup</EMPHASIS> section.</PARA></LISTITEM></ORDEREDLIST></SECT3><SECT3><TITLE>Installing the Stubs into FLASH</TITLE><PARA>This assumes you have EPPC-Bug in the on-board FLASH. This
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -