aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMarc Schink <openocd-dev@marcschink.de>2019-05-31 13:42:28 +0200
committerTomas Vanek <vanekt@fbl.cz>2019-06-10 20:36:50 +0100
commitc8184bac20e328704067efb3ab63a96c9b541b89 (patch)
treedf45e5cdc285c15e272b890b70c4be018f4df39e /contrib
parent215f14bec87293f549639e6342b6e671faa1e7d1 (diff)
downloadriscv-openocd-c8184bac20e328704067efb3ab63a96c9b541b89.zip
riscv-openocd-c8184bac20e328704067efb3ab63a96c9b541b89.tar.gz
riscv-openocd-c8184bac20e328704067efb3ab63a96c9b541b89.tar.bz2
contrib/rpc_examples: Remove 'ocd_' command prefix
The prefix is not necessary anymore. Change-Id: Ie0df06a70ff51e6719d7564396739d28618b0196 Signed-off-by: Marc Schink <openocd-dev@marcschink.de> Reviewed-on: http://openocd.zylin.com/5190 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/rpc_examples/ocd_rpc_example.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/rpc_examples/ocd_rpc_example.py b/contrib/rpc_examples/ocd_rpc_example.py
index b585aaa..196ea05 100755
--- a/contrib/rpc_examples/ocd_rpc_example.py
+++ b/contrib/rpc_examples/ocd_rpc_example.py
@@ -85,14 +85,14 @@ class OpenOcd:
return data
def readVariable(self, address):
- raw = self.send("ocd_mdw 0x%x" % address).split(": ")
+ raw = self.send("mdw 0x%x" % address).split(": ")
return None if (len(raw) < 2) else strToHex(raw[1])
def readMemory(self, wordLen, address, n):
self.send("array unset output") # better to clear the array before
self.send("mem2array output %d 0x%x %d" % (wordLen, address, n))
- output = [*map(int, self.send("ocd_echo $output").split(" "))]
+ output = [*map(int, self.send("echo $output").split(" "))]
d = dict([tuple(output[i:i + 2]) for i in range(0, len(output), 2)])
return [d[k] for k in sorted(d.keys())]
@@ -116,8 +116,8 @@ if __name__ == "__main__":
with OpenOcd() as ocd:
ocd.send("reset")
- show(ocd.send("ocd_echo \"echo says hi!\"")[:-1])
- show(ocd.send("capture \"ocd_halt\"")[:-1])
+ show(ocd.send("echo \"echo says hi!\"")[:-1])
+ show(ocd.send("capture \"halt\"")[:-1])
# Read the first few words at the RAM region (put starting adress of RAM
# region into 'addr')