getpc() method
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 28 Feb 2010 01:47:42 +0000 (01:47 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 28 Feb 2010 01:47:42 +0000 (01:47 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@366 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py
client/GoodFETCC.py
client/GoodFETConsole.py

index 077ee75..3500c62 100755 (executable)
@@ -293,6 +293,8 @@ class GoodFET:
         return;
     def resume(self):
         return;
         return;
     def resume(self):
         return;
+    def getpc(self):
+        return 0xdead;
     def flash(self,file):
         """Flash an intel hex file to code memory."""
         print "Flash not implemented.";
     def flash(self,file):
         """Flash an intel hex file to code memory."""
         print "Flash not implemented.";
index 19e2731..f937ac9 100644 (file)
@@ -171,6 +171,8 @@ class GoodFETCC(GoodFET):
             sys.exit(1);
             #return 2048;
         return size;
             sys.exit(1);
             #return 2048;
         return size;
+    def getpc(self):
+        return self.CCgetPC();
     def CCgetPC(self):
         """Get a chipcon's PC."""
         self.writecmd(self.APP,0x83,0,None);
     def CCgetPC(self):
         """Get a chipcon's PC."""
         self.writecmd(self.APP,0x83,0,None);
index 84fbd71..751f580 100644 (file)
@@ -73,7 +73,6 @@ class GoodFETConsole():
         print self.client.halt();
     def CMDresume(self,args):
         print self.client.resume();
         print self.client.halt();
     def CMDresume(self,args):
         print self.client.resume();
-
     def CMDpeek(self,args):
         adr=eval(args[1]);
         memory="vn";
     def CMDpeek(self,args):
         adr=eval(args[1]);
         memory="vn";
@@ -83,6 +82,9 @@ class GoodFETConsole():
     def CMDflash(self,args):
         file=args[1];
         self.client.flash(self.expandfilename(file));
     def CMDflash(self,args):
         file=args[1];
         self.client.flash(self.expandfilename(file));
+    def CMDwhere(self,args):
+        pc=self.client.getpc();
+        print "PC=0x%04X" % pc;
     def CMDchip(self,args):
         cmd="self.client.CMD%s()" % args[1];
         print cmd;
     def CMDchip(self,args):
         cmd="self.client.CMD%s()" % args[1];
         print cmd;