Thomas Kindler pisze:
> Hi!
> 
> When single stepping on a STM32, I'm constantly caught in interrupt 
> handler code.  This makes debugging almost impossible for non-trivial 
> programs with timer and other peripheral interrupts.
> 
> I have seen that there's an "cortex_m3 maskisr on/off" command, but it's 
> awkward to use from eclipse.  There seems to be no way to issue monitor 
> commands to OpenOCD during a debug session, or even bind commands to a 
> GUI button (perhaps a nice feature for Zylin-CDT?).
> 
> Is there a good way to tell OpenOCD to mask ISRs after hitting a 
> breakpoint/single-stepping, but re-enable interrupts on run?

That's not your problem.

On STM32 when the core is halted (whatever was the reason) some 
peripherals (including timers) continue to operate normally. This is a 
good thing - imagine writing a software for SMSP and no possibility to 
halt the chip - you'd have 50% chance of frying the coil and the switch 
when the PWM would stop working. That's why when you stop your program 
some peripherals keep working and keep sending interrupt signals, making 
single stepping virtually impossible.

To "solve this" you can really stop the timer and some other peripherals 
when the core is stopped (if your hardware allows to do that) - take a 
look at the DBGMCU->CR register.

4\/3!!
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to