target, flash: utility for riscv repeat_read command

Imported non-riscv part from
https://github.com/riscv-collab/riscv-openocd/pull/510
developed by Tim Newsome <tim@sifive.com>

Introduce target_handle_md_output() parameter include_address.
All callers set it true but riscv repeat_read command.

Change-Id: I67b5aad15a33ad149d4047998b22407cb60098fd
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: https://review.openocd.org/c/openocd/+/9127
Tested-by: jenkins
Reviewed-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
This commit is contained in:
Tomas Vanek
2025-09-13 23:01:33 +02:00
parent f354d259ff
commit a0eac82708
5 changed files with 9 additions and 7 deletions

View File

@@ -720,7 +720,8 @@ COMMAND_HANDLER(handle_flash_md_command)
retval = flash_driver_read(bank, buffer, offset, sizebytes);
if (retval == ERROR_OK)
target_handle_md_output(CMD, target, address, wordsize, count, buffer);
target_handle_md_output(CMD, target, address, wordsize, count,
buffer, true);
free(buffer);