16-bit MSP430 support working well from 1612.
[goodfet] / client / goodfet.msp430
index f9c744c..3140e13 100755 (executable)
@@ -27,13 +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 "Identifies as %s" % client.MSP430identstr();
+    #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"):
@@ -75,7 +78,7 @@ 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]);
+            client.MSP430pokeflash(i,h[i>>1]);
             if(i%0x100==0):
                 print "%04x" % i;
 if(sys.argv[1]=="flashtest"):
@@ -116,10 +119,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);