summaryrefslogtreecommitdiffstats
path: root/toprammer
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2011-01-16 01:42:05 +0100
committerMichael Buesch <mb@bu3sch.de>2011-01-16 01:42:05 +0100
commitba996a58eed43b0924cbaaa4d44d06aa0696e11c (patch)
treeecd24d5c39867d33537382cf9074d1a03e764c03 /toprammer
parent16e78c6f773c5a0188fd0b89723e5d0bb3b1c543 (diff)
downloadtoprammer-ba996a58eed43b0924cbaaa4d44d06aa0696e11c.tar.xz
toprammer-ba996a58eed43b0924cbaaa4d44d06aa0696e11c.zip
Add unit-test support
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'toprammer')
-rwxr-xr-xtoprammer9
1 files changed, 7 insertions, 2 deletions
diff --git a/toprammer b/toprammer
index 23732db..cde6a90 100755
--- a/toprammer
+++ b/toprammer
@@ -37,6 +37,7 @@ def usage():
print "Actions:"
print " -s|--read-sig FILE Read the signature bytes"
print " -x|--erase Erase the chip"
+ print " -T|--test Run chip unit-test"
print ""
print " -p|--read-prog FILE Read the program memory"
print " -P|--write-prog FILE Write the program memory"
@@ -124,9 +125,9 @@ def main(argv):
opt_outformat = "bin"
try:
(opts, args) = getopt.getopt(sys.argv[1:],
- "hc:d:V:Qs:xp:P:e:E:f:F:o:Ul:L:r:R:BtI:O:",
+ "hc:d:V:Qs:xTp:P:e:E:f:F:o:Ul:L:r:R:BtI:O:",
[ "help", "chip-id=", "device=", "verbose=", "noqueue",
- "read-sig=", "erase", "read-prog=", "write-prog=",
+ "read-sig=", "erase", "test", "read-prog=", "write-prog=",
"read-eeprom=", "write-eeprom=", "read-fuse=", "write-fuse=",
"read-lock=", "write-lock=", "read-ram=", "write-ram=",
"force=", "force-upload", "broken", "list",
@@ -165,6 +166,8 @@ def main(argv):
opt_file = v
if o in ("-x", "--erase"):
opt_action = "erase"
+ if o in ("-T", "--test"):
+ opt_action = "test"
if o in ("-P", "--write-prog"):
opt_action = "write-prog"
opt_file = v
@@ -222,6 +225,8 @@ def main(argv):
fileOut(opt_file, opt_outformat, top.readSignature())
elif opt_action == "erase":
top.eraseChip()
+ elif opt_action == "test":
+ top.testChip()
elif opt_action == "read-prog":
fileOut(opt_file, opt_outformat, top.readProgmem())
elif opt_action == "write-prog":
bues.ch cgit interface