Make "-expected-id 0" suppress warnings; not unlike it used to do.
authordbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 18:26:18 +0000 (18:26 +0000)
committerdbrownell <dbrownell@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 29 Sep 2009 18:26:18 +0000 (18:26 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2775 b42882b7-edfa-0310-969c-e2dbd0fdcd60

doc/openocd.texi
src/jtag/core.c

index 716c452372df711bab3d74d98e046118f3d4a711..d80ef4921bae7bcecf7832d3b6436e009ed5bd5b 100644 (file)
@@ -1253,7 +1253,7 @@ to source such a config file twice, with different
 values for @code{CHIPNAME}, so
 it adds a different TAP each time.
 
-If there are one or more nonzero @option{-expected-id} values,
+If there are nonzero @option{-expected-id} values,
 OpenOCD attempts to verify the actual tap id against those values.
 It will issue error messages if there is mismatch, which
 can help to pinpoint problems in OpenOCD configurations.
@@ -2373,11 +2373,13 @@ You may use @code{-enable} to highlight the default state
 (the TAP is linked in).
 @xref{Enabling and Disabling TAPs}.
 @item @code{-expected-id} @var{number}
-@*A non-zero value represents the expected 32-bit IDCODE
-found when the JTAG chain is examined.
+@*A non-zero @var{number} represents a 32-bit IDCODE
+which you expect to find when the scan chain is examined.
 These codes are not required by all JTAG devices.
 @emph{Repeat the option} as many times as required if more than one
 ID code could appear (for example, multiple versions).
+Specify @var{number} as zero to suppress warnings about IDCODE
+values that were found but not included in the list.
 @item @code{-ircapture} @var{NUMBER}
 @*The bit pattern loaded by the TAP into the JTAG shift register
 on entry to the @sc{ircapture} state, such as 0x01.
index 78f67db33b8306464454bfc075fe5ac42c872cf3..056fa9905ac107b72d220b07e87e48fd93a1cd4d 100644 (file)
@@ -959,10 +959,14 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap)
        {
                if (tap->idcode == tap->expected_ids[ii])
                        return true;
+
+               /* treat "-expected-id 0" as a "don't-warn" wildcard */
+               if (0 == tap->expected_ids[ii])
+                       return true;
        }
 
-       /* If none of the expected ids matched, log an error */
-       jtag_examine_chain_display(LOG_LVL_ERROR, "UNEXPECTED",
+       /* If none of the expected ids matched, warn */
+       jtag_examine_chain_display(LOG_LVL_WARNING, "UNEXPECTED",
                        tap->dotted_name, tap->idcode);
        for (ii = 0; ii < tap->expected_ids_cnt; ii++)
        {
@@ -1025,7 +1029,7 @@ static int jtag_examine_chain(void)
                }
                tap->idcode = idcode;
 
-               // ensure the TAP ID does matches what was expected
+               /* ensure the TAP ID matches what was expected */
                if (!jtag_examine_chain_match_tap(tap))
                        return ERROR_JTAG_INIT_FAILED;
        }

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)