Removed deprecated MSP430 flash test.
[goodfet] / client / goodfet.msp430
index 37f7351..20ee81e 100755 (executable)
@@ -27,12 +27,16 @@ client.MSP430setup();
 
 #Identify model number.
 client.MSP430start();
+client.MSP430haltcpu();
 #print "started"
 
 if(sys.argv[1]=="info"):
-    print "Model    %08x " % client.MSP430deviceid();
-    print "Core     %04x " % client.MSP430coreid();
-    print "Identity %04x" % client.MSP430ident();
+    #print "Model    %08x " % client.MSP430deviceid();
+    #print "Core     %04x " % client.MSP430coreid();
+    #print "Identity %04x" % client.MSP430ident();
+    print "Identifies as %s (%04x)" % (
+        client.MSP430identstr(),
+        client.MSP430ident());
 if(sys.argv[1]=="test"):
     client.MSP430test();
 if(sys.argv[1]=="dump"):
@@ -74,11 +78,13 @@ if(sys.argv[1]=="flash"):
     for i in h._buf.keys():
         #print "%04x: %04x"%(i,h[i>>1]);
         if(i>=start and i<stop  and i&1==0):
-            client.MSP430writeflash(i,h[i>>1]);
+            val=h[i>>1];
+            val2=client.MSP430pokeflash(i,val);
+            if(val!=val2):
+                print "Write error at %04x, %04x!=%04x." %(
+                    i, val, val2);
             if(i%0x100==0):
                 print "%04x" % i;
-if(sys.argv[1]=="flashtest"):
-    client.MSP430flashtest();
 if(sys.argv[1]=="verify"):
     f=sys.argv[2];
     start=0;
@@ -115,10 +121,10 @@ if(sys.argv[1]=="poke"):
         start=int(sys.argv[2],16);
     if(len(sys.argv)>3):
         val=int(sys.argv[3],16);
-    print "Poking %06x to become %02x." % (start,val);
+    print "Poking %06x to become %04x." % (start,val);
     
     while client.MSP430peek(start)!=val:
-        client.MSP430poke(start,val);
+        client.MSP430pokeflash(start,val);
         print "Poked to %04x" % client.MSP430peek(start);