summaryrefslogtreecommitdiffstats
path: root/toprammer
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-03-16 21:20:21 +0100
committerMichael Buesch <mb@bu3sch.de>2010-03-16 21:20:21 +0100
commit01691ae22e986a3a0c276c3cb6765db3087ed360 (patch)
treed777f037ed99040023d8e1cb37b588d40f4060e2 /toprammer
parent0a0b2297025352fa5366d232431a01fe57e84b33 (diff)
downloadtoprammer-01691ae22e986a3a0c276c3cb6765db3087ed360.tar.xz
toprammer-01691ae22e986a3a0c276c3cb6765db3087ed360.zip
Improve online chip documentation
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'toprammer')
-rwxr-xr-xtoprammer13
1 files changed, 8 insertions, 5 deletions
diff --git a/toprammer b/toprammer
index 90c0ab1..8e4a738 100755
--- a/toprammer
+++ b/toprammer
@@ -52,7 +52,8 @@ def usage():
print " -L|--write-lock FILE Write the lock bits"
print ""
print "Optional:"
- print " -t|--list Print a list of supported chips and exit"
+ print " -t|--list Print a list of supported chips and exit."
+ print " Use -V|--verbose to control the list verbosity (1-4)"
print " -d|--device BUS.DEV Use the programmer at BUS.DEV"
print " First found programmer is used, if not given."
print " -V|--verbose LEVEL Set the verbosity level. Default = 1"
@@ -247,9 +248,7 @@ def main(argv):
if o in ("-b", "--bitfile"):
opt_bitfile = v
if o in ("-t", "--list"):
- print "Supported chips:"
- RegisteredChip.dumpAll(sys.stdout)
- return 0
+ opt_action = "print-list"
if o in ("-d", "--device"):
try:
v = v.split(".")
@@ -301,7 +300,7 @@ def main(argv):
except (getopt.GetoptError, ValueError), e:
usage()
return 1
- if not opt_bitfile:
+ if opt_action and opt_action != "print-list" and not opt_bitfile:
print "-b|--bitfile is mandatory!"
return 1
if not opt_action:
@@ -315,6 +314,10 @@ def main(argv):
return 1
try:
+ if opt_action == "print-list":
+ RegisteredChip.dumpAll(sys.stdout, verbose=opt_verbose, showBroken=True)
+ return 0
+
bitfile = bitfileFind(opt_bitfile)
if not bitfile:
print "Bitfile " + opt_bitfile + " not found"
bues.ch cgit interface