mips: Forced to running state to enable (subsequent) target halt.
Change-Id: I9aff8fb3ac703b50194088dd4e68cec8f9bb2ada Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com> Reviewed-on: http://openocd.zylin.com/513 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
35e7377160
commit
8e198e9471
|
@ -143,6 +143,17 @@ static int mips_m4k_poll(struct target *target)
|
||||||
|
|
||||||
/* check for processor halted */
|
/* check for processor halted */
|
||||||
if (ejtag_ctrl & EJTAG_CTRL_BRKST) {
|
if (ejtag_ctrl & EJTAG_CTRL_BRKST) {
|
||||||
|
if (target->state == TARGET_UNKNOWN) {
|
||||||
|
LOG_DEBUG("EJTAG_CTRL_BRKST already set during server startup.");
|
||||||
|
|
||||||
|
/* OpenOCD was was probably started on the board with EJTAG_CTRL_BRKST already set
|
||||||
|
* (maybe put on by HALT-ing the board in the previous session).
|
||||||
|
*
|
||||||
|
* Force target to RUNNING state to enable debug entry for this session.
|
||||||
|
*/
|
||||||
|
target->state = TARGET_RUNNING;
|
||||||
|
}
|
||||||
|
|
||||||
if ((target->state == TARGET_RUNNING) || (target->state == TARGET_RESET)) {
|
if ((target->state == TARGET_RUNNING) || (target->state == TARGET_RESET)) {
|
||||||
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT);
|
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue