single step into an interrupt routine

Is there a way to prevent the debugger from single stepping into an interrupt routine. To disable interrupts help but it is awkward.

Parents
  • I can suggest you a "partial" solution, if the problem you are speaking of is regarding a cyclic interrupt such as a Timer Interrupt.
    We had this problem in the past: Mon51 was continuously interrupted by the Timer during debug, since Timer was running even if program was halted due to a breakpoint.
    After every step we continued to run into Timer Interrupt routine.
    We found a solution by means of the two Mon51 hooks called AFTER_GO and BEFORE_GO.
    If you look in INSTALL.A51, the Mon51 configuration file, you will find two declarations

    PUBLIC  BEFORE_GO       ; DO SOME THINGS BEFORE STARTING USER PROGRAM
    PUBLIC  AFTER_GO        ; DO SOME THINGS AFTER TERMINATION OF USER PROGRAM
    

    BEFORE_GO is called by the monitor every time it passes control to your program
    AFTER_GO is called every time your program passes control back to Mon51, i.e. during a Breakpoint or during Single Step.
    You can customize the two functions at your need, maybe stopping the timer when you reach a breakpoint, by means of AFTER_GO, and then restoring the original status with BEFORE_GO when your program restarts.
    By using the two functions you can completely "freeze" your microcontroller during the debug inspection phase, letting Mon51 behave almost like a real emulator.

Reply
  • I can suggest you a "partial" solution, if the problem you are speaking of is regarding a cyclic interrupt such as a Timer Interrupt.
    We had this problem in the past: Mon51 was continuously interrupted by the Timer during debug, since Timer was running even if program was halted due to a breakpoint.
    After every step we continued to run into Timer Interrupt routine.
    We found a solution by means of the two Mon51 hooks called AFTER_GO and BEFORE_GO.
    If you look in INSTALL.A51, the Mon51 configuration file, you will find two declarations

    PUBLIC  BEFORE_GO       ; DO SOME THINGS BEFORE STARTING USER PROGRAM
    PUBLIC  AFTER_GO        ; DO SOME THINGS AFTER TERMINATION OF USER PROGRAM
    

    BEFORE_GO is called by the monitor every time it passes control to your program
    AFTER_GO is called every time your program passes control back to Mon51, i.e. during a Breakpoint or during Single Step.
    You can customize the two functions at your need, maybe stopping the timer when you reach a breakpoint, by means of AFTER_GO, and then restoring the original status with BEFORE_GO when your program restarts.
    By using the two functions you can completely "freeze" your microcontroller during the debug inspection phase, letting Mon51 behave almost like a real emulator.

Children
More questions in this forum