diff options
Diffstat (limited to 'util/flash_ec')
-rwxr-xr-x | util/flash_ec | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/flash_ec b/util/flash_ec index 3278f1d8fd..0d840a9ae4 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -353,6 +353,11 @@ function flash_stm32_dfu() { fi SIZE=$(wc -c ${IMG} | cut -d' ' -f1) + # Remove read protection + sudo $DFU_UTIL -a 0 -s ${ADDR}:${SIZE}:force:unprotect -D "${IMG}" + # Wait for mass-erase and reboot after unprotection + sleep 1 + # Actual image flashing sudo $DFU_UTIL -a 0 -s ${ADDR}:${SIZE} -D "${IMG}" } |