Skip to content

Commit

Permalink
fix flashing to 'f0 device' targets (#595)
Browse files Browse the repository at this point in the history
Fixes #594. Pull request #592 (0498621) accidentally deleted the call to `set_flash_cr_pg`.
  • Loading branch information
skalidindi3 authored and xor-gate committed May 18, 2017
1 parent 0498621 commit 55c0572
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2001,6 +2001,9 @@ int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, uint32_t

/* unlock and set programming mode */
unlock_flash_if(sl);
if (sl->flash_type != STLINK_FLASH_TYPE_F1_XL) {
set_flash_cr_pg(sl);
}
DLOG("Finished unlocking flash, running loader!\n");
if (stlink_flash_loader_run(sl, &fl, addr + (uint32_t) off, base + off, size) == -1) {
ELOG("stlink_flash_loader_run(%#zx) failed! == -1\n", addr + off);
Expand Down

0 comments on commit 55c0572

Please sign in to comment.