Faster SPI Flash dumping, but it's a bit ugly.
[goodfet] / client / goodfet.spiflash
index efca070..571ddc4 100755 (executable)
@@ -77,11 +77,11 @@ if(sys.argv[1]=="dump"):
 
     i=start;
     while i<=stop:
 
     i=start;
     while i<=stop:
-        data=client.SPIpeekblock(i);
-        if(i%0x1000==0):
-            print "Dumped %06x."%i;
+        data=client.SPIpeekblock(i,255);
+        #if(i%0x1000==0):
+        print "Dumped %06x."%i;
         for j in data:
         for j in data:
-            file.write(j);
+            if i<stop: file.write(j);
             i+=1;
     file.close()
 if(sys.argv[1]=="flash"):
             i+=1;
     file.close()
 if(sys.argv[1]=="flash"):