]> git.sur5r.net Git - openocd/commit
target armv7m: multi-block erase check
authorTomas Vanek <vanekt@fbl.cz>
Thu, 23 Nov 2017 10:17:53 +0000 (11:17 +0100)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 10 Apr 2018 05:17:00 +0000 (06:17 +0100)
commita867e36f78be231bfdf5161ff7172bcf69aa6280
treef818ad876f2617d4d6aee4494a86c4ba1788a63b
parenteb8912ec38c0fd6867d2b5a88b40549f791ce7bb
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>
contrib/loaders/erase_check/Makefile
contrib/loaders/erase_check/armv7m_0_erase_check.inc [deleted file]
contrib/loaders/erase_check/armv7m_0_erase_check.s [deleted file]
contrib/loaders/erase_check/armv7m_erase_check.inc
contrib/loaders/erase_check/armv7m_erase_check.s
src/target/armv7m.c