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

📄 resource-usage.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>RedBoot Resource Usage</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="Getting Started with RedBoot"HREF="getting-started-with-redboot.html"><LINKREL="PREVIOUS"TITLE="RedBoot Startup Mode"HREF="startup-mode.html"><LINKREL="NEXT"TITLE="Configuring the RedBoot Environment"HREF="configuring-the-redboot-environment.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 Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="startup-mode.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 1. Getting Started with RedBoot</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="configuring-the-redboot-environment.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="RESOURCE-USAGE">RedBoot Resource Usage</H1><P>  </P><P>RedBoot takes up both flash and RAM resources depending on itsstartup mode and number of enabled features. There are also otherresources used by RedBoot, such as timers. Platform-specific resourcesused by RedBoot are listed in the platform specific parts of thismanual.</P><P>Both flash and RAM resources used by RedBoot depend to somedegree on the features enabled in the RedBoot configuration. It ispossible to reduce in particular the RAM resources used by RedBoot byremoving features that are not needed. Flash resources can also bereduced, but due to the granularity of the flash (the block sizes),reductions in feature size do not always result in flash resourcesavings.</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN2631">Flash Resources</H2><P>On many platforms, a ROM mode RedBoot image resides in the firstflash sectors, working as the board's primary boot monitor. On theseplatforms, it is also normal to reserve a similar amount of flash fora secondary RAM mode image, which is used when updating the primaryROM mode image.</P><P>On other platforms, a ROMRAM mode RedBoot image is used as theprimary boot monitor. On these platforms there is not normallyreserved space for a RAM mode RedBoot image, since the ROMRAM modeRedBoot is capable of updating the primary boot monitor image.</P><P>Most platforms also contain a FIS directory (keeping track ofavailable flash space) and a RedBoot config block (containing RedBootboard configuration data).</P><P>To see the amount of reserved flash memory, run the <BCLASS="COMMAND">fislist</B> command:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot&#62; <TTCLASS="USERINPUT"><B>fis list</B></TT>Name              FLASH addr  Mem addr    Length      Entry pointRedBoot           0x00000000  0x00000000  0x00020000  0x00000000RedBoot[RAM]      0x00020000  0x06020000  0x00020000  0x060213C0RedBoot config    0x0007F000  0x0007F000  0x00001000  0x00000000FIS directory     0x00070000  0x00070000  0x0000F000  0x00000000</PRE></TD></TR></TABLE></P><P>To save flash resources, use a ROMRAM mode RedBoot, or if usinga ROM mode RedBoot, avoid reserving space for the RedBoot[RAM] image(this is done by changing the RedBoot configuration) and download theRAM mode RedBoot whenever it is needed. If the RedBoot image takes upa fraction of an extra flash block, it may be possible to reduce theimage size enough to free this block by removing some features.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN2641">RAM Resources</H2><P>RedBoot reserves RAM space for its run-time data, and suchthings as CPU exception/interrupt tables. It normally does so at thebottom of the memory map. It may also reserve space at the top of thememory map for configurable RedBoot features such as the net stackand zlib decompression support.</P><P>To see the actual amount of reserved space, issue the<BCLASS="COMMAND">version</B> command, which prints the RedBoot banner,including the RAM usage:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot&#62; <TTCLASS="USERINPUT"><B>version</B></TT>RedBoot(tm) bootstrap and debug environment [ROM]Non-certified release, version UNKNOWN - built 13:31:57, May 17 2002Platform: FooBar (SH 7615)Copyright (C) 2000, 2001, 2002, Red Hat, Inc.<SPANCLASS="emphasis"><ICLASS="EMPHASIS">RAM: 0x06000000-0x06080000, 0x06012498-0x06061000 available</I></SPAN>FLASH: 0x00000000 - 0x00080000, 8 blocks of 0x00010000 bytes each.</PRE></TD></TR></TABLE></P><P>To simplify operations that temporarily need data in freememory, the limits of free RAM are also available as aliases (alignedto the nearest kilo-byte limit). These are namedFREEMEMLO andFREEMEMHI, and canbe used in commands like any user defined alias:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot&#62; <TTCLASS="USERINPUT"><B>load -r -b %{FREEMEMLO} file</B></TT>Raw file loaded 0x06012800-0x06013e53, assumed entry at 0x06012800</PRE></TD></TR></TABLE><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot&#62; <TTCLASS="USERINPUT"><B>x -b %{FREEMEMHI}</B></TT>06061000: 86 F5 EB D8 3D 11 51 F2  96 F4 B2 DC 76 76 8F 77  |....=.Q.....vv.w|06061010: E6 55 DD DB F3 75 5D 15  E0 F3 FC D9 C8 73 1D DA  |.U...u]......s..|</PRE></TD></TR></TABLE></P><P>To reduce RedBoot's RAM resource usage, use a ROM modeRedBoot. The RedBoot features that use most RAM are the net stack, theflash support and the gunzip support. These, and other features, canbe disabled to reduce the RAM footprint, but obviously at the cost oflost functionality.</P></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="startup-mode.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="configuring-the-redboot-environment.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">RedBoot Startup Mode</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="getting-started-with-redboot.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Configuring the RedBoot Environment</TD></TR></TABLE></DIV></BODY></HTML>

⌨️ 快捷键说明

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