1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>loadrun</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9<STYLE type="text/css"> 10<!-- 11.sample_source{ 12 background-color : #e8e8e8; 13} 14H3{ 15 color : teal; 16} 17.command_list{ 18 margin-bottom : 16pt; 19} 20.command_desc{ 21 } 22.command_item{ 23 margin-top : 16pt; 24 background-color : #e8e8e8; 25} 26.blockquoted_table { 27 border : 1px; 28 width : 80%; 29} 30TD,TH{ 31 border-color : #c0d8d8; 32 padding : 1pt 4pt 1pt 4pt; 33 border-width : 1px; 34 border-style : solid; 35} 36--> 37</STYLE> 38</HEAD> 39<BODY> 40<H1 align="left">loadrun <IMG src="../image/NTR.gif" align="middle"></H1> 41<H2>Description</H2> 42<P><FONT color=#ff0000>This command is for NITRO ROMs. See <CODE><A href="loadrunTWL.html">loadrun.TWL</A></CODE> for details on TWL ROMs.</FONT></P> 43<P> <CODE>loadrun</CODE> is a tool for downloading and executing specified binary data on devices, such as IS-NITRO-EMULATOR. This tool can execute quickly from command line because there is no need to run the debugger.</P> 44<H2>Using the Tool</H2> 45<H3>Start Command</H3> 46<P><CODE>% loadrun [OPTION]... [NITROSRLFILE]</CODE></P> 47<P><CODE>NITROSRLFILE</CODE> is the ROM file to execute. .srl files can be specified.</P> 48<P>Specifying the option <CODE><B>-L</B> or <B>--list</B></CODE> will display a list of identifiable devices that are currently connected. The following is an example of a list that may display.</P> 49<BLOCKQUOTE><CODE>---- Connected devices: <BR> 0: [NITROUSB] IS-NITRO-EMULATOR serial:04070680<BR> 1: [NITROUSB] IS-NITRO-EMULATOR serial:04070682<BR> 2: [NITROUSB] IS-NITRO-EMULATOR serial:04070683<BR> 3 device(s) found.</CODE></BLOCKQUOTE> 50<P><CODE>serial</CODE> is the serial number specified by using the <CODE>-s</CODE> option. <CODE>[NITROUSB]</CODE> is a device type. If NITRO-DEBUGGER and other applications are using the device, <CODE>[NITROUSB]</CODE> is set to <CODE>[UNKNOWN]</CODE>.</P> 51<P>If <CODE><B>-l</B> or <B>--lap</B></CODE> is specified, the time from the start of the execution is added to the top of each line as {xx:xx} (minutes: seconds) format when the debug output is output from the ROM file to the display using <CODE><A href="../os/debug/OS_Printf.html">OS_Printf()</A></CODE>. An example of this display is given below.</P> 52<BLOCKQUOTE><CODE>{0:01}Program started<BR> {0:01}--- heap init<BR> {0:02}x=14 y=50<BR> {0:04}</CODE></BLOCKQUOTE> 53 54<P>The <CODE><B>-s</B></CODE> and <CODE><B>--serial</B></CODE> options take numeric values as arguments. This option specifies the serial number of the device that will download the <CODE>.srl</CODE> file. Data is downloaded to the device with that specified serial number. Although an unlikely case, if more than one device has the same serial number, data will be downloaded to the first device found. Note that if a serial number such as 04070680 is displayed in the device list when using the <CODE>-L</CODE> option, you can omit the initial zero and specify the device using 4070680.</P> 55<P>The <B><CODE>-t</CODE></B> and <B><CODE>--timeout</CODE></B> options take numeric values as arguments. This option is used to specify the display timeout in units of seconds. After executing the .srl file and receiving the latest <CODE><A href="../os/debug/OS_Printf.html">OS_Printf()</A></CODE> data, execution is forced to terminate if more data does not arrive transmitted within the specified amount of time. If zero is specified, no timeout occurs. The same holds if this option is not specified.</P> 56<P>The <CODE><B>-T</B></CODE> and <CODE><B>--exec-timeout</B></CODE> options take numeric values as arguments. This option is used to specify the execution timeout in units of seconds. Execution is forced to terminate if the number of specified seconds has elapsed since execution of the <CODE>.srl</CODE> file began. If zero is specified, there is no execution timeout. The same holds if this option is not specified.</P> 57<P>The <CODE><B>-a</B></CODE> and <CODE> <B>--abort-string</B></CODE> options specify the string that ends execution. If the text string specified here appears at the head of the line, execution is forced to terminate. Termination is not determined until a carriage return is found. Gaps of time between displays is fine.</P> 58<P>For example, if the termination string is "ABORT," any of the following</P> 59<BLOCKQUOTE> 60<P><CODE>OS_Printf("ABORT\n")<BR> OS_Printf("ABORTING\n")<BR> OS_Printf("ABORT\nQUIT\n")<BR> OS_Printf("ABOR");OS_Sleep(1000);OS_Printf("T\n");</CODE></P> 61</BLOCKQUOTE> 62<P>will result in termination, but the following</P> 63<BLOCKQUOTE> 64<P><CODE>OS_Printf("  ABORT\n") // Spaces in front<BR> OS_Printf("ABO\nRT\n") // Line break in the middle<BR> OS_Printf("A B O R T\n") // With spaces included so that it the string is not "ABORT"</CODE></P> 65</BLOCKQUOTE> 66<P>will not cause termination. In addition,</P> 67<BLOCKQUOTE><CODE>OS_Printf("ABORT")</CODE></BLOCKQUOTE> 68<P>will not immediately terminate because a line break has not been added. Termination will occur after <CODE>OS_Printf("\n")</CODE>, <CODE>OS_Printf(" SOON\n")</CODE>, or other line feed code is encountered later.</P> 69<P>The <CODE><B>-c</B></CODE> and <CODE><B>--card-slot</B></CODE> options take arguments. ON or OFF may be specified as arguments. This option is used to lock the card slot during execution. OFF is used if unspecified.</P> 70<P>The <CODE><B>-c</B></CODE> and <CODE><B>--cartridge-slot</B></CODE> options take arguments. ON or OFF may be specified as arguments. This option locks the cartridge slot during execution. OFF is used if unspecified.</P> 71 72<P>The <CODE><B>--stdin</B></CODE> option specifies the binary file input that is read from the standard input. In this case, the <CODE>NITROSRLFILE</CODE> is not a required argument in the command.</P> 73<P>If the <CODE><B>-q</B></CODE> or <CODE><B>--quiet</B></CODE> option is specified, quiet mode is used, and only error messages will be output. </P> 74<P>If the <B><CODE>-v</CODE></B> or <CODE><B>--verbose</B></CODE> option is specified, detailed operation descriptions are displayed. </P> 75<P>The <CODE><B>-h</B></CODE> or <CODE><B>--help</B></CODE> options display simple instructions.</P> 76<P>The <CODE><B>--version</B></CODE> option displays the command version.</P> 77<H3><BR> <BR> Termination Conditions</H3> 78<P>- Calling <CODE><A href="../os/system/OS_Exit.html">OS_Exit()</A></CODE> on the DS will cause the specified text string to be displayed and result in program HALT status. If <CODE>loadrun</CODE> accepts this display text string data, the termination status will be set to the value specified by <CODE><A href="../os/system/OS_Exit.html">OS_Exit()</A></CODE> and <CODE>loadrun</CODE> will terminate. </P> 79<P>- The program will end if the string specified by the user as an option is displayed.</P> 80<P>- The program will end if the execution time exceeds the execution timeout specified by the user as an option.</P> 81<P>- The program will end if there is no display for a longer period of time than the display timeout specified by the user as an option.</P> 82<P>- The program will also end if CTRL-C or a similar command is used to stop the program.</P> 83<H2>Location</H2> 84<P><CODE>$TwlSDK/tools/bin/loadrun.exe</CODE></P> 85<H2>See Also</H2> 86<P><CODE><A href="nitrorun.html">nitrorun</A>, <A href="../os/system/OS_Exit.html">OS_Exit</A>, <A href="loadrunTWL.html">loadrun.TWL</A></CODE></P> 87<H2>Revision History</H2> 88<P>2005/09/05 Deleted device type options.<BR>2005/08/31 Initial version.</P> 89<hr><p>CONFIDENTIAL</p></body> 90</HTML>