Single Step STMF7

Sysprogs forums Forums VisualGDB Single Step STMF7

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10794
    soldy
    Participant

    There is an issue with ARM M7 core based processor at least with the STM32F746 MCU which I’m using on  the discovery board with 4.3″ LCD and on a WaveShare board and 10″ LCD. Each time after you hit a breakpoint and trying to do a single step you will automatically go into the tick timer interrupt. So when you want to debug you have to remove your break point place it on where it should pass and run the program again, this is not very productive.

    I would like to know if something can be done, like automatically disabling the global interrupts before calling the debugger and re-enabling it if interrupts was enabled before disabling it when returning in run mode? Can VisualGDB run a specific firmware function before calling GDB and another before returning to run mode when in debug mode?

    Thanks

    #10796
    support
    Keymaster

    Sorry about that, it’s a known limitation of ST-Link. This happens because one ST-Link tries to execute a single instruction when stepping over the code, an interrupt arrives and your board starts handling it.

    As a workaround, please consider setting the $primask register to 1 via the Watch window during stepping.

    This will temporarily disable interrupts. Please do not forget to set it back to 0 once you are done stepping, as otherwise the interrupts won’t be re-enabled.

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