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

📄 setup-am33-stb.html

📁 有关ecos2。0介绍了实时嵌入式的结构以及线程调度的实现和内存的管理等
💻 HTML
字号:
<!-- Copyright (C) 2003 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 is obtained from the copyright holder.               --><HTML><HEAD><TITLE>AM33 STB Hardware Setup</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos User Guide"HREF="ecos-user-guide.html"><LINKREL="UP"TITLE="Target Setup"HREF="appendix-target-setup.html"><LINKREL="PREVIOUS"TITLE="MN10300 Architectural Simulator Setup"HREF="setup-mn10300-sim.html"><LINKREL="NEXT"TITLE="TX39 Hardware Setup"HREF="setup-tx39-jmr3904.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos User Guide</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="setup-mn10300-sim.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Appendix A. Target Setup</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="setup-tx39-jmr3904.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="SETUP-AM33-STB">AM33 STB Hardware Setup</H1><P>The Matsushita AM33 STB System Reference Board may be usedin two modes: via a JTAG debugger, or by means of a GDB stub ROM.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3223">Use with GDB Stub ROM</H2><P>The eCos Developer&#8217;s Kit package comes with a ROMimage which provides GDB support forthe Matsushita(R) AM33 STB System Reference Board. To install theGDB stub ROM requires the use of the JTAG debugger and the Flash ROMprogramming code available from Matsushita. An image of this ROMis also provided at <TTCLASS="FILENAME">loaders/am33-stb/gdbload.bin</TT> underthe root of your eCos installation.</P><P>Ensure that there is a Flash ROM card in MAIN MEMORY SLOT &lt;0&#62;.Follow the directions for programming a Flash ROM supplied withthe programming software.</P><P>The final programming of the ROM will need to be done witha command similar to the following:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">fdown "gdbload.bin",0x80000000,16,1</PRE></TD></TR></TABLE><P>Once the ROM has been programmed, close down the JTAG debugger,turn the STB off, and disconnect the JTAG cable. Ensure that thehardware switches are in the following configuration:</P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">U U D D D U D DD = lower part of rocker switch pushed inU = upper part of rocker switch pushed in</PRE></TD></TR></TABLE><P>This is also the configuration required by the Flash programmingcode, so it should not be necessary to change these.</P><P>Restart the STB and the stub ROM will now be able to communicatewith <SPANCLASS="PRODUCTNAME">GDB</SPAN>. eCos programs should be builtwith RAM startup.</P><P>Programs can then be downloaded via a standard RS232 nullmodem serial cable connected to the SERIAL1 connector on the STBfront panel (the AM33&quot;s serial port 0). This line is programmedto 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. Diagnosticoutput will be output to GDB using the same connection.</P><P>This procedure also applies for programming ROM startup eCosprograms into ROM, given a binary format image of the program from<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING"> mn10300-elf-objcopy.</PRE></TD></TR></TABLE></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3238">Use with the JTAG debugger</H2><P>To use eCos from the JTAG debugger, executables must be builtwith ROM startup and then downloaded via the JTAG debugger. Forthis to work there must be an SDRAM memory card in SUB MEMORY SLOT &lt;0&#62; andthe hardware switches on the front panel set to the following: </P><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">D U D D D U D DD = lower part of rocker switch pushed inU = upper part of rocker switch pushed in</PRE></TD></TR></TABLE><P>Connect the JTAG unit and run the debugger as described inthe documentation that comes with it.</P><P>eCos executables should be renamed to have a &#8220;.out&#8221; extensionand may then be loaded using the debugger&quot;s &#8220;l&#8221; or &#8220;lp&#8221; commands.</P><P>Diagnostic output generated by the program will be sent outof the AM33&quot;s serial port 0 which is connected to the SERIAL1connector on the STB front panel. This line is programmed to runat 38400 baud, 8 data bits, no parity, and one stop bit (8-N-1)with no flow control. Connection to the host computer should beusing a standard RS232 null modem serial cable. A gender changermay also be required.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN3245">Building the GDB stub ROM image</H2><P>eCos comes with a pre-built GDB stub ROM image for the AM33-STBplatform. This can be found at <TTCLASS="FILENAME">loaders/am33-stb/gdbload.bin</TT> relativeto the eCos installation directory.</P><P>If necessary, the ROM image can be re-built as follows:</P><P></P><OLTYPE="1"><LI><P>		On Windows hosts, open a Bash session using <SPANCLASS="emphasis"><ICLASS="EMPHASIS">Start-&#62;Programs-&#62;Red Hat eCos-&#62;eCosDevelopment Environment</I></SPAN></P></LI><LI><P>Create a build directory and cd into it</P></LI><LI><P>Run (all as one line):<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="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</PRE></TD></TR></TABLE>	    </P><P>where BASE_DIR is the path to the eCos installationdirectory.</P></LI><LI><P>Edit the configuration file <TTCLASS="FILENAME">pkgconf/hal.h</TT> in the build directory tree by ensuring the following configurationoptions are set as follows:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="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</PRE></TD></TR></TABLE>	    </P></LI><LI><P>Run: make</P></LI><LI><P>Run: make -C hal/common/current/current/src/stubrom</P></LI><LI><P>The file <TTCLASS="FILENAME">hal/common/current/src/stubrom</TT> will be an ELF format executable of the ROM image. Use mn10300-elf-objcopy toconvert this to the appropriate format for loading into the MatsushitaFLASH ROM programmer, mode &#8220;binary&#8221; in this case: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">$ mn10300-elf-objcopy -O binary hal/common/current/src/stubrom/ \  stubrom stubrom.img</PRE></TD></TR></TABLE></P></LI></OL></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="setup-mn10300-sim.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-user-guide.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="setup-tx39-jmr3904.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">MN10300 Architectural Simulator Setup</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="appendix-target-setup.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">TX39 Hardware Setup</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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