The IAR C-Spy Simulator is not intended to simulate all hardware functions of the product. In particular, the following hardware properties are not simulated:
In some cases, C-SPY will misinterpret byte/word addressing of pointers, which causes C-SPY to display erroneous data in the Watch and Quick Watch windows.
No check is currently made for illegal instruction combinations.
Bit operations are always possible on registers in module M0 to M5 , even though a specific peripheral unit does not support bit operations.
When you use the memory map (Simulator>Memory Map), no access control is made on instruction fetch. Only data accesses are checked.
Usage:
cspybat <processor DLL filename> <driver DLL filename> <debug file>
{<general options>} --backend -B {<driver options>}
General command line options:
--cycles <cycles> |
Max cycles to run |
--macro <macrofile> |
Name of macro file |
--plugin <plugin file> |
Name of plugin dll file |
--backend <driver options> |
Options to be sent to the debugger driver (mandatory) |
Options available for all debugger drivers:
-B |
Enable batch mode (mandatory) |
-d [sim|jtag] |
Specifies debugger driver, for example -d sim |
-p <file> |
Specifies device description file (ddf) |
Example:
cspybat ..\..\maxq\bin\maxqproc.dll ..\..\maxq\bin\maxqsim.dll
..\..\maxq\tutor\debug\exe\project1.d66 --plugin ..\..\maxq\bin\maxqbat.dll
--backend -B -d sim
Positional mandatory parameters:
(Note: they must come before any other parameters)
--DBG |
Tag |
<toolchain> |
maxq |
<driver> |
Can be either a filename e.g. maxqsim.dll, or a full path. In the first case, the driver is located in $TOOLKIT_DIR$\bin. |
<debug file> |
UBROF file. If it is not a full path, the debug file directory should be the current working directory, or at least in the current path. |
Optional parameters:
--macro <filepath> |
Loads a macro file |
--plugin <filepath> |
Loads a plugin (but do not use this for the libsupport (terminal I/O) plugin which you normally specify on the CSpyBat command line. The proper libsupport plugin for the interactive debugger is loaded automatically) |
Backend parameters:
--backend |
{<driver options>} |
This section must begin with --backend, followed by all other backend parameters
up to the end of the command line.
Note: Do not pass the batch mode option -B when running in the IDE.
Sample complete command line:
IarIdePm.exe --DBG maxq maxqsim.dll D:\dev\test\Debug\Exe\foo.d66 --macro D:\dev\test\mymac.mac --backend -d sim
The IDE in some cases require absolute paths, If you find that supplementary files specified on the command line (such as macro files, ddf files, or other files) do not work without absolute paths, you can use environment variables or set the working directory properly if absolute paths are not desired.
How it works
When the IDE receives the command line parameters specified above, it does the following:
When the debug session is terminated, the IDE will ask you to save the project file and workspace file. You can safely answer no to those questions.
Note: If you stop a debug session and then modify the IDE project options, they will not take effect in the next debug session. As long as you remain in an IDE session launched with command line parameters, those parameters will take precedence.
Passing command line parameters to a debugged application
A rudimentary mechanism exists to pass command line parameters to a debugged application.
Use the /args option on the Extra Options page in the Debugger
category of the Project options dialog box.
Syntax:
/args arg0 arg1 ...
Multiple lines with /args are allowed. For example:
/args --logfile log.txt /args --verbose
In your application, the following variables must be defined. The variables will be initialized by the debugger at application start.
__no_init int __argc; __no_init const char* __argv[MAX_ARGS]; __no_init __root char __argvbuf[MAX_ARG_SIZE];
__argc |
The number of arguments in __argv |
__argv |
An array of pointer to strings holding the arguments. It must be large enough to fit the number of parameters |
__argvbuf |
Storage area for __argv, large enough to hold all command line parameters |
EW14850: In some cases, Step Over/Into can behave incorrectly. If a step command is given when the cursor is on the last source line of a function, sometimes the program does not stop when it reaches the caller of that function, but continues to the end of the program.
The MAXQ JTAG driver was updated to support MAXQ61x devices.
EW20713: Several issues related to interrupt simulation have been fixed.
No changes.
V1.13C