added new mcpCAN communication file to allow for easier testing and data storage.
[goodfet] / client / gplay-arm.py
index eb253b3..70333d7 100755 (executable)
@@ -15,9 +15,9 @@ def init():
     #Connect to target
     print >>sys.stderr,"Setting up JTAG ARM on goodfet..."
     client.setup()
-    print >>sys.stderr,"Starting JTAG ARM on goodfet..."
+    print >>sys.stderr,"Starting JTAG ARM on goodfet...\n\n"
     client.start()
-    print "STARTUP: "+repr(client.data)
+    print "STARTUP: %s\n"%repr(client.data)
     #
 
 def print_registers():
@@ -109,6 +109,15 @@ def test():
     print "PC:",client.ARMgetPC()
     print "PC:",client.ARMgetPC()
     print "PC:",client.ARMgetPC()
+    print "Testing readChunk/writeChunk"
+    mem=client.ARMreadChunk(0x200000,32)
+    client.ARMwriteChunk(0x200000,mem)
+    mem2=client.ARMreadChunk(0x200000,32)
+    if (mem != mem2):
+        print "Failed: \n%s\n%s"%(repr([hex(x) for x in mem]), repr([hex(x) for x in mem2]))
+    else:
+        print "Passed."
+
 
 def test1():
     global data
@@ -334,7 +343,6 @@ def readtest(start=0,end=14):
         seed += 1
 
 init()
-print "Don't forget to 'client.stop()' if you want to exit cleanly"
 
 
 def printResults():