- Don't let disabled TAPs be set as the current target
- Improve "targets" output:
* Remove undesirable "chain position" number; we discourage using them
* TAP and Target column updates:
+ make them long enough for current usage
+ improve labels, removing guesswork
+ "TapName" label patches scan_chain output
* Highlight the "current" target
* Display "tap disabled" as a new pseudo-state
* Update docs accordingly
git-svn-id: svn://svn.berlios.de/openocd/trunk@2107
b42882b7-edfa-0310-969c-
e2dbd0fdcd60
This display often has only one CPU; here's what it might
look like with more than one:
@verbatim
This display often has only one CPU; here's what it might
look like with more than one:
@verbatim
- CmdName Type Endian AbsChainPos Name State
--- ---------- ---------- ---------- ----------- ------------- ----------
- 0: rm9200.cpu arm920t little 2 rm9200.cpu running
- 1: MyTarget cortex_m3 little 0 mychip.cpu halted
+ TargetName Type Endian TapName State
+-- ------------------ ---------- ------ ------------------ ------------
+ 0* at91rm9200.cpu arm920t little at91rm9200.cpu running
+ 1 MyTarget cortex_m3 little mychip.foo tap-disabled
@end verbatim
One member of that list is the @dfn{current target}, which
is implicitly referenced by many commands.
@end verbatim
One member of that list is the @dfn{current target}, which
is implicitly referenced by many commands.
+It's the one marked with a @code{*} near the target name.
In particular, memory addresses often refer to the address
space seen by that current target.
Commands like @command{mdw} (memory display words)
In particular, memory addresses often refer to the address
space seen by that current target.
Commands like @command{mdw} (memory display words)
command_print(cmd_ctx,"Target: %s is unknown, try one of:\n", args[0] );
goto DumpTargets;
}
command_print(cmd_ctx,"Target: %s is unknown, try one of:\n", args[0] );
goto DumpTargets;
}
+ if (!target->tap->enabled) {
+ command_print(cmd_ctx,"Target: TAP %s is disabled, "
+ "can't be the current target\n",
+ target->tap->dotted_name);
+ return ERROR_FAIL;
+ }
cmd_ctx->current_target = target->target_number;
return ERROR_OK;
cmd_ctx->current_target = target->target_number;
return ERROR_OK;
DumpTargets:
target = all_targets;
DumpTargets:
target = all_targets;
- command_print(cmd_ctx, " CmdName Type Endian AbsChainPos Name State ");
- command_print(cmd_ctx, "-- ---------- ---------- ---------- ----------- ------------- ----------");
+ command_print(cmd_ctx, " TargetName Type Endian TapName State ");
+ command_print(cmd_ctx, "-- ------------------ ---------- ------ ------------------ ------------");
- /* XX: abcdefghij abcdefghij abcdefghij abcdefghij */
- command_print(cmd_ctx, "%2d: %-10s %-10s %-10s %10d %14s %s",
+ const char *state;
+ char marker = ' ';
+
+ if (target->tap->enabled)
+ state = Jim_Nvp_value2name_simple(nvp_target_state,
+ target->state)->name;
+ else
+ state = "tap-disabled";
+
+ if (cmd_ctx->current_target == target->target_number)
+ marker = '*';
+
+ /* keep columns lined up to match the headers above */
+ command_print(cmd_ctx, "%2d%c %-18s %-10s %-6s %-18s %s",
target->cmd_name,
target_get_name(target),
target->cmd_name,
target_get_name(target),
- Jim_Nvp_value2name_simple( nvp_target_endian, target->endianness )->name,
- target->tap->abs_chain_position,
+ Jim_Nvp_value2name_simple(nvp_target_endian,
+ target->endianness)->name,
target->tap->dotted_name,
target->tap->dotted_name,
- Jim_Nvp_value2name_simple( nvp_target_state, target->state )->name );
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)