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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,901 Views
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
Labels (1)
Tags (1)
0 Kudos
1 Solution
545 Views
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

View solution in original post

0 Kudos
3 Replies
545 Views
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
545 Views
BrianW
Contributor I
That worked.
Thanks,
Brian
0 Kudos
546 Views
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 Kudos