- IAR Embedded Workbench for RH850 3.20.x
- C-SPY Debugging
- The C-SPY command line utility—cspybat
- Using C-SPY in batch mode
Using C-SPY in batch mode
You can execute C-SPY in batch mode if you use the command line utility cspybat, installed in the directory common\bin.
Starting cspybat
To start
cspybatyou must first create a batch file. An easy way to do that is to use one of the batch files that C-SPY automatically generates when you start C-SPY in the IDE.C-SPY generates a batch file
projectname.buildconfiguration.cspy.batevery time C-SPY is initialized. In addition, two more files are generated:project.buildconfiguration.general.xcl, which contains options specific tocspybatproject.buildconfiguration.driver.xcl, which contains options specific to the C-SPY driver you are using
You can find the files in the directory
$PROJ_DIR$\settings. The files contain the same settings as the IDE, and provide hints about additional options that you can use.To start
cspybat, you can use this command line:project.cspybat.bat [debugfile]Note that
debugfileis optional. You can specify it if you want to use a different debug file than the one that is used in theproject.buildconfiguration.general.xclfile.
Output
When you run cspybat, these types of output can be produced:
Terminal output from cspybat itself
All such terminal output is directed to
stderr. Note that if you runcspybatfrom the command line without any arguments, thecspybatversion number and all available options including brief descriptions are directed tostdoutand displayed on your screen.Terminal output from the application you are debugging
All such terminal output is directed to
stdout, provided that you have used the‑‑pluginoption. See ‑‑plugin.Error return codes
cspybatreturns status information to the host operating system that can be tested in a batch file. For successful, the valueint0is returned, and for unsuccessful the valueint1is returned.
Invocation syntax
The invocation syntax for cspybat is:
cspybatprocessor_DLLdriver_DLLdebug_file[cspybat_options]‑‑backenddriver_options
Note
In those cases where a filename is required you are recommended to give a full path to the filename. For the DLL files it is mandatory.
Parameters
The parameters are:
Parameter | Description |
|---|---|
| The path to the processor-specific DLL file—available in |
| The path to the C-SPY driver DLL file—available in |
| The object file that you want to debug (filename extension |
| The command line options that you want to pass to |
| Marks the beginning of the parameters to the C-SPY driver; all options that follow will be sent to the driver. Note that this option is mandatory. |
| The command line options that you want to pass to the C-SPY driver. Note that some of these options are mandatory and some are optional. For information about each option, see Reference information on C-SPY command line options. |