openocd/src
Tomas Vanek eb8912ec38 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>
2018-04-10 06:16:40 +01:00
..
flash target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
helper helper/types: cast to uint32_t,uint16_t to avoid UB by shifting int too far 2018-03-12 14:12:07 +00:00
jtag drivers/kitprog: workaround KitProg firmware bug of missing ZLP 2018-04-04 21:26:59 +01:00
pld Convert to non-recursive make 2016-12-08 16:23:10 +00:00
rtos rtos: Fix XPSR_OFFSET for cortex_m4f stacking 2018-04-07 20:33:39 +01:00
server gdb_server: gdb_memory_map() rework 2018-04-07 20:34:28 +01:00
svf svf: improve robustness when processing invalid SVF files 2018-03-13 08:41:21 +00:00
target target, flash: prepare infrastructure for multi-block blank check 2018-04-10 06:16:40 +01:00
transport configure: disable all drivers when zy1000 is enabled 2018-04-09 09:04:46 +01:00
xsvf Convert to non-recursive make 2016-12-08 16:23:10 +00:00
hello.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
Makefile.am Convert to non-recursive make 2016-12-08 16:23:10 +00:00
openocd.c jtag/core, target: unregister JTAG events 2018-03-30 10:15:23 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00