X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFETXSCALE.py;h=f9b0c334c370cbb0921e35d81ba55ec299d3e11f;hp=f71b52e7a2e6f6e02aa61e42e68d9cd201a70381;hb=a8b686459e73c8a37df4537083a675fc21de4699;hpb=5fb0341d348e101b30794945a6c91546e25e8e7b diff --git a/client/GoodFETXSCALE.py b/client/GoodFETXSCALE.py index f71b52e..f9b0c33 100644 --- a/client/GoodFETXSCALE.py +++ b/client/GoodFETXSCALE.py @@ -17,7 +17,7 @@ NOK = 0x7E OK = 0x7F # XSCALE JTAG verbs -GET_CHIP_ID = 0xF1 +# verbs start at 0xF0 from GoodFETJTAG import GoodFETJTAG from intelhex import IntelHex @@ -28,37 +28,23 @@ class GoodFETXSCALE(GoodFETJTAG): XSCALEAPP=0x15; APP=XSCALEAPP; - + def setup(self): """Move the FET into the JTAG ARM application.""" - print "Initializing XScale..." - self.writecmd(self.APP, SETUP, 0, self.data) + sys.stdout.write("Initializing XScale...") + self.writecmd(self.APP, SETUP) + self._check_return(SETUP) def start(self): """Start debugging.""" - print "Staring debug..." - self.writecmd(self.APP, START, 0, self.data) + sys.stdout.write("Staring session...") + self.writecmd(self.APP, START) + self._check_return(START) def stop(self): """Stop debugging.""" - print "Stopping debug..." - self.writecmd(self.APP, STOP, 0, self.data) - - def get_id(self): - """Get the Chip ID.""" - - # send the get chip ID command - self.writecmd(self.APP, GET_CHIP_ID, 0, []) - - # get the response - ident = struct.unpack("> 28 - part_number = (ident >> 12) & 0x10 - manufacturer = ident & 0xFFF - - print "XScale ID --\n\tmfg: %x\n\tpart: %x\n\tver: %x\n\t(%x)" % (version, part_number, manufacturer, ident) + sys.stdout.write("Stopping session...") + self.writecmd(self.APP, STOP) + self._check_return(STOP) - return ident -