diff options
author | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-05-24 14:19:42 +0000 |
---|---|---|
committer | ntfreak <ntfreak@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2008-05-24 14:19:42 +0000 |
commit | 7f19b91c80a9e9ba0897388d3eb0f16f0a857210 (patch) | |
tree | 889db2351b8f3a56c639443e4dfb4be0a3761106 | |
parent | 8b916771331a17231c9501d86b10e6bd37bfae2c (diff) | |
download | openocd+libswd-7f19b91c80a9e9ba0897388d3eb0f16f0a857210.tar.gz openocd+libswd-7f19b91c80a9e9ba0897388d3eb0f16f0a857210.tar.bz2 openocd+libswd-7f19b91c80a9e9ba0897388d3eb0f16f0a857210.tar.xz openocd+libswd-7f19b91c80a9e9ba0897388d3eb0f16f0a857210.zip |
- update sectors on stm32x mass erase
git-svn-id: svn://svn.berlios.de/openocd/trunk@681 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r-- | src/flash/stm32x.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/flash/stm32x.c b/src/flash/stm32x.c index 6742d010..d3e167d9 100644 --- a/src/flash/stm32x.c +++ b/src/flash/stm32x.c @@ -935,6 +935,7 @@ int stm32x_handle_mass_erase_command(struct command_context_s *cmd_ctx, char *cm stm32x_flash_bank_t *stm32x_info = NULL; flash_bank_t *bank; u32 status; + int i; if (argc < 1) { @@ -982,6 +983,12 @@ int stm32x_handle_mass_erase_command(struct command_context_s *cmd_ctx, char *cm return ERROR_OK; } + /* set all sectors as erased */ + for (i = 0; i < bank->num_sectors; i++) + { + bank->sectors[i].is_erased = 1; + } + command_print(cmd_ctx, "stm32x mass erase complete"); return ERROR_OK; |