openocd/src/flash/nor
David Brownell 73566405b6 NOR: add optional "flash erase_address" sector padding
Add a NOR flash mechanism where erase_address ranges can be padded
out to sector boundaries, triggering a diagnostic:

  > flash erase_address 0x0001f980 16
  address range 0x0001f980 .. 0x0001f98f is not sector-aligned
  Command handler execution failed
  in procedure 'flash' called at file "command.c", line 647
  called at file "command.c", line 361
  >

  > flash erase_address pad 0x0001f980 16
  Adding extra erase range, 0x0001f800 to 0x0001f97f
  Adding extra erase range, 0x0001f990 to 0x0001fbff
  erased address 0x0001f980 (length 16) in 0.095975s (0.163 kb/s)
  >

This addresses what would otherwise be something of a functional
regression.  An earlier version of the interface had a dangerous
problem:  it would silently erase data outside the range it was
told to erase.  Fixing that bug turned up some folk who relied on
that unsafe behavior.  (The classic problem with interface bugs!)
Now they can get that behavior again.  If they really need it,
just specify "pad".

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2010-01-13 23:33:25 -08:00
..
Makefile.am build: add build/src to include path 2009-12-08 10:16:10 +01:00
aduc702x.c ARM: use <target/arm.h> not armv4_5.h 2009-12-07 14:57:44 -08:00
at91sam3.c src/flash/nor: usage/help/doc updates 2010-01-09 10:25:03 -08:00
at91sam3.h move nor drivers to src/flash/nor 2009-12-02 23:27:09 -08:00
at91sam7.c src/flash/nor: usage/help/doc updates 2010-01-09 10:25:03 -08:00
at91sam7.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
avrf.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
avrf.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
cfi.c ARM: use <target/arm.h> not armv4_5.h 2009-12-07 14:57:44 -08:00
cfi.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
core.c NOR: add optional "flash erase_address" sector padding 2010-01-13 23:33:25 -08:00
core.h NOR: add optional "flash erase_address" sector padding 2010-01-13 23:33:25 -08:00
driver.h split flash.h into into flash/nor/*.h 2009-12-04 16:56:24 -08:00
drivers.c split flash.h into into flash/nor/*.h 2009-12-04 16:56:24 -08:00
ecos.c ARM: rename armv4_5_algorithm as arm_algorithm 2009-12-04 20:19:49 -08:00
faux.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
imp.h Comment and doxygen fixes 2009-12-09 10:25:52 -08:00
lpc288x.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
lpc288x.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
lpc2000.c LPC2000: rename "r13_svc" as "sp_svc" 2009-12-12 15:43:02 -08:00
lpc2000.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
lpc2900.c src/flash/nor: usage/help/doc updates 2010-01-09 10:25:03 -08:00
non_cfi.c NOR: add 29LV400BC flash device 2009-12-05 11:12:59 -08:00
non_cfi.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
ocl.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
ocl.h move nor drivers to src/flash/nor 2009-12-02 23:27:09 -08:00
pic32mx.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
pic32mx.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
stellaris.c streamline and document helptext mode displays 2010-01-02 15:52:35 -08:00
stellaris.h stellaris: comments 2009-12-16 14:17:31 -08:00
stm32x.c src/flash/nor: usage/help/doc updates 2010-01-09 10:25:03 -08:00
stm32x.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
str7x.c ARM: use <target/arm.h> not armv4_5.h 2009-12-07 14:57:44 -08:00
str7x.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
str9x.c src/flash/nor: usage/help/doc updates 2010-01-09 10:25:03 -08:00
str9x.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
str9xpec.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
str9xpec.h remove flash.h from tree 2009-12-04 16:56:24 -08:00
tcl.c NOR: add optional "flash erase_address" sector padding 2010-01-13 23:33:25 -08:00
tms470.c remove target.h from flash.h 2009-12-04 16:56:23 -08:00
tms470.h remove flash.h from tree 2009-12-04 16:56:24 -08:00