summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chip.py7
-rwxr-xr-xtoprammer9
2 files changed, 14 insertions, 2 deletions
diff --git a/chip.py b/chip.py
index 39e8cf1..876c948 100644
--- a/chip.py
+++ b/chip.py
@@ -140,3 +140,10 @@ def chipFind(chipID):
if chip.getID().lower() == chipID.lower():
return chip
return None
+
+def dumpSupportedChips(fd):
+ for chip in supportedChips:
+ broken = ""
+ if chip.isBroken():
+ broken = " (broken)"
+ fd.write("%20s%s\n" % (chip.getID(), broken))
diff --git a/toprammer b/toprammer
index ab9427f..2e1c03b 100755
--- a/toprammer
+++ b/toprammer
@@ -461,6 +461,7 @@ 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 " -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"
@@ -492,18 +493,22 @@ def main(argv):
opt_usebroken = False
try:
(opts, args) = getopt.getopt(sys.argv[1:],
- "hb:d:V:Qs:xp:P:e:E:f:F:o:l:L:B",
+ "hb:d:V:Qs:xp:P:e:E:f:F:o:l:L:Bt",
[ "help", "bitfile=", "device=", "verbose=", "noqueue",
"read-sig=", "erase", "read-prog=", "write-prog=",
"read-eeprom=", "write-eeprom=", "read-fuse=", "write-fuse=",
"read-lock=", "write-lock=",
- "force=", "broken", ])
+ "force=", "broken", "list", ])
for (o, v) in opts:
if o in ("-h", "--help"):
usage()
return 0
if o in ("-b", "--bitfile"):
opt_bitfile = v
+ if o in ("-t", "--list"):
+ print "Supported chips:"
+ dumpSupportedChips(sys.stdout)
+ return 0
if o in ("-d", "--device"):
try:
v = v.split(".")
bues.ch cgit interface