For 0.4 revert to erasing *all* flash within a region. Perhaps
the right thing to do would be to change the memory map packet
to return flash sectors?

Signed-off-by: Øyvind Harboe <oyvind.har...@zylin.com>
---
 src/server/gdb_server.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index d656745..a3875cf 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -1932,11 +1932,16 @@ int gdb_v_packet(struct connection *connection, struct 
target *target, char *pac
                                TARGET_EVENT_GDB_FLASH_ERASE_START);
 
                /* vFlashErase:addr,length messages require region start and
-                * end to be "block" aligned ... if padding is ever needed,
-                * GDB will have become dangerously confused.
+                * end to be "block" aligned ...
+                *
+                * However, there might be a problem with the implementation of
+                * memory map returned from the GDB server and for 0.4, it might
+                * be safer to revert to the 0.3 behavior of erasing all flash 
that
+                * falls within this region.
+                *
                 */
                result = flash_erase_address_range(gdb_service->target,
-                               false, addr, length);
+                               true, addr, length);
 
                /* perform any target specific operations after the erase */
                target_call_event_callbacks(gdb_service->target,
-- 
1.6.3.3

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to