- stm32 erase will use mass_erase if all banks selected

git-svn-id: svn://svn.berlios.de/openocd/trunk@706 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
ntfreak
2008-06-06 09:29:21 +00:00
parent c526c43c43
commit ba8c605da4
2 changed files with 55 additions and 37 deletions

View File

@@ -1007,15 +1007,20 @@ int stellaris_handle_mass_erase_command(struct command_context_s *cmd_ctx, char
return ERROR_OK;
}
stellaris_mass_erase(bank);
/* set all sectors as erased */
for (i = 0; i < bank->num_sectors; i++)
if (stellaris_mass_erase(bank) == ERROR_OK)
{
bank->sectors[i].is_erased = 1;
/* set all sectors as erased */
for (i = 0; i < bank->num_sectors; i++)
{
bank->sectors[i].is_erased = 1;
}
command_print(cmd_ctx, "stellaris mass erase complete");
}
else
{
command_print(cmd_ctx, "stellaris mass erase failed");
}
command_print(cmd_ctx, "stellaris mass erase complete");
return ERROR_OK;
}