riscv-openocd/contrib/loaders/erase_check
Tomas Vanek a867e36f78 target armv7m: multi-block erase check
Tested on PSoC6 (Cortex-M0+ core), onboard KitProg2 in CMSIS-DAP mode,
adapter_khz=1000.
Plain read:
	flash read_bank 0 /dev/null
takes 48 seconds.

erase_check without this change:
	flash erase_check 0
takes horrible 149 seconds!!

And the same command with the change applied takes 1.8 seconds.
Quite a difference.

Remove the erase-value=0 version of algorithm as the new one can check
for any value.

If the target is an insane slow clocked CPU (under 1MHz) algo
timeouts. Blocks checked so far are returned and the next call
uses increased timeout.

Change-Id: Ic0899011256d2114112e67c0b51fab4f6230d9cd
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/4298
Tested-by: jenkins
Reviewed-by: Jonas Norling <jonas.norling@cyanconnode.com>
Reviewed-by: Andreas Bolsch <hyphen0break@gmail.com>
2018-04-10 06:17:00 +01:00
..
Makefile target armv7m: multi-block erase check 2018-04-10 06:17:00 +01:00
armv4_5_erase_check.inc armv4_5: Integrate build of erase check code 2016-05-22 15:50:49 +01:00
armv4_5_erase_check.s armv4_5: Integrate build of erase check code 2016-05-22 15:50:49 +01:00
armv7m_erase_check.inc target armv7m: multi-block erase check 2018-04-10 06:17:00 +01:00
armv7m_erase_check.s target armv7m: multi-block erase check 2018-04-10 06:17:00 +01:00
stm8_erase_check.inc stm8 : new target 2017-12-07 07:53:13 +00:00
stm8_erase_check.s stm8 : new target 2017-12-07 07:53:13 +00:00