aboutsummaryrefslogtreecommitdiff
path: root/src/target/armv7m.h
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2017-11-23 09:18:24 +0100
committerTim Newsome <tim@sifive.com>2018-05-08 15:21:49 -0700
commit4a9c29b92147ef6ebf8dac44d74f8771c59206ce (patch)
treef6b5bf5d0b50c4d0502f66c47b8c96b6fbbe58f3 /src/target/armv7m.h
parent7982cc9a0cdf194d50efb1ff45855969f8a0e227 (diff)
downloadriscv-openocd-4a9c29b92147ef6ebf8dac44d74f8771c59206ce.zip
riscv-openocd-4a9c29b92147ef6ebf8dac44d74f8771c59206ce.tar.gz
riscv-openocd-4a9c29b92147ef6ebf8dac44d74f8771c59206ce.tar.bz2
target, flash: prepare infrastructure for multi-block blank check
'flash erase_check' command runs a check algorithm on a target if possible. The algorithm is run repeatedly for each flash sector. Unfortunately every start and stop of the algorithm impose not negligible overhead. In practice it means checking is faster than plain read only for sectors of size approx 4 kByte or bigger. And checking sectors as short as 512 bytes runs approx 4 times slower than plain read. The patch changes API call target_blank_check_memory() and related to take an array of sectors (or arbitrary memory blocks). Changes in target-specific checking routines are kept minimal. They use only the first block from the array and process it by the unchanged algorithm. default_flash_blank_check() routine repeats target_blank_check_memory() until all blocks are checked, so it works with both multi-block and single-block based checkers. Change-Id: I0e6c60f2d71364c9c07c09416b04de9268807f5e Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4297 Tested-by: jenkins Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
Diffstat (limited to 'src/target/armv7m.h')
-rw-r--r--src/target/armv7m.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/armv7m.h b/src/target/armv7m.h
index 6f5d6f9..01bf19e 100644
--- a/src/target/armv7m.h
+++ b/src/target/armv7m.h
@@ -225,7 +225,7 @@ int armv7m_restore_context(struct target *target);
int armv7m_checksum_memory(struct target *target,
target_addr_t address, uint32_t count, uint32_t *checksum);
int armv7m_blank_check_memory(struct target *target,
- target_addr_t address, uint32_t count, uint32_t *blank, uint8_t erased_value);
+ struct target_memory_check_block *blocks, int num_blocks, uint8_t erased_value);
int armv7m_maybe_skip_bkpt_inst(struct target *target, bool *inst_found);