On Wed, Dec 23, 2009 at 1:47 PM, David Brownell <davi...@pacbell.net> wrote:
> On Wednesday 23 December 2009, Řyvind Harboe wrote:
>> I do think it might be useful to print actual address
>> ranges erased in some reasonably terse and non
>> warning format.
>
> If it's going to be erasing data beyond what it was told
> to erase, we deserve at the very least a warning.
>
> That's pretty basic:  don't destroy user data.  And if
> you must, at least warn that something may now be broken.

I think a note of actual address ranges erased could be good, but what
flash erase_address does is to identify *all* sectors in that range
and erase those
sectors.

So if you wanted some other functionality, then this command wasn't
for you.

> What we have right now is some upper layer calls (at
> least "write_image") that are trying to rely on a lower
> level interface that was dangerously broken ... when it
> should just be telling those lower level calls exactly
> what to do.

The flash erase address is doing precisely what it is told to:
erase all sectors in that address range. If that isn't what you wanted,
then use another function.

By making it do something else, the contract to the upper levels
is broken.

"flash write_image erase" will erase *all* sectors in the address ranges
of the image and then write the image to flash.

If this isn't clear from the documentation, then we should make it clear.


-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to