command: print BUG warning when usage is missing
[openocd.git] / src / target / target.c
index bcd00a1fbe9959224c624ab24c614cf110803383..7763685db7548e9e4c5c3507d767e33bd6e4db09 100644 (file)
@@ -84,6 +84,7 @@ extern struct target_type dsp563xx_target;
 extern struct target_type dsp5680xx_target;
 extern struct target_type testee_target;
 extern struct target_type avr32_ap7k_target;
+extern struct target_type stm32_stlink_target;
 
 static struct target_type *target_types[] =
 {
@@ -107,6 +108,7 @@ static struct target_type *target_types[] =
        &dsp5680xx_target,
        &testee_target,
        &avr32_ap7k_target,
+       &stm32_stlink_target,
        NULL,
 };
 
@@ -940,6 +942,8 @@ static int target_init_one(struct command_context *cmd_ctx,
        if (type->check_reset== NULL)
                type->check_reset = default_check_reset;
 
+       assert(type->init_target != NULL);
+
        int retval = type->init_target(cmd_ctx, target);
        if (ERROR_OK != retval)
        {
@@ -5530,11 +5534,13 @@ static const struct command_registration target_exec_command_handlers[] = {
                .mode = COMMAND_EXEC,
                .help = "loads active fast load image to current target "
                        "- mainly for profiling purposes",
+               .usage = "",
        },
        {
                .name = "profile",
                .handler = handle_profile_command,
                .mode = COMMAND_EXEC,
+               .usage = "seconds filename",
                .help = "profiling samples the CPU PC",
        },
        /** @todo don't register virt2phys() unless target supports it */
@@ -5595,6 +5601,7 @@ static const struct command_registration target_exec_command_handlers[] = {
                .name = "soft_reset_halt",
                .handler = handle_soft_reset_halt_command,
                .mode = COMMAND_EXEC,
+               .usage = "",
                .help = "halt the target and do a soft reset",
        },
        {
@@ -5651,7 +5658,7 @@ static const struct command_registration target_exec_command_handlers[] = {
                .handler = handle_bp_command,
                .mode = COMMAND_EXEC,
                .help = "list or set hardware or software breakpoint",
-               .usage = "usage: bp <address> [<asid>]<length> ['hw'|'hw_ctx']",
+               .usage = "<address> [<asid>]<length> ['hw'|'hw_ctx']",
        },
        {
                .name = "rbp",

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)