- minimum autoconf 2.59 is now required and verified - due to issues with AS_HELP_STRING
- native win32 now handles WSAECONNRESET - no longer exits openocd - qCRC packet now works correctly under cygwin (gdb compare-sections command) - removed __USE_GNU define from gdbserver.c - gdb qSupported packet is now handled, with this we are able to tell gdb packet size, memory map of target - added new target script gdb_program_config - called before gdb flash programming - new gdb server command gdb_memory_map (enable|disable> - default is disable - new gdb server command gdb_flash_program (enable|disable> - default is disable - gdb flash programming supported - vFlash packets - image_elf_read_section now does not clear any remaining data, this was causing the gdb checksum to fail with certain files - reformat of usbprog.c - memory leak in command_print fixed - updated texi doc to include new commands - added gdb programming section to docs git-svn-id: svn://svn.berlios.de/openocd/trunk@246 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -393,6 +393,9 @@ int handle_flash_erase_address_command(struct command_context_s *cmd_ctx, char *
|
||||
return ERROR_INVALID_ARGUMENTS;
|
||||
}
|
||||
|
||||
/* We can't know if we did a resume + halt, in which case we no longer know the erased state */
|
||||
flash_set_dirty();
|
||||
|
||||
duration_start_measure(&duration);
|
||||
|
||||
if ((retval = flash_erase(target, address, length)) != ERROR_OK)
|
||||
@@ -766,6 +769,21 @@ int handle_flash_write_binary_command(struct command_context_s *cmd_ctx, char *c
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
void flash_set_dirty(void)
|
||||
{
|
||||
flash_bank_t *c;
|
||||
int i;
|
||||
|
||||
/* set all flash to require erasing */
|
||||
for (c = flash_banks; c; c = c->next)
|
||||
{
|
||||
for (i = 0; i < c->num_sectors; i++)
|
||||
{
|
||||
c->sectors[i].is_erased = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* lookup flash bank by address */
|
||||
flash_bank_t *get_flash_bank_by_addr(target_t *target, u32 addr)
|
||||
{
|
||||
@@ -852,14 +870,8 @@ int flash_write(target_t *target, image_t *image, u32 *written, char **error_str
|
||||
{
|
||||
/* assume all sectors need erasing - stops any problems
|
||||
* when flash_write is called multiple times */
|
||||
|
||||
for (c = flash_banks; c; c = c->next)
|
||||
{
|
||||
for (i = 0; i < c->num_sectors; i++)
|
||||
{
|
||||
c->sectors[i].is_erased = 0;
|
||||
}
|
||||
}
|
||||
|
||||
flash_set_dirty();
|
||||
}
|
||||
|
||||
/* loop until we reach end of the image */
|
||||
|
||||
Reference in New Issue
Block a user