aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarc Schink <dev@zapb.de>2021-06-04 15:04:54 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2022-03-05 13:11:25 +0000
commitda7328010165be6e0188100e79b9dab5c362e13b (patch)
treecc9ed8ddf2566e959e5333f1dced504926b7cb6c /doc
parent8b740af10dd37b08c27588f34942154b817bf6fc (diff)
downloadriscv-openocd-da7328010165be6e0188100e79b9dab5c362e13b.zip
riscv-openocd-da7328010165be6e0188100e79b9dab5c362e13b.tar.gz
riscv-openocd-da7328010165be6e0188100e79b9dab5c362e13b.tar.bz2
target/tcl: Add set_reg function
Change-Id: I97a01b93046cb7af289792489f77f5580312585a Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: https://review.openocd.org/c/openocd/+/5313 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/openocd.texi30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index fd4a81d..c0df9c9 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -5003,6 +5003,21 @@ and neither store nor return those values.
@end itemize
@end deffn
+@deffn {Command} {$target_name set_reg} dict
+Set register values of the target.
+
+@itemize
+@item @var{dict} ... Tcl dictionary with pairs of register names and values.
+@end itemize
+
+For example, the following command sets the value 0 to the program counter (pc)
+register and 0x1000 to the stack pointer (sp) register:
+
+@example
+set_reg @{pc 0 sp 0x1000@}
+@end example
+@end deffn
+
@deffn {Command} {$target_name cget} queryparm
Each configuration parameter accepted by
@command{$target_name configure}
@@ -8491,6 +8506,21 @@ Debug and trace infrastructure:
@end example
@end deffn
+@deffn {Command} {set_reg} dict
+Set register values of the target.
+
+@itemize
+@item @var{dict} ... Tcl dictionary with pairs of register names and values.
+@end itemize
+
+For example, the following command sets the value 0 to the program counter (pc)
+register and 0x1000 to the stack pointer (sp) register:
+
+@example
+set_reg @{pc 0 sp 0x1000@}
+@end example
+@end deffn
+
@deffn {Command} {halt} [ms]
@deffnx {Command} {wait_halt} [ms]
The @command{halt} command first sends a halt request to the target,