- renamed M5960 USB JTAG to "flyswatter"
[openocd.git] / src / jtag / jtag.c
index c1c52fe48f43826e894d50f6b686012183d0abac..bac1b39eeb07dd1d20fb3a82b633da3a13536536 100644 (file)
@@ -1251,7 +1251,7 @@ int jtag_examine_chain()
        if ((zero_check == 0x00) || (one_check == 0xff))
        {
                ERROR("JTAG communication failure, check connection, JTAG interface, target power etc.");
-               exit(-1);
+               return ERROR_JTAG_INIT_FAILED;
        }
        
        for (bit_count = 0; bit_count < (JTAG_MAX_CHAIN_SIZE * 32) - 31;)
@@ -1300,7 +1300,7 @@ int jtag_examine_chain()
                ERROR("number of discovered devices in JTAG chain (%i) doesn't match configuration (%i)", 
                        device_count, jtag_num_devices);
                ERROR("check the config file and ensure proper JTAG communication (connections, speed, ...)");
-               exit(-1);
+               return ERROR_JTAG_INIT_FAILED;
        }
        
        return ERROR_OK;
@@ -1434,6 +1434,12 @@ int jtag_init(struct command_context_s *cmd_ctx)
                                jtag_add_statemove(TAP_TLR);
                                jtag_execute_queue();
 
+                               /* examine chain first, as this could discover the real chain layout */
+                               if (jtag_examine_chain() != ERROR_OK)
+                               {
+                                       ERROR("trying to validate configured JTAG chain anyway...");
+                               }
+                               
                                while (jtag_validate_chain() != ERROR_OK)
                                {
                                        validate_tries++;
@@ -1445,8 +1451,6 @@ int jtag_init(struct command_context_s *cmd_ctx)
                                        usleep(10000);
                                }
 
-                               jtag_examine_chain();
-                               
                                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)