TelosB support by platform variable.
[goodfet] / client / goodfet.bsl
index 788e3f9..02210c4 100755 (executable)
@@ -1386,6 +1386,11 @@ def main(itest=1):
     bsl.invertRST = 1
     bsl.invertTEST = itest
     
+    if(os.environ.get("platform")=='telosb'):
+        bsl.swapRSTTEST = 1
+        bsl.telosI2C = 1
+        mayuseBSL = 0
+    
     if comPort is None and os.environ.get("GOODFET")!=None:
         glob_list = glob.glob(os.environ.get("GOODFET"));
         if len(glob_list) > 0:
@@ -1398,8 +1403,17 @@ def main(itest=1):
         glob_list = glob.glob("/dev/ttyUSB*");
         if len(glob_list) > 0:
             comPort = glob_list[0];
-    
-    
+    if os.name=='nt':
+            from scanwin32 import winScan;
+            scan=winScan();
+            for order,comport,desc,hwid in sorted(scan.comports()):
+                try:
+                    if hwid.index('FTDI')==0:
+                        comPort=comport;
+                        #print "Using FTDI port %s" % port
+                except:
+                    #Do nothing.
+                    a=1;
     sys.stderr.write("MSP430 Bootstrap Loader Version: %s\n" % VERSION)
 
     try: