goodfet.ccspi added txpipscapy in an alpha version, starting to generate pip/pop...
[goodfet] / client / gplay-at91x40.py
1 #!/usr/bin/env ipython
2 import sys, struct, binascii,time
3 from GoodFETAT91X40 import *
4 from intelhex import IntelHex
5
6
7 data = []
8
9 client=GoodFETAT91X40();
10 def init():
11     #Initailize FET and set baud rate
12     print >>sys.stderr,"Connecting to goodfet..."
13     client.serInit()
14     #
15     #Connect to target
16     print >>sys.stderr,"Setting up JTAG ARM on goodfet..."
17     client.setup()
18     print >>sys.stderr,"Starting JTAG ARM on goodfet...\n"
19     client.start()
20     print "STARTUP: %s\n"%repr(client.data)
21     #
22
23 def print_registers():
24     return [ hex(client.ARMget_register(x)) for x in range(15) ]
25
26
27 init()
28
29
30 def printResults():
31     for y in range(len(results)):
32             x=results[y]
33             print "%.2x=%s"%(y,repr(["%x"%t for t in x]))
34