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

📄 redboot_cmds.sgml

📁 eCos/RedBoot for勤研ARM AnywhereII(4510) 含全部源代码
💻 SGML
📖 第 1 页 / 共 5 页
字号:
	      <entry>Number</entry>
	      <entry>Address in memory to load the data.  Formatted data streams will have
an implied load address which this option may override.</entry>	     
	      <entry><emphasis>Depends on data format</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-c <replaceable>channel</replaceable></entry>	     
	      <entry>Number</entry>
	      <entry>Specify which I/O channel to
use for download.  This option is only supported when using either
xmodem or ymodem protocol.</entry>	     
	      <entry><emphasis>Depends on data format</emphasis></entry>	     
	    </row>
	    <row>
	      <entry><replaceable>file_name</replaceable></entry>	     
	      <entry>String</entry>
	      <entry>The name of the file on the <acronym>TFTP</acronym> or <acronym>HTTP</acronym>
server or the local disk. Details of how this is specified for <acronym>TFTP</acronym> are
host-specific. For local disk files, the name must be in <emphasis>disk</emphasis>:
<emphasis>filename</emphasis> format. The disk portion must match one of the disk
names listed by the <command>disks</command> command.</entry>	     
	      <entry><emphasis>None</emphasis></entry>	     
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </refsect1>
    <refsect1>
      <title>Description</title>
      <para>
The <command>load</command> command is used to download
data into the target system. Data can be loaded via a network connection,
using either the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> protocols, or the console serial connection using the
X/Y modem protocol. Files may also be loaded directly from local filesystems
on disk. Files to be downloaded may either be executable images in 
ELF executable program format,
Motorola S-record (SREC)
format or raw data.
      </para>
    </refsect1>
    <refsect1>
      <title>Examples</title>
      <para>
Download a Motorola S-record (or ELF) image, using <acronym>TFTP</acronym>, specifying the 
base memory address.
<screen>
RedBoot> <userinput>load redboot.ROM -b 0x8c400000</userinput>
Address offset = 0x0c400000
Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
</screen> 
      </para>
      <para>
Download a Motorola S-record (or ELF) image, using <acronym>HTTP</acronym>, specifying the
host [server] address.
<screen>
RedBoot> <userinput>load /redboot.ROM -m HTTP -h 192.168.1.104</userinput>
Address offset = 0x0c400000
Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
</screen> 
      </para>
      <para>
Load an ELF file from /dev/hda1 which should be an EXT2 partition:
<screen>
RedBoot> <userinput>load -mode disk hda1:hello.elf</userinput>
Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
</screen>
      </para>
    </refsect1>
  </refentry>

<!-- ******** mcmp *************************************************** -->
  <refentry id="mcmp-command">
    <refnamediv>
      <refname>mcmp</refname>
      <refpurpose>Compare two segments of memory</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <cmdsynopsis>
	<command>mcmp</command>
	    <arg choice="req">-s <replaceable>location1</replaceable></arg>
	    <arg choice="req">-d <replaceable>location1</replaceable></arg>
	    <arg choice="req">-l <replaceable>length</replaceable></arg>
	  <group>
	    <arg>-1</arg>
	    <arg>-2</arg>
	    <arg>-4</arg>
	  </group>
      </cmdsynopsis>
    </refsynopsisdiv>
    <refsect1>
      <title>Arguments</title>
      <informaltable frame="all">
	<tgroup cols="4" colsep="1" rowsep="1" align="left">
	  <colspec colname="c1">
	  <colspec colname="c2">
	  <colspec colname="c3">
	  <colspec colname="c4">
	  <thead>
	    <row>
	      <entry>Name</entry>
	      <entry>Type</entry>
	      <entry>Description</entry>
	      <entry>Default</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry>-s <replaceable>location1</replaceable></entry>	     
	      <entry>Memory address</entry>
	      <entry>Location for start of data.</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-d <replaceable>location2</replaceable></entry>	     
	      <entry>Memory address</entry>
	      <entry>Location for start of data.</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-l <replaceable>length</replaceable></entry>	     
	      <entry>Number</entry>
	      <entry>Length of data</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-1</entry>	     
	      <entry></entry>
	      <entry>Access one byte (8 bits) at a time.  
Only the least significant 8 bits of the pattern will be used.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-2</entry>	     
	      <entry></entry>
	      <entry>Access two bytes (16 bits) at a time.  
Only the least significant 16 bits of the pattern will be used.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-4</entry>	     
	      <entry></entry>
	      <entry>Access one word (32 bits) at a time.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </refsect1>
    <refsect1>
      <title>Description</title>
	<para>Compares the contents of two ranges of memory (RAM, ROM, FLASH, etc).</para>
    </refsect1>
    <refsect1>
      <title>Examples</title>
      <para>
Compare two buffers which match (result is <emphasis>quiet</emphasis>).
<screen> 
RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -p 0xDEADFACE</userinput>
RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x20</userinput>
</screen> 
</para>
<para>
Compare two buffers which don't match.  
Only the first non-matching element is displayed.
<screen> 
RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x30 -2</userinput>
Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000
</screen> 
      </para>
    </refsect1>
  </refentry>

<!-- ******** mcopy *************************************************** -->
  <refentry id="mcopy-command">
    <refnamediv>
      <refname>mcopy</refname>
      <refpurpose>Copy memory</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <cmdsynopsis>
	<command>mcopy</command>
	    <arg choice="req">-s <replaceable>source</replaceable></arg>
	    <arg choice="req">-d <replaceable>destination</replaceable></arg>
	    <arg choice="req">-l <replaceable>length</replaceable></arg>
	  <group>
	    <arg>-1</arg>
	    <arg>-2</arg>
	    <arg>-4</arg>
	  </group>
      </cmdsynopsis>
    </refsynopsisdiv>
    <refsect1>
      <title>Arguments</title>
      <informaltable frame="all">
	<tgroup cols="4" colsep="1" rowsep="1" align="left">
	  <colspec colname="c1">
	  <colspec colname="c2">
	  <colspec colname="c3">
	  <colspec colname="c4">
	  <thead>
	    <row>
	      <entry>Name</entry>
	      <entry>Type</entry>
	      <entry>Description</entry>
	      <entry>Default</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry>-s <replaceable>location1</replaceable></entry>	     
	      <entry>Memory address</entry>
	      <entry>Location of data to copy.</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-d <replaceable>location2</replaceable></entry>	     
	      <entry>Memory address</entry>
	      <entry>Destination for copied data.</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-l <replaceable>length</replaceable></entry>	     
	      <entry>Number</entry>
	      <entry>Length of data</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-1</entry>	     
	      <entry></entry>
	      <entry>Copy one byte (8 bits) at a time.</entry>
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-2</entry>	     
	      <entry></entry>
	      <entry>Copy two bytes (16 bits) at a time.</entry>
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-4</entry>	     
	      <entry></entry>
	      <entry>Copy one word (32 bits) at a time.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </refsect1>
    <refsect1>
      <title>Description</title>
	<para>Copies memory (RAM, ROM, FLASH, etc) from one area to another.</para>
    </refsect1>
    <refsect1>
      <title>Examples</title>
      <para>
Copy 16 bits at a time.
<screen> 
RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -2 -p 0xDEAD</userinput>
RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -2 -p 0x0</userinput>
RedBoot> <userinput>dump  -b 0x200000 -l 0x20 -2</userinput>
00200000: 0000 0000 0000 0000  0000 0000 0000 0000
00200010: 0000 0000 0000 0000  0000 0000 0000 0000
RedBoot> <userinput>mcopy -s 0x100000 -d 0x200000 -2 -l 0x20</userinput>
RedBoot> <userinput>dump  -b 0x200000 -l 0x20 -2</userinput>
00200000: DEAD DEAD DEAD DEAD  DEAD DEAD DEAD DEAD
00200010: DEAD DEAD DEAD DEAD  DEAD DEAD DEAD DEAD
</screen> 
</para>
    </refsect1>
  </refentry>

<!-- ******** mfill *************************************************** -->
  <refentry id="mfill-command">
    <refnamediv>
      <refname>mfill</refname>
      <refpurpose>Fill RAM with a specified pattern</refpurpose>
    </refnamediv>
    <refsynopsisdiv>
      <cmdsynopsis>
	<command>mfill</command>
	    <arg choice="req">-b <replaceable>location</replaceable></arg>
	    <arg choice="req">-l <replaceable>length</replaceable></arg>
	    <arg choice="req">-p <replaceable>value</replaceable></arg>
	  <group>
	    <arg>-1</arg>
	    <arg>-2</arg>
	    <arg>-4</arg>
	  </group>
      </cmdsynopsis>
    </refsynopsisdiv>
    <refsect1>
      <title>Arguments</title>
      <informaltable frame="all">
	<tgroup cols="4" colsep="1" rowsep="1" align="left">
	  <colspec colname="c1">
	  <colspec colname="c2">
	  <colspec colname="c3">
	  <colspec colname="c4">
	  <thead>
	    <row>
	      <entry>Name</entry>
	      <entry>Type</entry>
	      <entry>Description</entry>
	      <entry>Default</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry>-b <replaceable>location</replaceable></entry>	     
	      <entry>Memory address</entry>
	      <entry>Location in memory for start of data.</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-l <replaceable>length</replaceable></entry>	     
	      <entry>Number</entry>
	      <entry>Length of data</entry>	     
	      <entry><emphasis>none</emphasis></entry>	     
	    </row>
	    <row>
	      <entry>-p <replaceable>pattern</replaceable></entry>	     
	      <entry>Number</entry>
	      <entry>Data value to fill with</entry>	     
	      <entry>0</entry>	     
	    </row>
	    <row>
	      <entry>-1</entry>	     
	      <entry></entry>
	      <entry>Access one byte (8 bits) at a time.  
Only the least significant 8 bits of the pattern will be used.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-2</entry>	     
	      <entry></entry>
	      <entry>Access two bytes (16 bits) at a time.  
Only the least significant 16 bits of the pattern will be used.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	    <row>
	      <entry>-4</entry>	     
	      <entry></entry>
	      <entry>Access one word (32 bits) at a time.</entry>	     
	      <entry>-4</entry>	     
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </refsect1>
    <refsect1>
      <title>Description</title>
	<para>Fills a range of memory with the given pattern.</para>
    </refsect1>
    <refsect1>
      <title>Examples</title>
      <para>
Fill a buffer with zeros.
<screen> 
RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
00100000: 00 3E 00 06 00 06 00 06  00 00 00 00 00 00 00 00  |.>..............|
00100010: 00 00 00 78 00 70 00 60  00 60 00 60 00 60 00 60  |...x.p.`.`.`.`.`|
RedBoot> <userinput>mfill -b 0x100000 -l 0x20</userinput>
RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
00100000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
</screen> 
</para>
<para>
Fill a buffer with a pattern.
<screen> 
RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
00100000: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
00100010: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
</screen> 
      </para>
    </refsect1>

⌨️ 快捷键说明

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