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

📄 target-setup.sgml

📁 开放源码实时操作系统源码.
💻 SGML
📖 第 1 页 / 共 5 页
字号:
<!-- {{{ Banner                         -->

<!-- =============================================================== -->
<!--                                                                 -->
<!--     config-tool.sgml                                            -->
<!--                                                                 -->
<!--     eCos User Guide                                             -->
<!--                                                                 -->
<!-- =============================================================== -->
<!-- ####COPYRIGHTBEGIN####                                          -->
<!--                                                                 -->
<!-- =============================================================== -->
<!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 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 obtained from the copyright holder                   -->
<!-- =============================================================== -->
<!--                                                                 -->      
<!-- ####COPYRIGHTEND####                                            -->
<!-- =============================================================== -->
<!-- #####DESCRIPTIONBEGIN####                                       -->
<!--                                                                 -->
<!-- ####DESCRIPTIONEND####                                          -->
<!-- =============================================================== -->

<!-- }}} -->


<appendix id="appendix-target-setup">
<title>Target Setup</title>

<para>
The following sections detail the setup of many of the targets
supported by eCos. 
</para>

<caution>
<para>
This information is presented here only temporarily. It is intended
that there will be separate documents detailing this information for
each target in future releases. Consequently not much effort has been
put into bringing the following documentation up to date -- much of it
is obsolete, bogus or just plain wrong.
</para>
</caution>

<!--
<para>
XXXXX Exactly which of these are really supported in 2.0. Can we
delete some of them. I'm reluctant to waste much time fixing up text
that is going to be largely rewritten anyway.
XXXXX
</para>
-->

<!-- ==================================================== -->

<SECT1 id="setup-mn10300-stdeval1">
<TITLE>MN10300 stdeval1 Hardware Setup</TITLE>
<PARA>The eCos Developer&rsquo;s Kit package comes with a pair
of EPROMs which provide GDB support for the Matsushita MN10300 (AM31)
series evaluation board using CygMon, the Cygnus ROM monitor. Images
of these EPROMs are also provided at <filename>BASE_DIR/loaders/mn10300-stdeval1/cygmon.bin</filename>.
The LSB EPROM (LROM) is installed to socket IC8 on the board and
the MSB EPROM (UROM) is installed to socket IC9. Attention should
be paid to the correct orientation of these EPROMs during installation.</PARA>
<PARA>The CygMon stubs allows communication with GDB by way of the
serial port at connector CN2. The communication parameters are 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 computer should
be made using a standard RS232C serial cable (not a null modem cable).
A gender changer may also be required.</PARA>
</SECT1>

<!-- ==================================================== -->

<SECT1 id="setup-mn10300-sim">
<TITLE>MN10300 Architectural Simulator Setup</TITLE>
<PARA>The MN10300 simulator is an architectural simulator for the
Matsushita MN10300 that implements all features of the microprocessor
 necessary to run eCos. The current implementation provides accurate
simulation of the instruction set, interrupt controller, timers,
and  serial I/O.</PARA>
<PARA>In this release, you can run the same eCos binaries in the
simulator that can run on target hardware, if built for ROM start-up,
with the  exception of those that use the watchdog timer.</PARA>
<PARA>However, note that AM33 devices required to run eCos are not
simulated; therefore you cannot run eCos binaries built for the
AM33 under the simulator. For the AM33, the simulator is effectively
an instruction-set only simulator.</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 msim   
 target sim --board=stdeval1 --memory-region 0x34004000,0x8
  
 rbreak cyg_test_exit   
 rbreak cyg_assert_fail  
end</PROGRAMLISTING>
<PARA>You can then connect to the simulator by invoking the command <PROGRAMLISTING>msim</PROGRAMLISTING> on
the command line:</PARA>
<PROGRAMLISTING>(gdb) msim</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-am33-stb">
<TITLE>AM33 STB Hardware Setup</TITLE>
<PARA>The Matsushita AM33 STB System Reference Board may be used
in two modes: via a JTAG debugger, or by means of a GDB stub ROM.</PARA>
<SECT2>
<TITLE>Use with GDB Stub ROM</TITLE>
<PARA>The eCos Developer&rsquo;s Kit package comes with a ROM
image which provides GDB support for
the Matsushita(R) AM33 STB System Reference Board. To install the
GDB stub ROM requires the use of the JTAG debugger and the Flash ROM
programming code available from Matsushita. An image of this ROM
is also provided at <filename>loaders/am33-stb/gdbload.bin</filename> under
the root of your eCos installation.</PARA>
<PARA>Ensure that there is a Flash ROM card in MAIN MEMORY SLOT &lt;0&#62;.
Follow the directions for programming a Flash ROM supplied with
the programming software.</PARA>
<PARA>The final programming of the ROM will need to be done with
a command similar to the following:</PARA>
<PROGRAMLISTING>fdown "gdbload.bin",0x80000000,16,1</PROGRAMLISTING>
<PARA>Once the ROM has been programmed, close down the JTAG debugger,
turn the STB off, and disconnect the JTAG cable. Ensure that the
hardware switches are in the following configuration:</PARA>
<PROGRAMLISTING>U U D D D U D D

D = lower part of rocker switch pushed in
U = upper part of rocker switch pushed in</PROGRAMLISTING>
<PARA>This is also the configuration required by the Flash programming
code, so it should not be necessary to change these.</PARA>
<PARA>Restart the STB and the stub ROM will now be able to communicate
with <PRODUCTNAME>GDB</PRODUCTNAME>. eCos programs should be built
with RAM startup.</PARA>
<PARA>Programs can then be downloaded via a standard RS232 null
modem serial cable connected to the SERIAL1 connector on the STB
front panel (the AM33&quot;s serial port 0). This line is programmed
to run at 38400 baud, 8 data bits, no parity and 1 stop bit (8-N-1)
with no flow control. A gender changer may also be required. Diagnostic
output will be output to GDB using the same connection.</PARA>
<PARA>This procedure also applies for programming ROM startup eCos
programs into ROM, given a binary format image of the program from<PROGRAMLISTING> mn10300-elf-objcopy.</PROGRAMLISTING></PARA>
</SECT2>
<SECT2>
<TITLE>Use with the JTAG debugger</TITLE>
<PARA>To use eCos from the JTAG debugger, executables must be built
with ROM startup and then downloaded via the JTAG debugger. For
this to work there must be an SDRAM memory card in SUB MEMORY SLOT &lt;0&#62; and
the hardware switches on the front panel set to the following: </PARA>
<PROGRAMLISTING>D U D D D U D D

D = lower part of rocker switch pushed in
U = upper part of rocker switch pushed in</PROGRAMLISTING>
<PARA>Connect the JTAG unit and run the debugger as described in
the documentation that comes with it.</PARA>
<PARA>eCos executables should be renamed to have a &ldquo;.out&rdquo; extension
and may then be loaded using the debugger&quot;s &ldquo;l&rdquo; or &ldquo;lp&rdquo; commands.</PARA>
<PARA>Diagnostic output generated by the program will be sent out
of the AM33&quot;s serial port 0 which is connected to the SERIAL1
connector on the STB front panel. This line is programmed to run
at 38400 baud, 8 data bits, no parity, and one stop bit (8-N-1)
with no flow control. Connection to the host computer should be
using a standard RS232 null modem serial cable. A gender changer
may also be required.</PARA>
</SECT2>
<SECT2>
<TITLE>Building the GDB stub ROM image</TITLE>
<PARA>eCos comes with a pre-built GDB stub ROM image for the AM33-STB
platform. This can be found at <filename>loaders/am33-stb/gdbload.bin</filename> relative
to the eCos installation directory.</PARA>
<PARA>If necessary, the ROM image can be re-built as follows:</PARA>
<ORDEREDLIST>
<LISTITEM>
<PARA>		On Windows hosts, open a Bash session using 
<EMPHASIS>Start-&#62;Programs-&#62;Red Hat eCos-&#62;eCos
Development Environment</EMPHASIS></PARA>
</LISTITEM>
<LISTITEM>
<PARA>Create a build directory and cd into it</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Run (all as one line):

<PROGRAMLISTING>cygtclsh80 BASE_DIR/packages/pkgconf.tcl                          \
  --target=mn10300_am33 --platform stb --startup rom              \
  --disable-kernel --disable-uitron --disable-libc --disable-libm \
  --disable-io --disable-io_serial --disable-wallclock
--disable-watchdog</PROGRAMLISTING>
	    </PARA>
<PARA>where BASE_DIR is the path to the eCos installation
directory.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Edit the configuration file 
<filename>pkgconf/hal.h</filename>
 in the build directory tree by ensuring the following configuration
options are set as follows:

<PROGRAMLISTING>#define CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
#define CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
#undef  CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT
#define CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
#define CYG_HAL_ROM_MONITOR</PROGRAMLISTING>
	    </PARA>
</LISTITEM>
<LISTITEM>
<PARA>Run: make</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Run: make -C hal/common/current/current/src/stubrom</PARA>
</LISTITEM>
<LISTITEM>
<PARA>The file 
<filename>hal/common/current/src/stubrom</filename>
 will be an ELF format executable of the ROM image. Use mn10300-elf-objcopy to
convert this to the appropriate format for loading into the Matsushita
FLASH ROM programmer, mode &ldquo;binary&rdquo; in this case: 

<PROGRAMLISTING>$ mn10300-elf-objcopy -O binary hal/common/current/src/stubrom/ \
  stubrom stubrom.img</PROGRAMLISTING></PARA>
</LISTITEM>
</ORDEREDLIST>
</SECT2>
</SECT1>

<!-- ==================================================== -->

<SECT1 id="setup-tx39-jmr3904">
<TITLE>TX39 Hardware Setup</TITLE>
<PARA>The eCos Developer&rsquo;s Kit package comes with a pair
of ROMs that provide GDB support for
the Toshiba JMR-TX3904 RISC processor reference board by way of CygMon. </PARA>
<PARA>Images of these ROMs are also provided at <filename>BASE_DIR/loaders/tx39-jmr3904/cygmon50.bin</filename> and <filename>BASE_DIR/loaders/tx39-jmr3904/cygmon66.bin</filename> for
50 MHz and 66 MHz boards respectively. The ROMs are installed to
sockets IC6 and IC7 on the memory daughterboard according to their
labels. Attention should be paid to the correct orientation of these
ROMs during installation.</PARA>
<PARA>The GDB stub allows communication with GDB using the serial
port (channel C) at connector PJ1. The communication parameters
are fixed at 38400 baud, 8 data bits, no parity bit, and 1 stop
bit (8-N-1). No handshaking is employed. Connection to the host
computer should be made using an RS232C null modem cable.</PARA>
<PARA>CygMon and eCos currently provide support for a 16Mbyte 60ns
72pin DRAM SIMM fitted to the PJ21 connector. Different size DRAMs
may require changes in the value stored in the DCCR0 register. This
value may be found near line 211 in <filename>hal/mips/arch/<replaceable>&Version;</replaceable>/src/vectors.S</filename>
in eCos, and near line 99 in
	  <filename>libstub/mips/tx39jmr/tx39jmr-power.S</filename> in
CygMon. eCos does not currently use the DRAM for any purpose itself,
so it is entirely available for application use.</PARA>
</SECT1>

<!-- ==================================================== -->

<SECT1 id="setup-tx39-sim">
<TITLE>TX39 Architectural Simulator Setup</TITLE>
<PARA>The TX39 simulator is an architectural simulator which implements
all  the features of the Toshiba TX39 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, serial I/O, and exceptions.</PARA>
<PARA>In this release, you can run the same eCos binaries in the
simulator that can run on target hardware, if it is built for ROM
start-up.</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 tsim   
 target sim --board=jmr3904pal --memory-region 0xffff8000,0x900 \ 
            --memory-region 0xffffe000,0x4 \          
            --memory-region 0xb2100000,0x4   
 rbreak cyg_test_exit
 rbreak cyg_assert_fail
end</PROGRAMLISTING>
<PARA>You can then connect to the simulator by invoking the command <command>tsim</command> on
the command line:</PARA>
<PROGRAMLISTING>(gdb) tsim</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-tx49-ref4955">
<TITLE>TX49 Hardware Setup</TITLE>
<PARA>The eCos installation CD contains a copy of the eCos GDB stubs
in  SREC format which must be programmed into the board&rsquo;s
FLASH memory.</PARA>
<SECT2>
<TITLE>Preparing the GDB stubs</TITLE>
<PARA>These stub preparation steps are not strictly necessary as
the eCos distribution ships with pre-compiled stubs in the directory <filename>loaders/tx49-ref4955</filename> relative
to the installation root.</PARA>
<SECT3>
<TITLE>Building the GDB stub image with the eCos Configuration Tool</TITLE>
<ORDEREDLIST>
<LISTITEM>
<PARA>		  Start with a new document - selecting the 
<EMPHASIS>File-&#62;New</EMPHASIS>
 menu item if necessary to do this.</PARA>
</LISTITEM>
<LISTITEM>
<PARA>Choose the 
<EMPHASIS>Build-&#62;Templates</EMPHASIS>
 menu item, and then select the TX49 REF4955 hardware.</PARA>

⌨️ 快捷键说明

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