updated features for two different types of sniffing. fixed and scrolling. This can...
[goodfet] / client / goodfet.slc2
1 #!/usr/bin/env python\r
2 \r
3 # GoodFET - Silicon Lab C2\r
4 \r
5 import sys;\r
6 import binascii;\r
7 import array;\r
8 import pdb;\r
9 import time;\r
10 \r
11 from GoodFETSLC2 import GoodFETSLC2;\r
12 from intelhex import IntelHex;\r
13 \r
14 \r
15 \r
16 #Initialize FET and set baud rate\r
17 #pdb.set_trace();\r
18 client=GoodFETSLC2();\r
19 client.serInit();\r
20 \r
21 if(sys.argv[1]=="devid"):\r
22     client.setup();\r
23     data = client.getrevid();\r
24     #pdb.set_trace();\r
25     print "dumping contents of 8051 FLASH in dump.txt";\r
26     file = open("dump.bin", mode='wb')\r
27     address = 0;\r
28     while address < 65535:\r
29         data = client.peekblock(address,2);\r
30         address+= 2;\r
31         for j in data:\r
32             print j;\r
33             file.write(j);\r
34     file.close();\r
35 \r
36 \r