From c8bfdc4d07ad8331f3ca1db80185637b455ddf1b Mon Sep 17 00:00:00 2001 From: travisutk Date: Mon, 1 Feb 2010 02:43:44 +0000 Subject: [PATCH] Verify for Chipcon flash. CC1110 patch coming soon. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@292 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETCC.py | 5 +++++ client/goodfet.cc | 20 ++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/client/GoodFETCC.py b/client/GoodFETCC.py index a515409..093709d 100644 --- a/client/GoodFETCC.py +++ b/client/GoodFETCC.py @@ -47,6 +47,11 @@ class GoodFETCC(GoodFET): if(pc!=self.CCgetPC()): print "ERROR: PC changed during CCdebuginstr([NOP])!"; + print "Checking pokes to XRAM." + for i in range(0xf000,0xf020): + self.CCpokedatabyte(i,0xde); + if(self.CCpeekdatabyte(i)!=0xde): + print "Error in XDATA at 0x%04x" % i; #print "Status: %s." % self.CCstatusstr(); #Exit debugger diff --git a/client/goodfet.cc b/client/goodfet.cc index e937398..2cd9e5f 100755 --- a/client/goodfet.cc +++ b/client/goodfet.cc @@ -153,7 +153,7 @@ if(sys.argv[1]=="flash"): #Wipe all of flash. #client.CCchiperase(); #Wipe the RAM buffer for the next flash page. - #client.CCeraseflashbuffer(); + client.CCeraseflashbuffer(); for i in h._buf.keys(): while(i>page+pagelen): if bcount>0: @@ -227,7 +227,23 @@ if(sys.argv[1]=="peek"): while start<=stop: print "%04x: %02x" % (start,client.CCpeekirambyte(start)); start=start+1; - +if(sys.argv[1]=="verify"): + f=sys.argv[2]; + start=0; + stop=0xFFFF; + if(len(sys.argv)>3): + start=int(sys.argv[3],16); + if(len(sys.argv)>4): + stop=int(sys.argv[4],16); + + h = IntelHex(f); + for i in h._buf.keys(): + if(i>=start and i2): -- 2.20.1