From: Uwe Bonnes Date: Thu, 2 Feb 2012 21:49:33 +0000 (+0100) Subject: Fix the progress indicator for F2/F4 flash writing X-Git-Url: https://git.gag.com/?p=fw%2Fstlink;a=commitdiff_plain;h=132491480619da445b03b55fae7eeed0b1044da5 Fix the progress indicator for F2/F4 flash writing --- diff --git a/src/stlink-common.c b/src/stlink-common.c index 294f932..68b7d50 100644 --- a/src/stlink-common.c +++ b/src/stlink-common.c @@ -1377,7 +1377,7 @@ int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, unsigned /* show progress. writing procedure is slow and previous errors are misleading */ const uint32_t pgnum = (off / PROGRESS_CHUNK_SIZE)+1; - const uint32_t pgcount = len / PROGRESS_CHUNK_SIZE; + const uint32_t pgcount = len / PROGRESS_CHUNK_SIZE +1; fprintf(stdout, "Writing %ukB chunk %u out of %u\n", PROGRESS_CHUNK_SIZE/1024, pgnum, pgcount); } }