ctr_loadrun

Description

The ctr_loadrun 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.

Limitations

The following limitations apply when using ctr_loadrun.

Program Arguments Passed to CTR Applications

ctr_loadrun 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.

The arguments that can be passed using the -a and -args options can be obtained from interfaces such as nn::dbg::CTR::GetArgc and nn::dbg::CTR::GetArgv. File data to be passed with the -ba option can be obtained from nn::dbg::CTR::GetArgBinary.

The 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 ctr_loadrun must be smaller than that.

How to Use

Format

 $ ctr_loadrun32.exe [CciFile] [options...] 

Options

Options ArgumentsDescription
-h (--help) Displays help.
-l (--devicelist) Displays the connected devices.
-t (--timeout) TIMEOUT-SECONDS Sets the timeout from startup to exit.
-e (--exit-pattern) EXIT-PATTERN Exits upon output of a string that matches the regular expression specified by EXIT-PATTERN.
The regular expression syntax conforms with the .NET Framework's System.Text.RegularExpressions namespace.
-c (--command) COMMAND Specifies the command to run before loading the image file.
-m (--macro) MACROFILE Specifies the macro file to run before loading the image file.
-d (--device) SERIALNUMBER Specifies which device to use by its serial number.
-nw (--no-wait) Exits loadrun when it is confirmed that all commands have been sent.
-ns (--no-start) Normally the G command, which runs the program, is sent after the program has been loaded.
With this option, the G command is not sent.
-a (--argument) ARGUMENT-STRING Sets one argument to be passed to the CTR application. Can be specified multiple times.
-ba (--binary-argument) ARGUMENT-FILE Sets a file to be passed as data to the CTR application.
-args (--arguments) ARGUMENTS ... Of the program arguments passed to loadrum, this option sets all subsequent parameters as those to be passed to the CTR application.
--systray Hides the debugger in the system tray when the debugger launches.
--exit-debugger Exits the debugger when ctr_loadrun terminates, for example when the termination string pattern appears or when there is a timeout.

Location

 $CTRSDK_ROOT/tools/ComandlineTools/ctr_loadrun32.exe 

Revision History

2011/12/29
The feature for hiding the debugger in the system tray when it launches has been changed to the --systray option, and the normal behavior has been changed for the debugger to launch in a displayed window.
The feature for exiting the debugger when ctr_loadrun32 terminates has been changed to the --exit-debugger option, and the normal behavior has been changed for the debugger to not recover.
2011/12/19
Added functionality to pass program arguments to CTR applications.
2011/01/28
Added that multiple executables cannot be used with a single debugger.
2010/11/23
Changed the location of the document.
2010/10/25
Initial version.

CONFIDENTIAL