cortex_m: Fix single stepping will not return to debug mode sometimes
authorPeter Horn <peter.horn@bluewin.ch>
Mon, 8 Oct 2012 20:06:07 +0000 (22:06 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Tue, 6 Nov 2012 16:26:54 +0000 (16:26 +0000)
commit79fa75e199ae7cafe0be9d71d7246464da34015e
tree18dc3d089ddc250bc04dc4cfd1b1a36e7ca7bbb9
parented3632d9c7b89ef2934d48806ada7b2b5ee54a42
cortex_m: Fix single stepping will not return to debug mode sometimes

This occurs when stepping past a breakpoint on a even address with
maskisr option set to auto

With -d3 the following log message appears in this case:

"Debug : Interrupt handlers didn't complete within time,
 leaving target running"

Cause : Given a breakpoint is set on the lower half word and the PC is on
the upper half word. When another breakpoint is now set on the current PC
then resuming the core will not result in a break on the newly set
breakpoint. This has been observed on a STM32F1x, STM32F2x (CM3) but not
on a STM32F0x (CM0). It's not clear if this is a STM32F1/F2 only or a
general CM3 problem.

Change-Id: I384813f3bfdf935373b5e23cdb2d7f243c70cc00
Signed-off-by: Peter Horn <peter.horn@bluewin.ch>
Reviewed-on: http://openocd.zylin.com/864
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/cortex_m.c