X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=054f6481d68b2558c50d6399759a24806b52ce49;hp=387eeab5f74b3148fda75da2b45603f2d07ab257;hb=fbc2cacf6365782c314b4c512ce73b7dd24e5b91;hpb=a653ba1562dc444e4be791e22264a89a3c6b4a19 diff --git a/client/GoodFET.py b/client/GoodFET.py index 387eeab..054f648 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -13,7 +13,6 @@ import serial class GoodFET: def __init__(self, *args, **kargs): - print "inited\n"; self.data=[0]; def timeout(self): print "timout\n"; @@ -86,7 +85,6 @@ class GoodFET: def spisetup(self): """Moved the FET into the SPI application.""" - print "Initializing SPI."; self.writecmd(1,0x10,0,self.data); #SPI/SETUP #self.readcmd(); def spitrans8(self,byte): @@ -116,6 +114,9 @@ class GoodFET: def MSP430start(self): """Start debugging.""" self.writecmd(0x11,0x20,0,self.data); + def MSP430stop(self): + """Stop debugging.""" + self.writecmd(0x11,0x21,0,self.data); def MSP430haltcpu(self): """Halt the CPU.""" self.writecmd(0x11,0xA0,0,self.data); @@ -139,8 +140,8 @@ class GoodFET: return self.data[0]; def MSP430test(self): """Test MSP430 JTAG. Requires that a chip be attached.""" - self.MSP430setup(); - self.MSP430start(); + #self.MSP430setup(); + #self.MSP430start(); self.MSP430haltcpu(); ident=self.MSP430peek(0x0ff0); @@ -152,13 +153,17 @@ class GoodFET: self.MSP430poke(0x0200,0xdead); if(self.MSP430peek(0x0200)!=0xdead): print "Poke of 0x0200 did not set to 0xDEAD properly."; - exit; + return; self.MSP430poke(0x0200,temp); #restore old value. self.MSP430releasecpu(); def MSP430dumpbsl(self): - i=0xC00; - while i<0x1000: + self.MSP430dumpmem(0xC00,0xfff); + def MSP430dumpallmem(self): + self.MSP430dumpmem(0x200,0xffff); + def MSP430dumpmem(self,begin,end): + i=begin; + while i