Clarified the SmartRF error message to mention wiring if that's the problem.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 29 Apr 2012 16:13:48 +0000 (16:13 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 29 Apr 2012 16:13:48 +0000 (16:13 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1146 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETCC.py

index ab9170b..7958c40 100644 (file)
@@ -38,7 +38,11 @@ class GoodFETCC(GoodFET):
             self.SRF_loadsymbols();
             self.haveloadedsymbols=True;
         except:
             self.SRF_loadsymbols();
             self.haveloadedsymbols=True;
         except:
-            print "SmartRF not found for this chip.\nInstall it with wine and symlink to /opt/smartrf7 .";
+            ident=self.CCident();
+            if ident==0x0000 or ident==0xFFFF:
+                print "Chip ID is 0x%04x, implying a wiring problem." % ident;
+            else:
+                print "SmartRF not found for chip 0x%04x.\nInstall it with wine and symlink to /opt/smartrf7 ." % ident;
     def SRF_chipdom(self,chip="cc1110", doc="register_definition.xml"):
         """Loads the chip XML definitions from SmartRF7."""
         fn="%s/config/xml/%s/%s" % (self.smartrfpath,chip,doc);
     def SRF_chipdom(self,chip="cc1110", doc="register_definition.xml"):
         """Loads the chip XML definitions from SmartRF7."""
         fn="%s/config/xml/%s/%s" % (self.smartrfpath,chip,doc);
@@ -701,7 +705,7 @@ class GoodFETCC(GoodFET):
         if(ident1!=ident2 or ident2!=ident3):
             print "Error, repeated ident attempts unequal."
             print "%04x, %04x, %04x" % (ident1, ident2, ident3);
         if(ident1!=ident2 or ident2!=ident3):
             print "Error, repeated ident attempts unequal."
             print "%04x, %04x, %04x" % (ident1, ident2, ident3);
-        
+
         #Single step, printing PC.
         print "Tracing execution at startup."
         for i in range(1,15):
         #Single step, printing PC.
         print "Tracing execution at startup."
         for i in range(1,15):