- fix cross endian ELF loading
[openocd.git] / src / target / target.c
index feddc1c0fe7b726edffc85ba52b510fa4b7e245e..baf57565cc9988e06dec1ec84aba9689e36c0e8d 100644 (file)
@@ -122,7 +122,7 @@ char *target_debug_reason_strings[] =
 {
        "debug request", "breakpoint", "watchpoint",
        "watchpoint and breakpoint", "single step",
-       "target not halted"
+       "target not halted", "undefined"
 };
 
 char *target_endianess_strings[] =
@@ -362,7 +362,9 @@ int target_process_reset(struct command_context_s *cmd_ctx)
                                                command_print(cmd_ctx, "Timed out waiting for reset");
                                                goto done;
                                        }
-                                       usleep(100*1000); /* Do not eat all cpu */
+                                       /* this will send alive messages on e.g. GDB remote protocol. */
+                                       usleep(500*1000); 
+                                       USER_N("%s", ""); /* avoid warning about zero length formatting message*/ 
                                        goto again;
                                }
                        }
@@ -1178,6 +1180,7 @@ int handle_target_command(struct command_context_s *cmd_ctx, char *cmd, char **a
                                (*last_target_p)->backup_working_area = 0;
                                
                                (*last_target_p)->state = TARGET_UNKNOWN;
+                               (*last_target_p)->debug_reason = DBG_REASON_UNDEFINED;
                                (*last_target_p)->reg_cache = NULL;
                                (*last_target_p)->breakpoints = NULL;
                                (*last_target_p)->watchpoints = NULL;
@@ -1577,24 +1580,11 @@ int handle_halt_command(struct command_context_s *cmd_ctx, char *cmd, char **arg
        target_t *target = get_current_target(cmd_ctx);
 
        DEBUG("-");
-       
-       command_print(cmd_ctx, "requesting target halt...");
 
        if ((retval = target->type->halt(target)) != ERROR_OK)
-       {       
-               switch (retval)
                {
-                       case ERROR_TARGET_ALREADY_HALTED:
-                               command_print(cmd_ctx, "target already halted");
-                               break;
-                       case ERROR_TARGET_TIMEOUT:
-                               command_print(cmd_ctx, "target timed out... shutting down");
-                               return retval;
-                       default:
-                               command_print(cmd_ctx, "unknown error... shutting down");
                                return retval;
                }
-       }
        
        return handle_wait_halt_command(cmd_ctx, cmd, args, argc);
 }
@@ -1711,8 +1701,6 @@ int handle_resume_command(struct command_context_s *cmd_ctx, char *cmd, char **a
 
        target_process_events(cmd_ctx);
        
-       target_arch_state(target);
-       
        return retval;
 }
 

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)