mips: Forced to running state to enable (subsequent) target halt.
authorDrasko DRASKOVIC <drasko.draskovic@gmail.com>
Mon, 12 Mar 2012 21:10:24 +0000 (22:10 +0100)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 14 Mar 2012 20:31:04 +0000 (20:31 +0000)
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>
src/target/mips_m4k.c

index 623d55e0d8360e9dcabc25cf010324f8f34ae1a4..c64d5cf6093c35d67416714c3f225dee755dcc73 100644 (file)
@@ -143,6 +143,17 @@ static int mips_m4k_poll(struct target *target)
 
        /* check for processor halted */
        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)) {
                        mips_ejtag_set_instr(ejtag_info, EJTAG_INST_NORMALBOOT);
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)