Command line debugging with cspybat.exe
Technical Note 26068
11/6/2015 10:51 AM
In some cases, downloading and debugging the application with cspybat.exe fails, even though it works to download and debug the application from inside IAR Embedded Workbench.
Reason for the issue
Something differs between the settings in the cspy.bat file and the settings in the IDE.
To create a correct contents in the cspy.bat file(s), make sure to do the following:
- Delete all *.bat file(s) in <project directory>\settings.
- From inside the IDE, build and debug the application.
- Go to <project directory>\settings and have a look at the generated file <project>.cspy.bat.
Note that some versions of IAR Embedded Workbench generates a cspy.bat file that needs some editing, please check the comments in the file. Also note that some versions of IAR Embedded Workbench generates <project>.driver.xcl, and <project>.general.xcl files, that contain the command line options.
- In a command prompt, go to <project directory>\settings and do:
<project>.cspy.bat <path to output file>For a "GettingStarted" project in IAR Embedded Workbench for ARM, the syntax is:
GettingStarted.cspy.bat "..\Flash Debug\Exe\GettingStarted.out"
CSpybat is documented in IAR Embedded Workbench manuals. Depending on the version, the location is:
- Help -> Embedded Workbench Debugging Guide, or Embedded Workbench User Guide, chapter 'The C-SPY Command Line Utility—cspybat'.
- In another pdf file provided with the installation.
- In the html files provided with the installation.
All product names are trademarks or registered trademarks of their respective owners.