diff options
author | Marc Schink <openocd-dev@marcschink.de> | 2019-07-01 14:34:30 +0200 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-08-04 09:08:18 +0100 |
commit | 320f7517c438b690039b6ea3d1320b04ccfabea1 (patch) | |
tree | 662d760c1f6221501f7febf17ff3adb0c2c26b16 /contrib | |
parent | 7a93c9e087b7cb0444068a3deb506eb127f758f0 (diff) | |
download | riscv-openocd-320f7517c438b690039b6ea3d1320b04ccfabea1.zip riscv-openocd-320f7517c438b690039b6ea3d1320b04ccfabea1.tar.gz riscv-openocd-320f7517c438b690039b6ea3d1320b04ccfabea1.tar.bz2 |
contrib/rpc_examples: Adapt to new command line handling
Change-Id: I844ef7fbf57a22097a936f4614b4a4c7e980bef6
Signed-off-by: Marc Schink <openocd-dev@marcschink.de>
Reviewed-on: http://openocd.zylin.com/5248
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/rpc_examples/ocd_rpc_example.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/rpc_examples/ocd_rpc_example.py b/contrib/rpc_examples/ocd_rpc_example.py index 196ea05..4b1516a 100755 --- a/contrib/rpc_examples/ocd_rpc_example.py +++ b/contrib/rpc_examples/ocd_rpc_example.py @@ -92,7 +92,7 @@ class OpenOcd: 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("echo $output").split(" "))] + output = [*map(int, self.send("return $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,7 +116,7 @@ if __name__ == "__main__": with OpenOcd() as ocd: ocd.send("reset") - show(ocd.send("echo \"echo says hi!\"")[:-1]) + show(ocd.send("capture { 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 |