SmartRF7 is now located on Win32 at its default location.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 23 Apr 2011 16:45:19 +0000 (16:45 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 23 Apr 2011 16:45:19 +0000 (16:45 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1006 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETCC.py

index c1892c4..622dae0 100644 (file)
@@ -11,13 +11,24 @@ import binascii;
 from GoodFET import GoodFET;
 from intelhex import IntelHex;
 
-import xml.dom.minidom, time;
+import xml.dom.minidom, time, os;
 
 class GoodFETCC(GoodFET):
     """A GoodFET variant for use with Chipcon 8051 Zigbee SoC."""
     APP=0x30;
     
-    smartrfpath="/opt/smartrf7";
+    smartrfpath=None;
+    def __init__(self,filename=None):
+        """GoodFETCC constructor.
+        Mostly concerned with finding SmartRF7."""
+        if self.smartrfpath==None:
+            self.smartrfpath=os.environ.get("SMARTRF");
+        if self.smartrfpath==None and os.name=='nt':
+            self.smartrfpath="c:/Program Files/Texas Instruments/SmartRF Tools/SmartRF Studio 7";
+        if self.smartrfpath==None:
+            self.smartrfpath="/opt/smartrf7";
+        
+        
     def loadsymbols(self):
         try: self.SRF_loadsymbols();
         except: