Debugging impossible when timer interrupts are enabled

Sysprogs forums Forums VisualGDB Debugging impossible when timer interrupts are enabled

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7214
    andyjt
    Participant

    Hi,

    Is there trick to stop the debugger from stepping into the Timer Interrupt handler all the time ?

    I’m finding it impossible to trace through code, you hit a breakpoint press F10 to step over and it jumps straight to the interrupt handler, eg:

    void TIM3_IRQHandler(void)

    {

    HAL_TIM_IRQHandler(&TimHandle);

    }

     

    So you then end up just stepping through this same bit of code (unless you can hit F10 quicker than your timer!)

     

    #7219
    support
    Keymaster

    Hi,

    You can try using the OpenOCD’s “cortex_m maskisr” command to disable interrupts during stepping as described here: http://openocd.org/doc/html/GDB-and-OpenOCD.html

    However this will not work when using high-level debug adapters like ST-Link.

    #9565
    percy
    Participant

    Please can you describe how  “cortex_m maskisr” command is disabled in visualGDB. I’m having the same issue as andyjt described above, debugging time interrupts on my stm32f746g discovery

    #9575
    support
    Keymaster

    Hi,

    You could run the “mon cortex_m maskisr on” command in the GDB Session window to automatically disable interrupts during stepping.

    However this would only work for low-level JTAG adapters (i.e. won’t work with ST-Link). If you are using ST-Link, we would recommend setting the PRIMASK register to disable the interrupts manually while you are stepping through the critical parts of code.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.