Merge branch 'master' of github.com:UweBonnes/stlink

pull/52/head
Uwe Bonnes 2012-01-31 11:39:55 +01:00
commit 9e842c3aa5
1 zmienionych plików z 14 dodań i 8 usunięć

Wyświetl plik

@ -126,17 +126,23 @@ int main(int ac, char** av)
if (o.cmd == DO_WRITE) /* write */
{
if ((o.addr >= sl->flash_base) &&
(o.addr < sl->flash_base + sl->flash_size))
(o.addr < sl->flash_base + sl->flash_size)) {
err = stlink_fwrite_flash(sl, o.filename, o.addr);
else if ((o.addr >= sl->sram_base) &&
if (err == -1)
{
printf("stlink_fwrite_flash() == -1\n");
goto on_error;
}
}
else if ((o.addr >= sl->sram_base) &&
(o.addr < sl->sram_base + sl->sram_size))
err = stlink_fwrite_sram(sl, o.filename, o.addr);
if (err == -1)
{
printf("stlink_fwrite_flash() == -1\n");
goto on_error;
}
}
if (err == -1)
{
printf("stlink_sram_flash() == -1\n");
goto on_error;
}
}
else if (o.cmd == DO_ERASE)
{
err = stlink_erase_flash_mass(sl);