diff options
author | Chen-Tsung Hsieh <chentsung@chromium.org> | 2020-12-30 11:35:12 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-30 06:17:28 +0000 |
commit | 4b4a02b327103c92fa4a7d9cebc678dbee5826e8 (patch) | |
tree | 6a403a95d7273b4b308ea5af21a708a6a33adf0b | |
parent | 3657d037aea6d756645a552b546fd8f231b85fd5 (diff) | |
download | chrome-ec-4b4a02b327103c92fa4a7d9cebc678dbee5826e8.tar.gz |
flash_ec: add "-U" flags for stm32 chip
Disable the read protection with "-U" to program EC image. Some commands
(e.g. 0x73: Write Unprotect command, 0x44: Extended Erase command) will
return NACK if the read protection is enabled.
BUG=b:151098124
BRANCH=none
TEST=flash_ec --verbose --board=moonball --image moonball.bin
Signed-off-by: Chen-Tsung Hsieh <chentsung@chromium.org>
Change-Id: I7338cd5dd0b1dd29be1f35d5eda3dd938050ba40
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607024
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
-rwxr-xr-x | util/flash_ec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec index c829eca1b0..092bbeaa38 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -1120,7 +1120,7 @@ function flash_stm32() { if [[ -z "${IMG_READ}" ]]; then info "Programming EC firmware image." # Unprotect flash, erase, and write - local STM32MON_COMMAND="${STM32MON} ${STM32MON_OPT} -u -e -w" + local STM32MON_COMMAND="${STM32MON} ${STM32MON_OPT} -U -u -e -w" if [[ "${FLAGS_verbose}" == ${FLAGS_TRUE} ]]; then echo "${STM32MON_COMMAND} ${IMG}" fi |