diff options
author | Yen Lin <yelin@nvidia.com> | 2014-12-12 17:17:51 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-12-16 01:28:55 +0000 |
commit | 589836638254829fbb765b0d679b0e27d121c3fa (patch) | |
tree | 04d2b701381c7a9fb04d5af70767e0b82132eefe /util/stm32mon.c | |
parent | fb05f742233c146d8c9c5abb4e55ebd98d990711 (diff) | |
download | chrome-ec-589836638254829fbb765b0d679b0e27d121c3fa.tar.gz |
stm32mon: fix unable to flash to nyan board problem
When comparing chip name of "STM32L15", use strncmp to compare the
first 8 characters.
BUG=chrome-os-partner:34558
BRANCH=none
TEST=flash_ec --board nyan
Change-Id: I3318385cee1d4e4c4d9688591f7a7bfd46c54dee
Signed-off-by: Yen Lin <yelin@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/235511
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'util/stm32mon.c')
-rw-r--r-- | util/stm32mon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/stm32mon.c b/util/stm32mon.c index e1ce307075..2de9400ca4 100644 --- a/util/stm32mon.c +++ b/util/stm32mon.c @@ -903,7 +903,7 @@ int main(int argc, char **argv) command_write_unprotect(ser); if (flags & FLAG_ERASE || output_filename) { - if (!strcmp("STM32L15", chip->name)) { + if (!strncmp("STM32L15", chip->name, 8)) { /* Mass erase is not supported on STM32L15xx */ /* command_ext_erase(ser, ERASE_ALL, 0); */ int i, page_count = chip->flash_size / chip->page_size; |