Rewriting the glitching code for the GoodFET24.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 2 Apr 2011 23:36:17 +0000 (23:36 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sat, 2 Apr 2011 23:36:17 +0000 (23:36 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@982 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py
client/GoodFETGlitch.py
client/GoodFETMSP430.py

index 673ffde..353d937 100755 (executable)
@@ -382,7 +382,8 @@ class GoodFET:
         return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8);
     def eeprompeek(self,address):
         """Read a word of memory from the monitor."""
         return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8);
     def eeprompeek(self,address):
         """Read a word of memory from the monitor."""
-        return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8);
+        print "EEPROM peeking not supported for the monitor.";
+        #return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8);
     def peekbysym(self,name):
         """Read a value by its symbol name."""
         #TODO include memory in symbol.
     def peekbysym(self,name):
         """Read a value by its symbol name."""
         #TODO include memory in symbol.
@@ -405,11 +406,17 @@ class GoodFET:
         return value;
     def setsecret(self,value):
         """Set a secret word for later retreival.  Used by glitcher."""
         return value;
     def setsecret(self,value):
         """Set a secret word for later retreival.  Used by glitcher."""
-        self.eeprompoke(0,value);
-        self.eeprompoke(1,value);
+        #self.eeprompoke(0,value);
+        #self.eeprompoke(1,value);
+        print "Secret setting is not yet suppored for this target.";
+        print "Aborting.";
+        
     def getsecret(self):
         """Get a secret word.  Used by glitcher."""
     def getsecret(self):
         """Get a secret word.  Used by glitcher."""
-        self.eeprompeek(0);
+        #self.eeprompeek(0);
+        print "Secret setting is not yet suppored for this target.";
+        print "Aborting.";
+        sys.exit();
     
     def dumpmem(self,begin,end):
         i=begin;
     
     def dumpmem(self,begin,end):
         i=begin;
index 06bb511..52ce187 100644 (file)
@@ -208,10 +208,10 @@ class GoodFETGlitch(GoodFET):
         tstop=self.client.glitchstarttime();
         tstep=0x1; #Must be 1
         self.scan(lock,trials,range(vstart,vstop),range(tstart,tstop));
         tstop=self.client.glitchstarttime();
         tstep=0x1; #Must be 1
         self.scan(lock,trials,range(vstart,vstop),range(tstart,tstop));
-        print "Learning phase complete, beginning to crunch.";
+        print "Learning phase complete, begin to crunch.";
         self.crunch();
         self.crunch();
-        print "Crunch phase complete, beginning to explore.";
-        self.explore();
+        #print "Crunch phase complete, beginning to explore.";
+        #self.explore();
         
     def scansetup(self,lock):
         client=self.client;
         
     def scansetup(self,lock):
         client=self.client;
index e7cc368..df6f20e 100644 (file)
@@ -201,7 +201,8 @@ class GoodFETMSP430(GoodFET):
         
         print "Tests complete, erasing."
         self.MSP430masserase();
         
         print "Tests complete, erasing."
         self.MSP430masserase();
-        
+    def erase(self):
+        self.MSP430masserase();
     def MSP430masserase(self):
         """Erase MSP430 flash memory."""
         self.writecmd(self.MSP430APP,0xE3,0,None);
     def MSP430masserase(self):
         """Erase MSP430 flash memory."""
         self.writecmd(self.MSP430APP,0xE3,0,None);