User manual

Simulator features UM0036
202/385 Doc ID 7705 Rev 11
6 Simulator features
In addition to debugging with emulation hardware and in-circuit debugging devices, STVD
also allows you to debug your application while it runs on a software simulation of your
target microcontroller. The Simulator is part of STVD and requires no additional emulation or
in-circuit debugging hardware.
Once you have set your debug instrument to Simulator and entered the debug context
(Debug>Start Debugging), the Debug Instrument and View menus change to display the
commands that are specific to the Simulator.
This section explains how to use the debugging features that are specific to the STVD
Simulator:
Section 6.1: Using the stack control features
Section 6.2: Using the input pin stimulator
Section 6.3: Using the simulation plotter
Section 6.4: Using read/write on-the-fly
Section 6.5: Forcing interrupts
6.1 Using the stack control features
The Stack Control window allows you to set a specific stack address as the stack overflow
point. This means that if, during the course of debugging, the current stack pointer (SP)
value is exceeded, the application will be halted (provided that you check the Enable stop
box in the Stack Control window).
Figure 150. Stack control window
This effectively allows you to specify a breakpoint at the SP address level.
To set the stack control:
1. Open the Stack Control window by clicking on (the Stack Control window icon) on
the Tools toolbar, or by selecting, Tools>Stack Control...from the main menu.
2. To enable a break in the running of the application when the specified conditions are
met, check the Enable stop box.
3. Type the overflow address in the SP Overflow field.