openocd: halt cortex-m3 after reboot

As we want to use the cortex-m3 only for memory access, it should
always be halted. To achieve this, we need to halt it after every
reboot.

Change-Id: I5f0edf4986b65aea5a2aa59020247b9676de4dcb
This commit is contained in:
Lars Rademacher
2013-11-25 23:18:52 +01:00
parent 14cd9346ec
commit e4ba517251

View File

@ -905,6 +905,16 @@ void oocdw_reboot()
* not use any register values, which could be set in the loop
*/
oocdw_write_reg(15, sym_SafetyLoopEnd);
/*
* as we want to use the Cortex-M3 for access to ram, it should
* always be halted, so halt it after reset.
*/
if (target_m3->state != TARGET_HALTED) {
if (!oocdw_halt_target(target_m3)) {
exit(-1);
}
}
}
// Initially set BP for generic traps