From e93815c66f04f41806fbc8db9ebbacc742ca1b13 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Sat, 20 Feb 2010 14:55:17 +0100 Subject: Evaluate bitfile searchpath Signed-off-by: Michael Buesch --- toprammer | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'toprammer') diff --git a/toprammer b/toprammer index 3b05e3b..a1cb9e5 100755 --- a/toprammer +++ b/toprammer @@ -30,7 +30,10 @@ def usage(): print "" print "Usage: %s [OPTIONS]" % sys.argv[0] print "" - print " -b|--bitfile Path to the *.bit file (mandatory)" + print " -b|--bitfile The *.bit file (mandatory)" + print " A full path to the bitfile is not required. Specifying the" + print " chip-ID (see --list) usually is sufficient. The .bit file will" + print " be searched for in the standard paths then." print "" print "Actions:" print " -s|--read-sig FILE Read the signature bytes" @@ -307,7 +310,12 @@ def main(argv): return 1 try: - top = TOP(bitfileName = opt_bitfile, busDev = opt_device, + bitfile = bitfileFind(opt_bitfile) + if not bitfile: + print "Bitfile " + opt_bitfile + " not found" + print "See --list for a list of supported devices" + return 1 + top = TOP(bitfileName = bitfile, busDev = opt_device, verbose = opt_verbose, forceLevel = opt_forceLevel, noqueue = opt_noqueue, usebroken = opt_usebroken) if opt_action == "read-sig": -- cgit v1.2.3