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

📄 c_load.htm

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 HTM
字号:
<title>The load Command</title><h1>load</h1><!--INDEX "load command" download hostport -->The load command downloads programs and data from the host. <p></dl><h2>Format</h2><dl><dd>The format for the load command is:<p><pre>load [-abeistB] [-baud] [offset] [-c cmdstr] <i>filename</i></pre>where:<p><table><tr><td>-m	</td><td>Only load the symbol information.</td></tr><tr><td>-a	</td><td>suppresses addition of an offset to symbols.</td></tr><tr><td>-b	</td><td>suppresses deletion of all breakpoints before the download. </td></tr><tr><td>-e	</td><td>suppresses clearing of the exception handlers.</td></tr><tr><td>-i	</td><td>ignores checksum errors.</td></tr><tr><td>-s	</td><td>suppresses clearing of the symbol table before the download.</td></tr><tr><td>-t	</td><td>loads at the top of memory (PMON only).</td></tr><tr><td>-f	</td><td>load driver from flash (IMON only).</td></tr><tr><td>-B	</td><td>Interprets input from host as binary data for Ethernet 	transfers.</td></tr><tr><td>-baud		</td><td>sets the baud rate for transfer.</td></tr><tr><td>offset		</td><td>loads at the specified offset.</td></tr><tr><td valign=top>-c cmdstr	</td><td>sets a command string that the <a href="mondef.htm">Monitor</a> sends to the host to 		start a download operation. String cmdstr is the string that 		starts the download. Note that the command string must be 		enclosed in double quotation marks if the string contains any 		spaces.</td></tr><tr><td>filename	</td><td>load the specified file (imon95 only).</td></tr></table><p>Invoking the load command with no parameters or arguments clears the symbol table, deletes all current breakpoints, allows the <a href="mondef.htm">Monitor</a> to receive programs or data from the host, and uses the current baud rate by default.<p></dl><h2>Functional Description</h2><dl><dd>The load command accepts programs and data from the host port in LSILogic's proprietary <a href="frec.htm">FastLoad format</a>, <ahref="srec.htm">Motorola S-record</a>, or binary files.  The user canset environment variables to change the data port, the format, and thetransfer protocol. <p>The load command normally clears the symbol table, exception handlers, and all breakpoints. The -s and -b options suppress the clearing of the symbol table and breakpoints, respectively. The value of the EPC register is set automatically to the entry point of the program. Therefore, to execute the downloaded program, only the g command is required.<p>The -c option permits a command string to be sent to the host when the load command is issued. This is intended for use in conjunction with the transparent mode. Note that if the command string contains multiple words, the command must be enclosed in double quotation marks, as shown in the example below.<p>The load command returns the error message "out of memory" if there is insufficient space in the heap for the program's global symbols. To increase the size of the heap , use the set heaptop command to reserve more space in the heap, and then use the -T option with the pmcc command to set the start address of the text section to the same address that was specified for the heap. See the pmcc command on page 3-13.<p></dl><h2>The dlecho, dlproto, and hostport Variables</h2><dl><dd>The dlecho, dlproto, and hostport variables control operation of the download. The following table shows how these environment variables affect the operation of the load command.<p><center><table border cellpadding=5><tr><th align=left>Variable</th><th align=left>Action</th></tr><tr><td>dlecho off</td><td>Do not echo the lines</td></tr><tr><td>dlecho on</td><td>Echo the lines</td></tr><tr><td>dlecho lfeed</td><td>Echo only a linefeed for each line</td></tr><tr><td>dlproto none</td><td>Do not use a protocol</td></tr><tr><td>dlproto XonXoff</td><td>Send Xon and Xoff to control the host</td></tr><tr><td>dlproto EtxAck</td><td>Expect Etx as end of record, send Ack</td></tr><tr><td>hostport tty0</td><td>Select tty0 as the port to which the host is connected</td></tr><tr><td>hostport tty1</td><td>Select tty1 as the port to which the host is connected</td></tr><tr><td>hostport ethernet</td><td>Select <a href="dlether.htm">ethernet</a>as the port to which the host is connected</td></tr></table></center><p>See the section on downloading beginning on page 1-9 for more information on these variables and the use of the load command.<p></dl><h2>Examples</h2><dl><dd>Download to tty1 using the <a href="tools/edown.htm">edown</a> program.<p><pre>	PMON> set dlecho off 	PMON> set hostport tty1 	PMON> set dlproto EtxAck 	PMON> load 		% edown < test1.rec	Downloading from tty0, ^C to abort	Entry address is 80020000	Total = 0x00043C00 bytes	PMON></pre><p>Download to tty0 using a terminal emulator.<p><pre>	PMON> set dlecho off 	PMON> set hostport tty0 	PMON> set dlproto none 	PMON> load 		-- use terminal emulator's "send text file" command	Downloading from tty0, ^C to abort	Entry address is 80020000	Total = 0x00043C00 bytes	PMON></pre><p>When using the <a href="mondef.htm">Monitor</a> in an environment wheretty1 is connected to a login line on a Unix host. You will need to senda command to start the download. In the following example the command"<samp>cat test1.rec</samp>" is sent to the host.<p><pre>	PMON> load -c "cat test1.rec"</pre><p></dl><h2>Files</h2><dl><dd>The code for the load command is located in <a href="../pmon/load.c">pmon/load.c</a> (PMON), and <a href="../imon/load.c">imon/load.c</a> (IMON).</dl><h2>See Also</h2><dl><dd><a href="c_set.htm">set</a> command for the setup of the environment variables.</dl><p><hr><b>Navigation:</b> <a href="index.htm">Document Home</a> | <a href="doctoc.htm">Document Contents</a> | <a href="docindex.htm">Document Index</a> <p>

⌨️ 快捷键说明

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