Merge pull request #93 from richardeoin/stm_bugfix
[Bugfix] stm32f1_probe would always return true, breaking support for…
This commit is contained in:
commit
e4bb1e8c55
|
@ -161,8 +161,10 @@ bool stm32f1_probe(target *t)
|
|||
t->driver = "STM32F09";
|
||||
block_size = 0x800;
|
||||
break;
|
||||
default: /* NONE */
|
||||
return false;
|
||||
}
|
||||
if (t->driver) {
|
||||
|
||||
flash_size = (target_mem_read32(t, FLASHSIZE_F0) & 0xffff) *0x400;
|
||||
gdb_outf("flash size %d block_size %d\n", flash_size, block_size);
|
||||
target_add_ram(t, 0x20000000, 0x5000);
|
||||
|
@ -171,9 +173,6 @@ bool stm32f1_probe(target *t)
|
|||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void stm32f1_flash_unlock(target *t)
|
||||
{
|
||||
target_mem_write32(t, FLASH_KEYR, KEY1);
|
||||
|
@ -353,4 +352,3 @@ static bool stm32f1_cmd_option(target *t, int argc, char *argv[])
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue