From 3ec1d76609ec874ea611901cfe17d702685b5cbb Mon Sep 17 00:00:00 2001 From: cutsec Date: Mon, 21 Mar 2011 19:02:17 +0000 Subject: [PATCH] Console was updated to include help for commands. goodfet.cc was updated to include special register queries. I forgot to update this file when I updated GoodFETCC.py Cutaway git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@981 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- client/GoodFETConsole.py | 5 +++++ client/goodfet.cc | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/client/GoodFETConsole.py b/client/GoodFETConsole.py index 8f6eba8..a7eccd3 100644 --- a/client/GoodFETConsole.py +++ b/client/GoodFETConsole.py @@ -51,6 +51,11 @@ class GoodFETConsole(): self.prompt(); def handle(self, str): """Handle a command string. First word is command.""" + #Lines beginning with ? are cries for help. + if(str[0]=="?"): + print "Term Commands:" + print commands + return; #Lines beginning with # are comments. if(str[0]=="#"): return; #Lines beginning with ! are Python. diff --git a/client/goodfet.cc b/client/goodfet.cc index e58ec68..7293534 100755 --- a/client/goodfet.cc +++ b/client/goodfet.cc @@ -117,8 +117,11 @@ if(len(sys.argv)==1): print "%s flash $foo.hex" % sys.argv[0]; print "%s test" % sys.argv[0]; print "%s term" % sys.argv[0]; + print " use \'?\' for list of commands"; print "%s info" % sys.argv[0]; print "%s infotest" % sys.argv[0]; + print "%s radioinfo [help] [REGISTER_NAME]" % sys.argv[0]; + print "%s specfuncreg [SPECIAL_REGISTER_NAME]" % sys.argv[0]; print "%s halt" % sys.argv[0]; print "%s regs" % sys.argv[0]; print "%s dumpcode $foo.hex [0x$start 0x$stop]" % sys.argv[0]; @@ -414,6 +417,12 @@ if(sys.argv[1]=="info"): #print "SMAC 0x%010x" % client.RF_getsmac(); #print "TMAC 0x%010x" % client.RF_gettmac(); +if(sys.argv[1]=="radioinfo"): + if (len(sys.argv) - 2) > 0: + client.CMDrs(sys.argv[2:]); + else: + client.CMDrs(); + if(sys.argv[1]=="regs"): client.CMDrs(); @@ -462,6 +471,12 @@ if(sys.argv[1]=="adctest"): if(sys.argv[1]=="config"): print "Config is %02x" % client.CCrd_config(); +if(sys.argv[1]=="specfuncreg"): + if len(sys.argv) > 2: + client.getSPR(sys.argv[2:]); + else: + client.getSPR(); + if(sys.argv[1]=="flash"): f=sys.argv[2]; start=0; -- 2.20.1