starting OpenOCD app and client changes for JTAG work that didn't go in earlier.
[goodfet] / client / GoodFETCC.py
index 22df102..fcb5311 100644 (file)
@@ -17,26 +17,24 @@ class GoodFETCC(GoodFET):
     """A GoodFET variant for use with Chipcon 8051 Zigbee SoC."""
     APP=0x30;
     
-    
-    
-    
     smartrfpath="/opt/smartrf7";
     def loadsymbols(self):
         try: self.SRF_loadsymbols();
         except:
             if self.verbose>0: print "SmartRF not found at %s." % self.smartrfpath;
     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);
         #print "Opening %s" % fn;
         return xml.dom.minidom.parse(fn)
         
     def CMDrs(self,args=[]):
         """Chip command to grab the radio state."""
-        try:
-            self.SRF_radiostate();
-        except:
-            print "Error printing radio state.";
-            print "SmartRF not found at %s." % self.smartrfpath;
+        #try:
+        self.SRF_radiostate();
+        #except:
+        #    print "Error printing radio state.";
+        #    print "SmartRF not found at %s." % self.smartrfpath;
     def SRF_bitfieldstr(self,bf):
         name="unused";
         start=0;
@@ -150,6 +148,7 @@ class GoodFETCC(GoodFET):
             self.lastshellcode=filename;
             file=__file__;
             file=file.replace("GoodFETCC.pyc","GoodFETCC.py");
+            #TODO make this generic
             path=file.replace("GoodFETCC.py","shellcode/chipcon/cc1110/");
             filename=path+filename;
         
@@ -594,7 +593,7 @@ class GoodFETCC(GoodFET):
         except:
             if self.verbose>0: print "RSSI reg doesn't exist.";
         try:
-            #RSSI doesn't exist on 2.4GHz devices.  Maybe RSSIL and RSSIH?
+            #RSSI doesn't exist on some 2.4GHz devices.  Maybe RSSIL and RSSIH?
             rssilreg=self.symbols.get("RSSIL");
             rssil=self.CCpeekdatabyte(rssilreg);
             rssihreg=self.symbols.get("RSSIL");
@@ -705,8 +704,10 @@ class GoodFETCC(GoodFET):
                 0x8900:"cc2431",
                 0x8100:"cc2510",
                 0x9100:"cc2511",
-                0xA500:"cc2530", #page 52 of SWRU191
+                0xA500:"cc2530", #page 57 of SWRU191B
                 0xB500:"cc2531",
+                0x9500:"CC2533",
+                0x8D00:"CC2540",
                 0xFF00:"CCmissing"};
     CCpagesizes={0x01: 1024, #"CC1110",
                  0x11: 1024, #"CC1111",
@@ -714,8 +715,10 @@ class GoodFETCC(GoodFET):
                  0x89: 2048, #"CC2431",
                  0x81: 1024, #"CC2510",
                  0x91: 1024, #"CC2511",
-                 0xA5: 2048, #"CC2530", #page 52 of SWRU191
+                 0xA5: 2048, #"CC2530", #page 57 of SWRU191B
                  0xB5: 2048, #"CC2531",
+                 0x95: 2048, #"CC2533",
+                 0x8D: 2048, #"CC2540",
                  0xFF: 0    } #"CCmissing"};
     def infostring(self):
         return self.CCidentstr();