- added str912 test example, and test result
[openocd.git] / src / target / target.c
index 27df12fc33f42d34466c6f5ea6ad300ce90f822a..377bb0dc07dbd9f9c9ea4dd19cdc8787778fd46d 100644 (file)
@@ -88,6 +88,7 @@ extern target_type_t arm926ejs_target;
 extern target_type_t feroceon_target;
 extern target_type_t xscale_target;
 extern target_type_t cortexm3_target;
+extern target_type_t arm11_target;
 
 target_type_t *target_types[] =
 {
@@ -100,6 +101,7 @@ target_type_t *target_types[] =
        &feroceon_target,
        &xscale_target,
        &cortexm3_target,
+       &arm11_target,
        NULL,
 };
 
@@ -227,7 +229,7 @@ int target_init_handler(struct target_s *target, enum target_event event, void *
        {
                target_unregister_event_callback(target_init_handler, priv);
 
-               script = open_file_from_path(cmd_ctx, target->reset_script, "r");
+               script = open_file_from_path(target->reset_script, "r");
                if (!script)
                {
                        ERROR("couldn't open script file %s", target->reset_script);
@@ -268,11 +270,11 @@ int target_process_reset(struct command_context_s *cmd_ctx)
                        switch (target->reset_mode)
                        {
                                case RESET_HALT:
-                                       command_print(cmd_ctx, "nSRST pulls nTRST, falling back to RESET_RUN_AND_HALT");
+                                       command_print(cmd_ctx, "nSRST pulls nTRST, falling back to \"reset run_and_halt\"");
                                        target->reset_mode = RESET_RUN_AND_HALT;
                                        break;
                                case RESET_INIT:
-                                       command_print(cmd_ctx, "nSRST pulls nTRST, falling back to RESET_RUN_AND_INIT");
+                                       command_print(cmd_ctx, "nSRST pulls nTRST, falling back to \"reset run_and_init\"");
                                        target->reset_mode = RESET_RUN_AND_INIT;
                                        break;
                                default:
@@ -1538,7 +1540,7 @@ static int wait_state(struct command_context_s *cmd_ctx, char *cmd, enum target_
 {
        int retval;
        struct timeval timeout, now;
-       
+       int once=1;
        gettimeofday(&timeout, NULL);
        timeval_add_time(&timeout, 0, ms * 1000);
        
@@ -1552,12 +1554,15 @@ static int wait_state(struct command_context_s *cmd_ctx, char *cmd, enum target_
                {
                        break;
                }
-               command_print(cmd_ctx, "waiting for target %s...", target_state_strings[state]);
+               if (once)
+               {
+                       once=0;
+                       command_print(cmd_ctx, "waiting for target %s...", target_state_strings[state]);
+               }
                
                gettimeofday(&now, NULL);
                if ((now.tv_sec > timeout.tv_sec) || ((now.tv_sec == timeout.tv_sec) && (now.tv_usec >= timeout.tv_usec)))
                {
-                       command_print(cmd_ctx, "timed out while waiting for target %s", target_state_strings[state]);
                        ERROR("timed out while waiting for target %s", target_state_strings[state]);
                        break;
                }
@@ -1572,24 +1577,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);
 }
@@ -1913,7 +1905,6 @@ int handle_load_image_command(struct command_context_s *cmd_ctx, char *cmd, char
        
        if (image_open(&image, args[0], (argc >= 3) ? args[2] : NULL) != ERROR_OK)
        {
-               command_print(cmd_ctx, "load_image error: %s", image.error_str);
                return ERROR_OK;
        }
        
@@ -1983,7 +1974,6 @@ int handle_dump_image_command(struct command_context_s *cmd_ctx, char *cmd, char
        
        if (fileio_open(&fileio, args[0], FILEIO_WRITE, FILEIO_BINARY) != ERROR_OK)
        {
-               command_print(cmd_ctx, "dump_image error: %s", fileio.error_str);
                return ERROR_OK;
        }
        
@@ -2062,7 +2052,6 @@ int handle_verify_image_command(struct command_context_s *cmd_ctx, char *cmd, ch
 
        if (image_open(&image, args[0], (argc == 3) ? args[2] : NULL) != ERROR_OK)
        {
-               command_print(cmd_ctx, "verify_image error: %s", image.error_str);
                return ERROR_OK;
        }
        

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)