大家好,
希望在PSoC 4 CY8C4245LQI-43中检测栈溢出。
我试过这个:
1初始化堆栈指针到最后一排的SRAM(我发现SRAM的地址范围从0x20000000到0x20000fff在psoc4建筑技术。堆栈在上部SRAM中。
CHAR*STATKPTR =(CHAR *)0x2000 FFF。
2——赋予它一个价值:
*STACKPTR=0xAA;
3 -在执行期间,检查其值的变化:
如果(*STACKPTR!= 0xAA)
{
FraveStaskIppOrth=真;
}
它不起作用。
不幸的是我不能使用调试模式由于采用Flash 90以上%和调试超过现有的Flash。
谢谢你的帮助!
以上来自于百度翻译
以下为原文
Hi everyone,
I wish detect the stack overflow in psoc 4 CY8C4245LQI-483.
I tried this :
1- ini
tialize 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!