This is an automated email from Gerrit.

Steven Stallion ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/4781

-- gerrit

commit 324d491df7a17c71a0f08c13fb2526fe07d1fbfd
Author: Steven Stallion <[email protected]>
Date:   Mon Nov 26 20:01:34 2018 -0600

    mem_helper: add mrh command
    
    This patch adds support for reading halfword values from memory. This
    command compliments existing support for writing halfwords (mwh).
    
    Change-Id: I8ec628e65c05a7f00aa57e3af0f228eb8bd4d14e
    Signed-off-by: Steven Stallion <[email protected]>

diff --git a/tcl/mem_helper.tcl b/tcl/mem_helper.tcl
index 86ad00f..5955793 100644
--- a/tcl/mem_helper.tcl
+++ b/tcl/mem_helper.tcl
@@ -10,6 +10,17 @@ proc mrw {reg} {
 add_usage_text mrw "address"
 add_help_text mrw "Returns value of word in memory."
 
+# mrh: "memory read halfword", returns value of $reg
+proc mrh {reg} {
+       set value ""
+       mem2array value 16 $reg 1
+       return $value(0)
+}
+
+add_usage_text mrh "address"
+add_help_text mrh "Returns value of halfword in memory."
+
+# mrb: "memory read byte", returns value of $reg
 proc mrb {reg} {
        set value ""
        mem2array value 8 $reg 1

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to