Unable to step through C source with debugger, keep getting into interrupt handler.

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

Unable to step through C source with debugger, keep getting into interrupt handler.

跳至解决方案
2,829 次查看
BrianW
Contributor I
Hello,
I am new to code warrior and to the HCS12, and are learning the debugger.  When I stop at a break point and want to step to next line of C-source, instead of going to the next line I get put into another function that is an interrupt handler.  I have tried all the different step buttons, but to no avail.  How should I handle this?
Thanks,
Brian
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,473 次查看
mke_et
Contributor IV
Talk about missing the obvious! I think it's been FOUR YEARS now I just clicked on the interrupt bit to disable interrupts when I was debugging! That works too, but then if you forget to disable ints, now you have to do it again. Or forget to turn them back on when you're done debugging what you're in on. Or even single stepping through code that disables and enables ints...

ARRGGHH!!!!

Mike

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,473 次查看
CrasyCat
Specialist III
Hello
 
I assume you are debugging on a hardware board with a Multilink or Cyclone PRO cable.
 
Per default when you are stepping the debugger will stop at the next instruction executed. If an interrupt arises, it will stop inside of the interrupt function.
 
You can disable that behavior in the following way:
  - Start the debugger the usual way
  - Select "Multilink/CyclonePro" -> "Connect". The Connection dialog is opened.
  - Switch to the "Special Setup" tab
  - Check the box "Disable maskable ISR's when stepping"
  - Click OK to close the dialog.
 
Now PC should not enter interrupt function when you are stepping.
Only non-maskable interrupts might interrupt the execution.
 
I hope this helps.
 
CrasyCat
1,473 次查看
BrianW
Contributor I
That worked.
Thanks,
Brian
0 项奖励
回复
1,474 次查看
mke_et
Contributor IV
Talk about missing the obvious! I think it's been FOUR YEARS now I just clicked on the interrupt bit to disable interrupts when I was debugging! That works too, but then if you forget to disable ints, now you have to do it again. Or forget to turn them back on when you're done debugging what you're in on. Or even single stepping through code that disables and enables ints...

ARRGGHH!!!!

Mike
0 项奖励
回复