- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone,
I wish detect the stack overflow in psoc 4 CY8C4245LQI-483.
I tried this :
1- initialize a stack pointer to the last row of SRAM (i found SRAM address range from 0x20000000 to 0x20000FFF in PSOC4 architecture TRM. The stack is in upper SRAM).
char* stackPtr = (char*) 0x20000FFF.
2- give it a value:
*stackPtr = 0xAA;
3- during execution, check for changing its value:
if(*stackPtr != 0xAA)
{
flag_stack_overflow = true;
}
It does not working.
Unfortunately I cannot use the debug mode because the used flash is over the 90% and the debug exceeds the available flash.
Thanks for your help!
Solved! Go to Solution.
- Tags:
- stack overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You still can debug your project, even when compiled as release. When you stop execution you may look at the memory in the debugger. You can fill the memory manually with fixed values and check how much gets altered after a while.
<furthermore to help debugging is: You may set the optimization level on a file basis. So you can allow the debugging for a single file only.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You still can debug your project, even when compiled as release. When you stop execution you may look at the memory in the debugger. You can fill the memory manually with fixed values and check how much gets altered after a while.
<furthermore to help debugging is: You may set the optimization level on a file basis. So you can allow the debugging for a single file only.
Bob