From: dbrownell at B. <dbr...@ma...> - 2009-09-29 20:26:24
|
Author: dbrownell Date: 2009-09-29 20:26:18 +0200 (Tue, 29 Sep 2009) New Revision: 2775 Modified: trunk/doc/openocd.texi trunk/src/jtag/core.c Log: Make "-expected-id 0" suppress warnings; not unlike it used to do. Modified: trunk/doc/openocd.texi =================================================================== --- trunk/doc/openocd.texi 2009-09-29 18:20:30 UTC (rev 2774) +++ trunk/doc/openocd.texi 2009-09-29 18:26:18 UTC (rev 2775) @@ -1253,7 +1253,7 @@ 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 @@ (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. Modified: trunk/src/jtag/core.c =================================================================== --- trunk/src/jtag/core.c 2009-09-29 18:20:30 UTC (rev 2774) +++ trunk/src/jtag/core.c 2009-09-29 18:26:18 UTC (rev 2775) @@ -959,10 +959,14 @@ { 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 @@ } 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; } |