Skip to content

Commit

Permalink
Fixed flash-write/verify error
Browse files Browse the repository at this point in the history
(Closes #1303)
  • Loading branch information
Nightwalker-87 committed Jun 9, 2023
1 parent fc99064 commit efc5c37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/stlink-lib/common_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,9 +1439,6 @@ int32_t stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t *base, uint3
(uint32_t)(sl->flash_pgsz));
return (-1);
}
if ((len % 16 <= 8) & (sl->flash_type == STM32_FLASH_TYPE_L5_U5)) {
len += 8;
}

// make sure we've loaded the context with the chip details
stlink_core_id(sl);
Expand Down
2 changes: 1 addition & 1 deletion src/stlink-lib/flash_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ int32_t stm32l1_write_half_pages(stlink_t *sl, stm32_addr_t addr, uint8_t *base,

if (sl->verbose >= 1) {
// show progress; writing procedure is slow and previous errors are misleading
fprintf(stdout, "\r%3u/%u halfpages written", count + 1, num_half_pages);
fprintf(stdout, "\r%3u/%3u halfpages written", count + 1, num_half_pages);
fflush(stdout);
}

Expand Down

0 comments on commit efc5c37

Please sign in to comment.