CW4.6: 9S12XDP512: debug break point problems with XGATE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CW4.6: 9S12XDP512: debug break point problems with XGATE

跳至解决方案
1,747 次查看
paulcsf
Contributor II
We are using a 9S12XDP512, and have C code doing the initialization, transferring execution to old assembly code that is in the process of being converted. We are using the XGATE.

When we step through the code, the XGATE control register is left alone from it's initial value (0x0000).

When we set a break point, the debugger sets the XGDBG bit, setting the XGMCTL register to a minimum of 0x0020.

On resume of code execution, this debug bit is not cleared, and our old assembly code doesn't touch XGMCTL again after initialization. So the XGATE stays in debug mode, freezing it's execution.

Is there a way to have the debugger restore XGMCTL to it's previous state before the break point?

Thanks, Paul.
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
859 次查看
paulcsf
Contributor II
Well, we found it.

We were initializing the XGATE with XGMCTL=0x8383, which has the wrong state for BDM freeze operation.

The fix was to initialize the XGATE with XGMCTL=0xC3C3, causing the XGATE to freeze in DBM debug mode.


在原帖中查看解决方案

0 项奖励
回复
1 回复
860 次查看
paulcsf
Contributor II
Well, we found it.

We were initializing the XGATE with XGMCTL=0x8383, which has the wrong state for BDM freeze operation.

The fix was to initialize the XGATE with XGMCTL=0xC3C3, causing the XGATE to freeze in DBM debug mode.


0 项奖励
回复