X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETCC.py;h=622dae0b595980ccdae8d05c1dad0bc6337db5d0;hp=c1892c46484cb9f45a42b646ca62af3189dd25e5;hb=07318f32608e9dd4a6cfa0c47b0b03c18cc3c50e;hpb=a3e65c0394e0c8e551cc5309f7e4cdc7b9a39dc3 diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index c1892c4..622dae0 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -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: