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.TWL</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.TWL <IMG src="../image/TWL.gif" align="middle"></H1> 41<H2>Description</H2> 42<P><FONT color=#ff0000>This command is for TWL ROMs. See <CODE><A href="loadrun.html">loadrun</A></CODE> for details on NITRO ROMs.</FONT></P> 43<P> <CODE>loadrun.TWL</CODE> is a tool for downloading and executing specified binary data on devices like the IS-TWL-DEBUGGER. This tool can be run quickly from command line because there is no need to run the debugger software.</P> 44<H2>Using the Tool</H2> 45<H3>Start Command</H3> 46<P><CODE>% loadrun.TWL [OPTION]... [TWLSRLFILE]</CODE></P> 47<P><CODE>TWLSRLFILE</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: [IS-TWL-DEBUGGER] serial:10000995<BR> 1: [IS-TWL-DEBUGGER] serial:10000996<BR> 2 device(s) found.</CODE></BLOCKQUOTE> 50<P><CODE>serial</CODE> is the serial number specified with the <CODE>-s</CODE> option. [IS-TWL-DEBUGGER]</CODE> is the type of device. If the device is being used by some other application like the IS-TWL-DEBUGGER software, <CODE>loadrun.TWL</CODE> will not be able to find the device.</P> 51<P>If <CODE><B>-l</B></CODE> or <CODE><B>--lap</B></CODE> is specified, the time from the start of execution is added to the beginning of each debug output line in {minutes:seconds} format when the ROM file output is displayed using a function such as <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<P>If the option <CODE><B>-N</B></CODE> or <CODE><B>--nitro</B></CODE> is specified, applications can be run on the IS-TWL-DEBUGGER in NITRO mode. If nothing is specified, the application will run in TWL mode. In order to use this feature, version 0.64 or later of the IS-TWL-DEBUGGER software is required.</P> 54<P>If the <CODE><B>-A</B></CODE> or <CODE><B>--architecture</B></CODE> option is specified, either <A9> or <A7> will be prepended to the beginning of each line of debug output (output from functions like <CODE><A href="../os/debug/OS_Printf.html">OS_Printf()</A></CODE>). This indicates the architecture of the processor that generated the output (ARM7 or ARM9).</P> 55<P>If the <CODE><B>-n</B></CODE> or <CODE><B>--console</B></CODE> option is specified, <0>-<3> will be prepended to the beginning of each line of output to indicate which window functions like <CODE><A href="../os/debug/OS_Printf.html">OS_Printf()</A></CODE> are printing to. Four output windows are available with IS-TWL-DEBUGGER. The destination can be set directly using functions like <CODE><A href="../os/debug/OS_FPrintf.html">OS_FPrintf()</A></CODE>. If not set directly, the output destination will be determined by <CODE><A href="../os/debug/OS_SetPrintOutput.html">OS_SetPrintOutput()</A></CODE>.</P> 56<P>If options are specified to distinguish both the processor and the output window, this information will be grouped together (for example <A9:0> or <A7:2>).</P> 57<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. You can omit all but the lower-order digits of the serial number, as long as the digits you specify are unique among the devices you are using. For example, let's assume you have two devices connected whose serial numbers are 10000123 and 10000453. If you want to indicate the former, you don't have to specify the entire number (<CODE>-s10000123</CODE>) -- specifying either <CODE>-s123</CODE> or <CODE>-s23</CODE> will work just fine.</P> 58<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> 59<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> 60<P>The <CODE><B>-a</B></CODE> and <CODE> <B>--abort-string</B></CODE> options specify the string that ends execution. If the specified text appears at the beginning of the line, execution is forced to terminate. <FONT color="#ff0000">No determination is made until a carriage return is encountered.</FONT>Gaps of time between displays is fine.</P> 61<P>For example, if the termination string is "ABORT," any of the following</P> 62<BLOCKQUOTE> 63<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> 64</BLOCKQUOTE> 65<P>will result in termination, but the following</P> 66<BLOCKQUOTE> 67<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> 68</BLOCKQUOTE> 69<P>will not cause termination. In addition,</P> 70<BLOCKQUOTE><CODE>OS_Printf("ABORT")</CODE></BLOCKQUOTE> 71<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> 72<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. <FONT color="#ff0000">(This option has not yet been implemented, so please do not use it. Its specification may also change in the future.)</FONT></P> 73<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. <FONT color="#ff0000">(This option has not yet been implemented, so please do not use it. Its specification may also change in the future.)</FONT></P> 74 75<!-- <P><CODE><B>--stdin</B></CODE> ??????????????????????????????????????????????? <CODE>TWLSRLFILE</CODE> ????????????</P> --> 76<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> 77<P>If the <B><CODE>-v</CODE></B> or <CODE><B>--verbose</B></CODE> option is specified, detailed operation descriptions are displayed. </P> 78<P>The <CODE><B>-h</B></CODE> or <CODE><B>--help</B></CODE> options display simple instructions.</P> 79<P>The <CODE><B>--version</B></CODE> option displays the command version.</P> 80<H3><BR> <BR> Termination Conditions</H3> 81<P>- Calling <CODE><A href="../os/system/OS_Exit.html">OS_Exit()</A></CODE> on the TWL will cause the specified text string to be displayed and result in program HALT status. If <CODE>loadrun.TWL</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.TWL</CODE> will terminate.</P> 82<P>- The program will end if the string specified by the user as an option is displayed.</P> 83<P>- The program will end if the execution time exceeds the execution timeout specified by the user as an option.</P> 84<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> 85<P>- The program will also end if CTRL-C or a similar command is used to stop the program.</P> 86<H3><BR> <BR> Debugger Operation Prohibited Flag</H3> 87<P>Some <CODE>srl</CODE> files may prohibit being run on a debugger. This is controlled by a bit in a certain place within the ROM header that is embedded in the <CODE>.srl</CODE> file. Attempting to load a prohibited file with <CODE>loadrun.TWL</CODE> will halt with an error.</P> 88<H2>Location</H2> 89<P><CODE>$TWLSDK/tools/bin/loadrun.TWL.exe</CODE></P> 90<H2>See Also</H2> 91<P><CODE><A href="nitrorunTWL.html">nitrorun.TWL</A><BR> <A href="../os/system/OS_Exit.html">OS_Exit</A><BR> <A href="loadrun.html">loadrun</A></CODE></P> 92<H2>Revision History</H2> 93<P>2008/06/12 Added a description of running a hybrid ROM in NITRO mode (-n option).<BR> 2008/04/28 Added a description of the debugger prohibition flag.<BR> 2008/01/12 Initial version.</P> 94<hr><p>CONFIDENTIAL</p></body> 95</HTML>