This is an automated email from Gerrit.

Antonio Borneo (borneo.anto...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5220

-- gerrit

commit 1569bf1ef553da491e8aa9c0461f8bd53a8181c4
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Thu Jun 6 22:47:08 2019 +0200

    target: mwX command: report error on write failure
    
    In case of memory write error the error code is properly
    propagated but there is no error message.
    
    Issue a generic error message using command_print().
    
    Change-Id: Icf6ac61747fe4cbedb5a5244744dca2be9b74890
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>
    Reported-by: Christopher Head <ch...@zaber.com>

diff --git a/src/target/target.c b/src/target/target.c
index 1e42c5e..e42efa4 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3344,7 +3344,10 @@ COMMAND_HANDLER(handle_mw_command)
                        return ERROR_COMMAND_SYNTAX_ERROR;
        }
 
-       return target_fill_mem(target, address, fn, wordsize, value, count);
+       int retval = target_fill_mem(target, address, fn, wordsize, value, 
count);
+       if (retval != ERROR_OK)
+               command_print(CMD, "Error writing memory at 0x%" 
TARGET_PRIxADDR, address);
+       return retval;
 }
 
 static COMMAND_HELPER(parse_load_image_command_CMD_ARGV, struct image *image,

-- 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to