projects
/
goodfet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reworking get/set_register() to write twice for sanity.
[goodfet]
/
client
/
GoodFETConsole.py
diff --git
a/client/GoodFETConsole.py
b/client/GoodFETConsole.py
index
84fbd71
..
3612007
100644
(file)
--- a/
client/GoodFETConsole.py
+++ b/
client/GoodFETConsole.py
@@
-11,6
+11,23
@@
import binascii;
from GoodFET import GoodFET;
from intelhex import IntelHex;
from GoodFET import GoodFET;
from intelhex import IntelHex;
+
+#grep CMD GoodFETConsole.py | grep def | sed s/\(sel.\*// | sed 's/def CMD//'
+commands="""
+ info
+ lock
+ erase
+ test
+ status
+ halt
+ resume
+ peek
+ flash
+ dump
+ where
+ chip
+"""
+
class GoodFETConsole():
"""An interactive goodfet driver."""
class GoodFETConsole():
"""An interactive goodfet driver."""
@@
-19,6
+36,7
@@
class GoodFETConsole():
client.serInit();
client.setup();
client.start();
client.serInit();
client.setup();
client.start();
+ client.loadsymbols();
def prompt(self):
sys.stdout.write("gf% ");
sys.stdout.flush();
def prompt(self):
sys.stdout.write("gf% ");
sys.stdout.flush();
@@
-73,16
+91,25
@@
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):
def CMDpeek(self,args):
- adr=
eval(args[1])
;
+ adr=
args[1]
;
memory="vn";
if(len(args)>2):
memory=args[2];
memory="vn";
if(len(args)>2):
memory=args[2];
- print "0x%08x:= 0x%04x" % (adr, self.client.peek16(adr,memory));
+ adr= self.client.name2adr(adr);
+ #print "%i" % adr;
+ print "0x%08x:= 0x%04x" % (
+ adr, self.client.peekword(adr,
+ memory));
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 CMDdump(self,args):
+ file=args[1];
+ self.client.dump(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;