⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 target-setup.sgml

📁 开放源码实时操作系统源码.
💻 SGML
📖 第 1 页 / 共 5 页
字号:
</SECT4>
</SECT3>
<SECT3>
<TITLE> Installing the Stubs into ROM</TITLE>
<ORDEREDLIST>
<LISTITEM>
<PARA> Program the binary image file gdb_module.bin
into ROM or FLASH referring to the instructions of your ROM programmer.</PARA>
</LISTITEM>
<LISTITEM>
<PARA> Plug the ROM/FLASH into socket XU1 as described
near 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
can be determined by setting up the board according to the below
instructions and powering up the board. The EPPC-Bug prompt should
appear on the SMC1 connector at 9600 baud, 8N1.</PARA>
<ORDEREDLIST>
<LISTITEM>
<PARA>Set jumper 3 to 2-3     [allow XU2 FLASH to
be 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&#62;lo 0</PROGRAMLISTING>
<PARA>At this point the monitor is ready for input. It will not return
the prompt until the file has been downloaded.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Use the terminal emulator&rsquo;s ASCII download feature
(or a simple clipboard     copy/paste operation) to download
the gdb_module.srec data.

Note that on Linux, Minicom&rsquo;s ASCII download feature seems
to be broken. A workaround is to load the file into Emacs (or another
editor) and copy the full contents to the clipboard. Then press
the mouse paste-button (usually the middle one) over the Minicom
window.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Program the FLASH with the downloaded data:
    
<PROGRAMLISTING>EPPC-Bug&#62;pflash 40000 60000 fc000000</PROGRAMLISTING></PARA>
</LISTITEM>
<LISTITEM>
<PARA>Switch off the power, and change jumper 4 to 1-2. Turn
on the power again. The board should now boot using the newly programmed
stubs.</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 which
implements all the features of the PowerPC needed to run eCos. The
current implementation provides accurate simulation of the instruction
set and timers, as well as having generic support for diagnostic
output  and exceptions.</PARA>
<PARA>The simulator also allows devices to be simulated, but no
device simulation support has been defined for the serial device
drivers in this release.</PARA>
<PARA>To simplify connection to the simulator, you are advised to
create a GDB macro by putting the following code in your personal
GDB start-up file (gdb.ini on Windows and .gdbinit on UNIX).</PARA>
<PROGRAMLISTING>define psim   
 target sim -o &rsquo;/iobus/pal&commat;0xf0001000/reg 0xf0001000 32&rsquo;   
 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> on
the command line:</PARA>
<PROGRAMLISTING>(gdb) psim</PROGRAMLISTING>
<PARA>You can achieve the same effect by typing out the macro&rsquo;s
content on the command line if necessary.</PARA>
<NOTE>
<PARA>The PowerPC simulator cannot execute binaries built for any
of the supported hardware targets. You must generate a configuration
using 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&rsquo;s Kit package comes with a ROM
which provides GDB support for the Fujitsu SPARClite Evaluation
Board 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> The
ROM is installed in socket IC9 on the evaluation board. Attention
should be paid to the correct orientation of the ROM during installation.</PARA>
<PARA>The GDB stub allows communication with GDB using a TCP channel
via the ethernet port at connector J5.</PARA>
<SECT2>
<TITLE><!-- <index></index> --><!-- <xref> -->Ethernet Setup</TITLE>
<PARA>The ethernet setup is described in the board&rsquo;s manual,
but here is a recapitulation.</PARA>
<PARA>Set the board&rsquo;s ethernet address using SW1 on the
motherboard:</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 recognize
the evaluation board&rsquo;s ethernet address so it can assign
the board an IP address. Below is a sample DHCP server configuration
from 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 still
print a boot message to the serial channel. If the BOOTP process
was successful and an IP address was found, a message &ldquo;BOOTP
found xxx.xxx.xxx.xxx&rdquo; will be printed where xxx.xxx.xxx.xxx
is the IP address assigned by the BOOTP or DHCP server. If the BOOTP
process fails, a message indicating failure will be printed and
the serial port will be used as the debug channel.</PARA>
<PARA>Once the board finds an IP address it will respond to ICMP
echo request packets (ping). This gives a simple means to test the
health of the board.</PARA>
<PARA>As described in &ldquo;Ethernet Setup&rdquo; on&nbsp;page&nbsp;72,
it should now be possible to connect to the SPARClite board from
within GDB by using the command:</PARA>
<PROGRAMLISTING>(gdb) target remote &lt;host&#62;:1000</PROGRAMLISTING>
</SECT3>
</SECT2>
<SECT2>
<TITLE>Serial Setup</TITLE>
<PARA>The CygMon stubs also allow communication with GDB by way
of the serial port at connector CON1. The communication parameters
are 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 computer
should be made using a null modem cable. A gender changer may also
be required.</PARA>
</SECT2>
</SECT1>
<SECT1 id="setup-sparclite-sim">
<TITLE>SPARClite Architectural Simulator Setup</TITLE>
<PARA>The ESA SPARClite simulator is an architectural simulator
which implements all the features of the SPARClite needed to run
eCos. The current implementation provides accurate simulation of
the instruction set, interrupt controller, and timers, as well as
having generic support for diagnostic output and exceptions.</PARA>
<PARA>Note that the ESA SPARClite simulator is unsupported, but
is included in the release as a convenience.</PARA>
<PARA>To simplify connection to the simulator, you are advised to
create a GDB macro by putting the following code in your personal
GDB 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> on
the command line:</PARA>
<PROGRAMLISTING>(gdb) ssim</PROGRAMLISTING>
<PARA>You can achieve the same effect by typing out the macro&rsquo;s
content 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 for
the ARM PID board. The first ROM image provides a port of the CygMon
ROM monitor, which includes a command-line interface and a GDB remote
stub. The second ROM image provides a remote GDB stub only, which
is a minimal environment for downloading and debugging eCos programs
solely using GDB.</PARA>
<PARA>eCos, CygMon and the GDB stubs all support the PID fitted
with both ARM7T and ARM9 daughterboards. CygMon and the stubs can
be programmed into either the programmable ROM (U12) or the FLASH
(U13). Pre-built forms of both ROM images are provided in the directory
loaders/arm-pid under the root of your eCos installation,
along with a tool that will program the stubs into the FLASH memory on
the board. CygMon images are prefixed with the name 'cygmon' and
GDB stub ROM images are given the prefix 'gdb_module'.
Images may be provided in a number of formats including ELF (.img
extension), binary (.bin extension) and SREC (.srec extension).
Note that some unreliability has been experienced in downloading
files using Angel 1.00. Angel 1.02 appears to be more robust in
this 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 necessary
as the eCos distribution ships with pre-compiled binaries in the
directory loaders/arm-pid relative to the installation
root.</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>-&#62;<EMPHASIS>New</EMPHASIS>
 menu item if necessary to do this.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Choose the 
<EMPHASIS>Build</EMPHASIS>
-&#62;
<EMPHASIS>Templates</EMPHASIS>
 menu item, and then select the ARM PID hardware.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>While still displaying the 
<EMPHASIS>Build</EMPHASIS>
-&#62;
<EMPHASIS>Templates</EMPHASIS>
 dialog box, select either the "stubs" package template to build
a GDB stub image, or the "cygmon" template to build the CygMon ROM
Monitor. Click 
<EMPHASIS>OK</EMPHASIS>.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Build eCos using 
<EMPHASIS>Build</EMPHASIS>
-&#62;
<EMPHASIS>Library</EMPHASIS></PARA>
</LISTITEM>
<LISTITEM>
<PARA>When the build completes, the image files can be found
in the bin/ subdirectory of the install tree. GDB stub
ROM images have the prefix "gdb_module". CygMon images
have 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 found
in the bin/ subdirectory of the install tree. GDB stub
ROM images have the prefix "gdb_module". CygMon images
have 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>-&#62;<EMPHASIS>New</EMPHASIS>
 menu item if necessary to do this.</PARA>
</LISTITEM>
<LISTITEM>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -