From: travisutk Date: Thu, 3 Feb 2011 22:39:48 +0000 (+0000) Subject: Major JTAG430 and JTAG430X2 patching. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=5ea4c9f824eed5226b9939b4f28fe1fda9c14dda;ds=sidebyside Major JTAG430 and JTAG430X2 patching. Swapped the APP numbers to fix the unneighborliness at startup and to let JTAG430 run on its own. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@877 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/GoodFET.py b/client/GoodFET.py index 4aec90b..ef21833 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -358,21 +358,21 @@ class GoodFET: """Execute supplied code.""" self.writecmd(0,0x31,2,#len(code), code); - def peekbyte(self,address): + def MONpeek8(self,address): """Read a byte of memory from the monitor.""" self.data=[address&0xff,address>>8]; self.writecmd(0,0x02,2,self.data); #self.readcmd(); return ord(self.data[0]); - def peekword(self,address): + def MONpeek16(self,address): """Read a word of memory from the monitor.""" - return self.peekbyte(address)+(self.peekbyte(address+1)<<8); + return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8); def peek(self,address): """Read a word of memory from the monitor.""" - return self.peekbyte(address)+(self.peekbyte(address+1)<<8); + return self.MONpeek8(address)+(self.MONpeek8(address+1)<<8); def eeprompeek(self,address): """Read a word of memory from the monitor.""" - return self.peekbyte(address)+(self.peekbyte(address+1)<<8); + 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. @@ -404,7 +404,7 @@ class GoodFET: def dumpmem(self,begin,end): i=begin; while i>16,(adr&0xff000000)>>24, ]; self.writecmd(self.MSP430APP,0x02,4,self.data); - + #print "Got %i bytes peeking 0x%04x." % (len(self.data),adr); return ord(self.data[0])+(ord(self.data[1])<<8); def MSP430peekblock(self,adr): """Grab a few block from an SPI Flash ROM. Block size is unknown""" diff --git a/client/goodfet.msp430 b/client/goodfet.msp430 index 0cca0fd..b509ea1 100755 --- a/client/goodfet.msp430 +++ b/client/goodfet.msp430 @@ -34,8 +34,8 @@ client.setup(); client.start(); if(sys.argv[1]=="info"): - #print "Model %08x " % client.MSP430deviceid(); - #print "Core %04x " % client.MSP430coreid(); + print "Model %08x " % client.MSP430deviceid(); + print "Core %04x " % client.MSP430coreid(); #print "Identity %04x" % client.MSP430ident(); print "Identifies as %s (%04x)" % ( client.MSP430identstr(),