On Thursday 20 July 2006 23:38, Eli Zaretskii wrote: > > From: Vladimir Prus > > Date: Thu, 20 Jul 2006 13:42:30 +0400 > > > > +/* Calls the first non-null to_flash_done pointer in target_stack. */ > > +void target_flash_done (); > > Should this be a full prototype, including the parameters? > > > +target_write_memory_blocks (VEC(memory_write_request) > > *memory_write_requests, + int > > (*flash_write_allowed)(), > > + enum flash_preserve_mode > > (*preserve_flash)(), > > And the same for these two. > > > + error(_("Flash region erased by not written")); > > Did you maybe mean "... BUT not written"? If not, I cannot parse this > message. Patch updated per above comments, and rebased on current mainline is attached. - Volodya 2006-07-31 Vladimir Prus * Makefile.in (SFILES): Add target-memory.c. (COMMON_OBJS): Add target-memory.o. (target-memory.o): New, specify dependencies. * target.h (enum target_object): New value TARGET_OBJECT_FLASH. (struct target_ops): New methods to_flash_erase, and to_flash_done. (struct memory_write_request): New. (typedef target_write_memory_2_progress_cb): New (enum flash_preserve_mode): New. (target_flash_erase, target_flash_done) (target_write_memory_blocks): New. (target_write_partial): Declare. * target-memory.c: New. * symfile.c (add_section_size_callback): Remove. (struct load_section_data): New field memory_write_requests. Remove write_count, data_count, and total_size fields. (load_section_callback): Just record data to write, don't write. (allow_flash_write, dont_preserve_flash) (clear_memory_write_data): New. (donwload_progress_cb): New; (generic_load): Don't compute total size. Don't do memory transfers here. Call target_write_memory_blocks.