1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5<meta http-equiv="Content-Style-Type" content="text/css" />
6<title>ctr_loadrun</title>
7<style type="text/css">
8<!--
9body {
10/*
11    font-size       : 10pt;
12*/
13    font-weight     : normal;
14    color           : #000000;
15    margin          : 8px;
16}
17
18div {
19    width           : 98%;
20    white-space     : nowrap;
21}
22
23div.title {
24    text-align      : left;
25    font-weight     : bold;
26/*
27    font-size       : 16pt;
28*/
29    font-size       : 150%;
30    color           : #202020;
31    border-style    : double;
32    border-width    : 8px;
33    /* タイトルを囲む枠線の色を指定 */
34    border-color    : #CD202C;
35
36    /* RVLプラットフォーム系列 */
37/*
38    border-color    : #34beed;
39*/
40
41    /* TWLプラットフォーム系列 */
42/*
43    border-color    : #ff458f;
44*/
45
46    margin          : 4px;
47    padding         : 4px;
48}
49H1 {
50  font-size		: 150%;
51  font-family		: Arial;
52  border-bottom-width	: 5px;
53  border-bottom-style	: solid;
54  border-bottom-color	: #CD202C;
55  padding-bottom		: 1px;
56  margin-bottom		: 20px;
57  letter-spacing		: normal;
58  font-weight		: bold;
59}
60
61h2 {
62    font-weight     : bold;
63/*
64    font-size       : 16pt;
65*/
66    font-size       : 150%;
67    border-style    : none none solid double;
68    border-width    : 0px 0px 2px 8px;
69    /* 見出しの線の色を指定 */
70    border-color    : #CD202C;
71
72    /* RVLプラットフォーム系列 */
73/*
74    border-color    : #34beed;
75*/
76
77    /* TWLプラットフォーム系列 */
78/*
79    border-color    : #ff458f;
80*/
81
82    margin-left     : 2px;
83    padding-left    : 4px;
84}
85CODE {
86  font-family		: "Courier New", monospace;
87  position		: normal;
88  left			: 12px;
89  font-size		: 10pt;
90}
91table {
92  margin-top        : 2pt;
93  margin-bottom     : 2pt;
94  margin-left       : 0pt;
95  margin-right      : 0pt;
96  padding-left      : 0pt;
97  padding-right     : 0pt;
98  position          : relative;
99  left              : 12px;
100  font-family       : Arial;
101  font-size         : 10pt;
102  border-style      : none none none none;
103}
104td,th {
105  padding           : 2pt;
106  border-width      : 2pt;
107  border-style      : none none none none;
108  font-style        : normal;
109  text-align        : left;
110}
111td {
112  background        : #e8f4f4;
113  font-weight       : normal;
114}
115th {
116  background        : #c0d8d8;
117  font-weight       : bold;
118}
119
120p {
121    margin-left     : 4px;
122}
123p.code {
124  font-family		: "Courier New", monospace;
125  position		: normal;
126  left			: 12px;
127  font-size		: 10pt;
128  background            : #e8f4f4;
129}
130
131-->
132</style>
133</head>
134  <body>
135<h1>ctr_loadrun</h1>
136<h2>Description</h2>
137      <p>
138The <CODE>ctr_loadrun</CODE> tool is used to run specified programs in a debugger (such as PARTNER-CTR). It can be used to run programs from the command line without requiring any debugger operations.
139
140      </p>
141<h3>Limitations</h3>
142The following limitations apply when using <CODE>ctr_loadrun</CODE>.
143        <ul>
144<li> If multiple instances of <CODE>ctr_loadrun</CODE> are started for a single debugger, they cannot be used at the same time.</li>
145<li> <CODE>ctr_loadrun</CODE> cannot be used at the same time as Visual Studio Integration for CTR (VSI-CTR) for a single debugger.</li>
146        </ul>
147<h3>Program Arguments Passed to CTR Applications</h3>
148    <p>
149<CODE>ctr_loadrun</CODE> can pass program arguments to CTR applications. This provides a way of changing how the CTR application acts, without adding any changes to the application.
150    </p>
151    <p>
152The arguments that can be passed using the <CODE>-a</CODE> and <CODE>-args</CODE> options can be obtained from interfaces such as <CODE>nn::dbg::CTR::GetArgc</CODE> and <CODE>nn::dbg::CTR::GetArgv</CODE>. File data to be passed with the <CODE>-ba</CODE> option can be obtained from <CODE>nn::dbg::CTR::GetArgBinary</CODE>.
153    </p>
154    <p>
155The buffer for passing program parameters to CTR applications is limited. Internally, it is limited to 4 KB, so the data that can be passed from <CODE>ctr_loadrun</CODE> must be smaller than that.
156    </p>
157
158<h2>How to Use</h2>
159<h3>Format</h3>
160    <pre> $ ctr_loadrun32.exe [CciFile] [options...] </pre>
161<h3>Options</h3>
162    <div class="section">
163      <p>
164        <table class="table"><tbody>
165<tr><th>Options</th> <th>Arguments</th><th>Description</th></tr>
166          <tr>
167<td><CODE>-h (--help)</CODE></td>
168             <td></td>
169<td>Displays help.</td>
170          </tr>
171          <tr>
172<td><CODE>-l (--devicelist)</CODE></td>
173            <td></td>
174<td>Displays the connected devices.</td>
175          </tr>
176          <tr>
177<td><CODE>-t (--timeout)</CODE></td>
178<td><CODE>TIMEOUT-SECONDS</CODE></td>
179<td>Sets the timeout from startup to exit.</td>
180          </tr>
181          <tr>
182<td><CODE>-e (--exit-pattern)</CODE></td>
183<td><CODE>EXIT-PATTERN</CODE></td>
184<td>Exits upon output of a string that matches the regular expression specified by <CODE>EXIT-PATTERN</CODE>.<br />The regular expression syntax conforms with the .NET Framework's <CODE>System.Text.RegularExpressions</CODE> namespace.
185            </td>
186          </tr>
187          <tr>
188<td><CODE>-c (--command)</CODE></td>
189<td><CODE>COMMAND</CODE></td>
190<td>Specifies the command to run before loading the image file.</td>
191          </tr>
192          <tr>
193<td><CODE>-m (--macro)</CODE></td>
194<td><CODE>MACROFILE</CODE></td>
195<td>Specifies the macro file to run before loading the image file.</td>
196          </tr>
197          <tr>
198<td><CODE>-d (--device)</CODE></td>
199<td><CODE>SERIALNUMBER</CODE></td>
200<td>Specifies which device to use by its serial number.</td>
201          </tr>
202          <tr>
203<td><CODE>-nw (--no-wait)</CODE></td>
204            <td></td>
205<td>Exits <CODE>loadrun</CODE> when it is confirmed that all commands have been sent.</td>
206          </tr>
207          <tr>
208<td><CODE>-ns (--no-start)</CODE></td>
209            <td></td>
210<td>Normally the <CODE>G</CODE> command, which runs the program, is sent after the program has been loaded.<br />With this option, the <CODE>G</CODE> command is not sent.</td>
211          </tr>
212          <tr>
213<td><CODE>-a (--argument)</CODE></td>
214<td>ARGUMENT-STRING</td>
215<td>Sets one argument to be passed to the CTR application. Can be specified multiple times.</td>
216          </tr>
217          <tr>
218<td><CODE>-ba (--binary-argument)</CODE></td>
219<td>ARGUMENT-FILE</td>
220<td>Sets a file to be passed as data to the CTR application.</td>
221          </tr>
222          <tr>
223<td><CODE>-args (--arguments)</CODE></td>
224<td>ARGUMENTS ...</td>
225<td>Of the program arguments passed to <CODE>loadrum</CODE>, this option sets all subsequent parameters as those to be passed to the CTR application.</td>
226          </tr>
227          <tr>
228<td><CODE>--systray</CODE></td>
229            <td></td>
230<td>Hides the debugger in the system tray when the debugger launches.</td>
231          </tr>
232          <tr>
233<td><CODE>--exit-debugger</CODE></td>
234            <td></td>
235<td>Exits the debugger when <CODE>ctr_loadrun</CODE> terminates, for example, when the termination string pattern appears or when there is a timeout.</td>
236          </tr>
237        </tbody></table>
238      </p>
239    </div>
240<h2>Location</h2>
241    <pre> $CTRSDK_ROOT/tools/ComandlineTools/ctr_loadrun32.exe </pre>
242<h2>Revision History</h2>
243    <div class="section">
244      <dl class="history">
245        <dt>2011/12/29</dt>
246<dd> The feature for hiding the debugger in the system tray when it launches has been changed to the <CODE>--systray</CODE> option, and the normal behavior has been changed for the debugger to launch in a displayed window.<br />The feature for exiting the debugger when <CODE>ctr_loadrun32</CODE> terminates has been changed to the <CODE>--exit-debugger</CODE> option, and the normal behavior has been changed for the debugger to not recover.<br />
247        </dd>
248        <dt>2011/12/19</dt>
249<dd> Added functionality to pass program arguments to CTR applications.<br />
250        </dd>
251        <dt>2011/01/28</dt>
252<dd> Added that multiple executables cannot be used with a single debugger. <br />
253        </dd>
254        <dt>2010/11/23</dt>
255<dd>Changed the location of the document.<br />
256        </dd>
257        <dt>2010/10/25</dt>
258<dd>Initial version.<br />
259        </dd>
260      </dl>
261    </div>
262  <hr><p>CONFIDENTIAL</p></body>
263</html>