summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-30 17:30:14 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-08-30 17:30:14 +0000
commitd879faa3cb8200c1c31e1a52c42e9bbacb9fac40 (patch)
treef4615c0c22e50f94c61a292ce3d582132ca2d789 /doc
parent4b9bdd664a79d5713b22a178086b071abc049d01 (diff)
downloadopenocd+libswd-d879faa3cb8200c1c31e1a52c42e9bbacb9fac40.tar.gz
openocd+libswd-d879faa3cb8200c1c31e1a52c42e9bbacb9fac40.tar.bz2
openocd+libswd-d879faa3cb8200c1c31e1a52c42e9bbacb9fac40.tar.xz
openocd+libswd-d879faa3cb8200c1c31e1a52c42e9bbacb9fac40.zip
David Brownell <david-b@pacbell.net> start phasing out integers as target IDs
git-svn-id: svn://svn.berlios.de/openocd/trunk@2650 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'doc')
-rw-r--r--doc/openocd.texi10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 14dec6d2..8b679705 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -2365,6 +2365,10 @@ are examples; and there are many more.
Several commands let you examine the list of targets:
@deffn Command {target count}
+@emph{Note: target numbers are deprecated; don't use them.
+They will be removed shortly after August 2010, including this command.
+Iterate target using @command{target names}, not by counting.}
+
Returns the number of targets, @math{N}.
The highest numbered target is @math{N - 1}.
@example
@@ -2390,6 +2394,9 @@ foreach t [target names] @{
@end deffn
@deffn Command {target number} number
+@emph{Note: target numbers are deprecated; don't use them.
+They will be removed shortly after August 2010, including this command.}
+
The list of targets is numbered starting at zero.
This command returns the name of the target at index @var{number}.
@example
@@ -2711,8 +2718,7 @@ For example, if you wanted to summarize information about
all the targets you might use something like this:
@example
-for @{ set x 0 @} @{ $x < [target count] @} @{ incr x @} @{
- set name [target number $x]
+foreach name [target names] @{
set y [$name cget -endian]
set z [$name cget -type]
puts [format "Chip %d is %s, Endian: %s, type: %s" \