transport selection tweaks
[openocd.git] / src / jtag / transport.c
index cce45fb7a246fd144e03c563a84aefc9e579198f..d290bd2cff0168fc2059b7b14446c4c1c21b6341 100644 (file)
@@ -101,6 +101,10 @@ int allow_transports(struct command_context *ctx, const char **vector)
         *
         * REVISIT should we validate that?  and insist there's
         * at least one non-NULL element in that list?
+        *
+        * ... allow removals, e.g. external strapping prevents use
+        * of one transport; C code should be definitive about what
+        * can be used when all goes well.
         */
        if (allowed_transports != NULL || session) {
                LOG_ERROR("Can't modify the set of allowed transports.");
@@ -116,6 +120,8 @@ int allow_transports(struct command_context *ctx, const char **vector)
                                vector[0]);
                return transport_select(ctx, vector [0]);
        } else {
+               /* guard against user config errors */
+               LOG_WARNING("must select a transport.");
                while (*vector)
                        LOG_DEBUG("allow transport '%s'", *vector++);
                return ERROR_OK;
@@ -304,13 +310,14 @@ COMMAND_HANDLER(handle_transport_select)
        /* Is this transport supported by our debug adapter?
         * Example, "JTAG-only" means SWD is not supported.
         *
-        * NOTE:  requires adapter to have been set up, including
-        * declaring transport via C code or Tcl script.
+        * NOTE:  requires adapter to have been set up, with
+        * transports declared via C.
         */
        if (!allowed_transports) {
                LOG_ERROR("Debug adapter doesn't support any transports?");
                return ERROR_FAIL;
        }
+
        for (unsigned i = 0; allowed_transports[i]; i++) {
 
                if (strcmp(allowed_transports[i], CMD_ARGV[0]) == 0)

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)