Chipcon peek and poke for iram, include SFRs.
[goodfet] / client / goodfet.cc
index e233d65..d79d166 100755 (executable)
@@ -97,7 +97,13 @@ if(sys.argv[1]=="peekinfo"):
     while start<=stop:
         print "%04x: %02x" % (start,client.CCpeekcodebyte(start));
         start=start+1;
-
+if(sys.argv[1]=="peek"):
+    print "%02x" % client.CCpeekirambyte(int(sys.argv[2],16));
+if(sys.argv[1]=="poke"):
+    client.CCpokeirambyte(int(sys.argv[2],16),
+                          int(sys.argv[3],16));
+if(sys.argv[1]=="randtest"):
+    print "coming soon"
 if(sys.argv[1]=="config"):
     print "Config is %02x" % client.CCrd_config();
 
@@ -115,6 +121,7 @@ if(sys.argv[1]=="flash"):
      pagelen = 2048; #2kB pages in 32-bit words
      bcount = 0;
      
+     print "Wiping Flash."
      #Wipe all of flash.
      client.CCchiperase();
      #Wipe the RAM buffer for the next flash page.
@@ -133,7 +140,7 @@ if(sys.argv[1]=="flash"):
                                h[i]);
          bcount+=1;
          if(i%0x100==0):
-                print "%04x at %06x" % (i,page);
+                print "Buffering %04x to %06x" % (i,page);
      #last page
      client.CCflashpage(page);
      print "Flashed final page at %06x" % page;