New graph, prohibitvely complex so disabled.
[goodfet] / client / goodfet.glitch
1 #!/usr/bin/env python
2
3 import sys,binascii,time,random;
4
5 sys.path.append('../../../trunk/client/')
6
7 from GoodFETAVR import GoodFETAVR;
8 from GoodFETGlitch import *;
9 from intelhex import IntelHex16bit, IntelHex;
10
11 import sqlite3;
12
13
14 glitcher=GoodFETGlitch();
15
16 if(len(sys.argv)==1):
17     print "Usage: %s chip verb [objects]\n" % sys.argv[0];
18     print "%s avr learn" % sys.argv[0];
19     print "%s avr graph" % sys.argv[0];
20     print "%s avr graphx11" % sys.argv[0];
21     print """
22 This populates a database, glitch.db, with a record of all attempted
23 glitches.  Graphs can then be generated from the results, allowing
24 results to be replicated on different hardware and models.  The general
25 sequence for a new chip is to first run 'goodfet $foo learn' for an evening,
26 then to FINISHME"""
27     sys.exit();
28
29
30 glitcher.setup(sys.argv[1]);
31
32 if(sys.argv[2]=="learn"):
33     glitcher.learn();
34
35 if(sys.argv[2]=="graphx11"):
36     glitcher.graphx11();
37
38 if(sys.argv[2]=="graph"):
39     glitcher.graph();