Verify for Chipcon flash.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Feb 2010 02:43:44 +0000 (02:43 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Mon, 1 Feb 2010 02:43:44 +0000 (02:43 +0000)
CC1110 patch coming soon.

git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@292 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFETCC.py
client/goodfet.cc

index a515409..093709d 100644 (file)
@@ -47,6 +47,11 @@ class GoodFETCC(GoodFET):
             if(pc!=self.CCgetPC()):
                 print "ERROR: PC changed during CCdebuginstr([NOP])!";
         
+        print "Checking pokes to XRAM."
+        for i in range(0xf000,0xf020):
+            self.CCpokedatabyte(i,0xde);
+            if(self.CCpeekdatabyte(i)!=0xde):
+                print "Error in XDATA at 0x%04x" % i;
         
         #print "Status: %s." % self.CCstatusstr();
         #Exit debugger
index e937398..2cd9e5f 100755 (executable)
@@ -153,7 +153,7 @@ if(sys.argv[1]=="flash"):
      #Wipe all of flash.
      #client.CCchiperase();
      #Wipe the RAM buffer for the next flash page.
-     #client.CCeraseflashbuffer();
+     client.CCeraseflashbuffer();
      for i in h._buf.keys():
          while(i>page+pagelen):
              if bcount>0:
@@ -227,7 +227,23 @@ if(sys.argv[1]=="peek"):
     while start<=stop:
         print "%04x: %02x" % (start,client.CCpeekirambyte(start));
         start=start+1;
-
+if(sys.argv[1]=="verify"):
+    f=sys.argv[2];
+    start=0;
+    stop=0xFFFF;
+    if(len(sys.argv)>3):
+        start=int(sys.argv[3],16);
+    if(len(sys.argv)>4):
+        stop=int(sys.argv[4],16);
+    
+    h = IntelHex(f);
+    for i in h._buf.keys():
+        if(i>=start and i<stop):
+            peek=client.CCpeekcodebyte(i)
+            if(h[i]!=peek):
+                print "ERROR at %04x, found %02x not %02x"%(i,peek,h[i]);
+            if(i%0x100==0):
+                print "%04x" % i;
 if(sys.argv[1]=="peekcode"):
     start=0x0000;
     if(len(sys.argv)>2):