Renesas Technology, Tools FAQs
Last Updated: March 20, 2001
Document Number: 01050880_e
Q.
With PD38, can I detect when the stack overflows during the program execution?
A.
Using the following method, you can make a break occur when the stack overflows.
How to detect an overflow before the stack damages the area used as the RAM:
Specify a "write protect attribute" in the PD38 protect window for the "end address -1h of the stack area (lowest address in the
stack area)".
1.
Turn the protect break 'ON' by pushing the 'Mode' button in the protect window, and execute the target program.2.
The target program will stop when a write occurs corresponding to the address specified as "write protect attribute".3.
Note: In this case, the contents of the memory specified as "write protect attribute" may be damaged due to this operation.
How to detect a stack overflow:
You can stop the target program when a stack overflow occurs by setting a state transition break.
Set the break point state
Use points A1, A2 and A3.
A1: write to 100h
A2: read from 100h
A3: write to 1FFh
1.
Set the conditions
Select the state transition. The state transition configuration will then be displayed.
2.
Set the state transition configuration
Set A1 as the [Start ---> State 1] event
Set A3 as the [State1 ---> Break] event
Set A2 as the [State1 ---> Start] event
3.
Top of Page | Back to Previous Page
Terms of Use Privacy Policy
(C)2004 Renesas Technology Corp., All Rights Reserved.
Kommentare zu diesen Handbüchern