?? target-setup.sgml
字號:
<SECT2><TITLE>Building the GDB Stub FLASH ROM Images</TITLE><PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-aebrelative to the root of your eCos installation, but here are instructionson how to rebuild them if you should ever need to.</PARA></SECT2><SECT2><TITLE>Building the GDB Stubs 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 AEB-1 hardware.</PARA></LISTITEM><LISTITEM><PARA>While still displaying the <EMPHASIS>Build->Templates</EMPHASIS> dialog box, select the "stubs" package template to build a GDBstub image. Click <EMPHASIS>OK</EMPHASIS>.</PARA></LISTITEM><LISTITEM><PARA>If applicable, set the "AEB board revision" option to"C" from "B" depending on the board revision being used.</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. The GDB stubROM images have the prefix "gdb_module".</PARA></LISTITEM></ORDEREDLIST></SECT2><SECT2><TITLE>Building the GDB Stub ROMs 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 aeb stubs</PROGRAMLISTING></LISTITEM><LISTITEM><PARA>If applicable, edit ecos.ecc and set the AEB board revision. (CYGHWR_HAL_ARM_AEB_REVISION)from the default "B" to "C" by uncommenting the user_valueproperty and setting it to "C".</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. The GDB stubROM images have the prefix "gdb_module".</PARA></LISTITEM></ORDEREDLIST></SECT2></SECT1><SECT1 id="setup-arm-cma230"><TITLE><!-- <index></index> -->ARM Cogent CMA230 Hardware Setup</TITLE><PARA>The eCos Developer's Kit package comes with an EPROMwhich provides GDB support for the Cogent evaluation board. An imageof this EPROM is also provided at loaders/arm-cma230/gdbload.binunder the root of your eCos installation. </PARA><PARA>The EPROM is installed to socket U3 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 little-endian,which is usually the default in PC based programmer software.</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>Building the GDB Stub FLASH ROM images</TITLE><PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-cma230 relativeto the root of your eCos installation, but here are instructionson how to rebuild them if you should ever need to.</PARA><PARA>CygMon images are prefixed with the name 'cygmon' andGDB stub ROM images</PARA><PARA>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). </PARA></SECT2><SECT2><TITLE>Building the GDB Stubs with the eCos Configuration Tool</TITLE><ORDEREDLIST><LISTITEM><PARA>1. Start with a new document - selecting the File->Newmenu 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 CMA230 hardware.</PARA></LISTITEM><LISTITEM><PARA>While still displaying the <EMPHASIS>Build</EMPHASIS>-><EMPHASIS>Templates</EMPHASIS> dialog box, select the "stubs" package template to build a GDBstub image. 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. The GDB stubROM images have the prefix "gdb_module".</PARA></LISTITEM></ORDEREDLIST></SECT2><SECT2><TITLE>Building the GDB Stub ROMs with ecosconfig</TITLE><!-- <PARA>(See <XREF LINKEND="USING-ECOSCONFIG-ON-UNIX">)</PARA> --><ORDEREDLIST><LISTITEM><PARA>1. 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 cma230 stubs</PROGRAMLISTING></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. The GDB stubROM images have the prefix "gdb_module".</PARA></LISTITEM></ORDEREDLIST></SECT2></SECT1><SECT1 id="setup-arm-ep7211"><TITLE><!-- <index></index> --><!-- <xref> -->Cirrus Logic ARM EP7211 DevelopmentBoard Hardware Setup</TITLE><PARA>eCos comes with two Flash ROM images that provide GDB supportfor the Cirrus Logic EP7211 Development Board (also known as theEDB7211).. Note that on some board revisions, the board is silk-screenedas EDB7111-2. The first Flash ROM image provides a port of the CygMonROM monitor, which includes a command-line interface and a GDB remotestub. The second Flash ROM image provides a remote GDB stub only.</PARA><PARA>Both ROM images are provided in the directory loaders/arm-edb7211under the root of your eCos installation. CygMon images are prefixedwith the name 'edb7211_cygmon' and areprovided in a number of formats including binary (.bin extension)and SREC (.srec) extension. GDB stub ROM images are given the prefix 'edb7211_gdb_module'. </PARA><PARA>The ROM images provided for the EP7211 Development Board mustbe programmed into the FLASH. Please refer to the section titled"Loading the ROM image into On-Board flash" on how to program theROM onto the board.</PARA><PARA>Both Cygmon and GDB Stub ROMS allow communication with GDBvia the serial connector labelled 'UART 1'. Thecommunication parameters are fixed at 38400 baud, 8 data bits, noparity bit and 1 stop bit (8-N-1). No flow control is employed.Connection to the host computer should be made using a null modem cable.A gender changer may also be required. Note that the GDB Configuration tooluses the serial port identifiers 0 and 1 to identify the EB7211serial ports UART1 and UART2 respectively.</PARA><PARA>Both eCos and the ROM images assume the core clock is generatedwith a 3.6864 MHz PLL input. The CPU will be configured to run at73.728MHz.</PARA><PARA>Note: The EP7211 CPU needs a two step RESET process. Afterpressing the `URESET' pushbutton, the `WAKEUP' pushbuttonmust be pressed to complete the process.</PARA><NOTE><PARA>When an eCos program is run on an EDB7211 board fitted witheither CygMon or a GDB stub ROM, then the code in ROM loses control.This means that if you require the ability to remotely stop executionon the target, or want thread debugging capabilities, you must includeGDB stub support when configuring eCos.</PARA></NOTE><SECT2><TITLE>Building programs for programming into FLASH</TITLE><PARA>If your application is to be run directly from FLASH, youmust configure eCos appropriately for "ROM" startup. This can bedone in the <EMPHASIS>eCos Configuration Tool</EMPHASIS> by settingthe "Startup type" HAL option to "ROM". If using the ecosconfig utility,set the user_value of the CYG_HAL_STARTUPoption in ecos.ecc to "ROM".</PARA><PARA>When you have linked your application with eCos, you willthen have an ELF executable. To convert this into a format appropriatefor the Cirrus Logic FLASH download utility, or the dl_7xxxutility on Linux, you can use the utility arm-elf-objcopy, as inthe following example:</PARA><PROGRAMLISTING>$ arm-elf-objcopy -O binary helloworld.exe helloworld.bin</PROGRAMLISTING><PARA>This will produce a binary format image helloworld.bin whichcan be downloaded into FLASH.</PARA></SECT2><SECT2><TITLE>Building the GDB Stub FLASH ROM images</TITLE><PARA>Pre-built GDB stubs images are provided in the directory loaders/arm-edb7211 relativeto the root of your eCos installation, but here are instructionson how to rebuild them if you should ever need to.</PARA><PARA>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). </PARA></SECT2><SECT2><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 "Cirrus Logic development board"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></SECT2><SECT2><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 edb7xxx stubs</PROGRAMLISTING><PARA>or to build a CygMon ROM monitor image, enter the command:</PARA><PROGRAMLISTING>$ ecosconfig new edb7xxx 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></SECT2><SECT2><TITLE><!-- <xref> -->Loading the ROM Image into On-board Flash</TITLE><PARA>Program images can be written into Flash memory by means ofa bootstrap program which is built into the EDB7211. This programcommunicates with a support program on your host to download andprogram an image into the Flash memory.</PARA><PARA>Cirrus Logic provides such a program for use with Windows/DOS. eCos comes with a similar program which will run under Linux. Thebasic operation of both programs is the same.</PARA><ORDEREDLIST><LISTITEM><PARA>Connect a serial line to 'UART 1'.</PARA></LISTITEM><LISTITEM><PARA>Power off the EDB7211.</PARA></LISTITEM><LISTITEM><PARA>Install jumper 'PROGRAM ENA
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -