程序Debug时进入子函数,控制台显示访问0x44xxxxxx地址时出错。仔细一看,原来是子函数的局部变量存储在这个0x44xxxxxx地址。查了datasheet,0x40000000是hyperlink的地址空间,程序中根本没用到hyperlink。局部变量怎么会存储在这个地址呢?查了cmd,也没涉及hyperlink地址空间的声明呀。
ZhengTian Wang:
控制台显示内容如下
C66xx_0: Trouble Reading Memory Block at 0x445c3a44 on Page 0 of Length 0x1: (Error -1202 @ 0x445C3A44)
Device core is hung. The debugger will attempt to force the device to a ready state to recover debug control. Your application's state will be corrupt. You should have limited access to memory and registers, but you may need to reset the device to debug further. (Emulation package 5.0.747.0) C66xx_0: 39 other operation(s) were automatically canceled as a result
King Wang1:
函数的局部变量(除去malloc申请的和static类型)都放在stack中, 从你的现象来看要么就是stack溢出,或者是stack被改写。仔细查查吧!
TI中文支持网

