ARM: add comments re DAP assumptions
[openocd.git] / src / target / target.c
index a9f4dd87462356087bb64047f042af4bccc40111..73a762d4990a82df9a3cd619385ab48f461989da 100644 (file)
 #include "config.h"
 #endif
 
+#include <helper/time_support.h>
+#include <jtag/jtag.h>
+
 #include "target.h"
 #include "target_type.h"
 #include "target_request.h"
 #include "breakpoints.h"
-#include <helper/time_support.h>
 #include "register.h"
 #include "trace.h"
 #include "image.h"
-#include <jtag/jtag.h>
 
 
 static int target_array2mem(Jim_Interp *interp, struct target *target, int argc, Jim_Obj *const *argv);
@@ -63,6 +64,7 @@ extern struct target_type cortexa8_target;
 extern struct target_type arm11_target;
 extern struct target_type mips_m4k_target;
 extern struct target_type avr_target;
+extern struct target_type dsp563xx_target;
 extern struct target_type testee_target;
 
 struct target_type *target_types[] =
@@ -82,6 +84,7 @@ struct target_type *target_types[] =
        &arm11_target,
        &mips_m4k_target,
        &avr_target,
+       &dsp563xx_target,
        &testee_target,
        NULL,
 };
@@ -2154,8 +2157,9 @@ static void handle_md_output(struct command_context *cmd_ctx,
        case 2: value_fmt = "%4.2x "; break;
        case 1: value_fmt = "%2.2x "; break;
        default:
+               /* "can't happen", caller checked */
                LOG_ERROR("invalid memory read size: %u", size);
-               exit(-1);
+               return;
        }
 
        for (unsigned i = 0; i < count; i++)
@@ -2484,7 +2488,7 @@ COMMAND_HANDLER(handle_dump_image_command)
        if ((ERROR_OK == retval) && (duration_measure(&bench) == ERROR_OK))
        {
                command_print(CMD_CTX,
-                               "dumped %zu bytes in %fs (%0.3f kb/s)", fileio.size,
+                               "dumped %ld bytes in %fs (%0.3f kb/s)", (long)fileio.size,
                                duration_elapsed(&bench), duration_kbps(&bench, fileio.size));
        }
 
@@ -4075,6 +4079,11 @@ static int jim_target_reset(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
        struct target *target = Jim_CmdPrivData(goi.interp);
        if (!target->tap->enabled)
                return jim_target_tap_disabled(interp);
+       if (!(target_was_examined(target)))
+       {
+               LOG_ERROR("Target not examined yet");
+               return ERROR_TARGET_NOT_EXAMINED;
+       }
        if (!target->type->assert_reset || !target->type->deassert_reset)
        {
                Jim_SetResult_sprintf(interp,
@@ -4857,7 +4866,7 @@ static const struct command_registration target_exec_command_handlers[] = {
        {
                .name = "fast_load",
                .handler = &handle_fast_load_command,
-               .mode = COMMAND_ANY,
+               .mode = COMMAND_EXEC,
                .help = "loads active fast load image to current target "
                        "- mainly for profiling purposes",
        },

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)