From 50b94628aec9b94e2aa6d326c48c896c718d7e46 Mon Sep 17 00:00:00 2001 From: dbrownell Date: Tue, 22 Sep 2009 05:39:06 +0000 Subject: Make it easier to erase or protect through to the end of a (NOR) flash chip: allow passing "last" as an alias for the number of the last sector. Improve several aspects of error checking while we're at it. From: Johnny Halfmoon git-svn-id: svn://svn.berlios.de/openocd/trunk@2746 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- doc/openocd.texi | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'doc') diff --git a/doc/openocd.texi b/doc/openocd.texi index 32501ca6..893d738c 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -3187,8 +3187,11 @@ and AT91SAM7 on-chip flash. @anchor{flash erase_sector} @deffn Command {flash erase_sector} num first last -Erase sectors in bank @var{num}, starting at sector @var{first} up to and including -@var{last}. Sector numbering starts at 0. +Erase sectors in bank @var{num}, starting at sector @var{first} +up to and including @var{last}. +Sector numbering starts at 0. +Providing a @var{last} sector of @option{last} +specifies "to the end of the flash bank". The @var{num} parameter is a value shown by @command{flash banks}. @end deffn @@ -3247,7 +3250,7 @@ and display that status. The @var{num} parameter is a value shown by @command{flash banks}. This is the only operation that updates the erase state information displayed by @option{flash info}. That means you have -to issue an @command{flash erase_check} command after erasing or programming the device +to issue a @command{flash erase_check} command after erasing or programming the device to get updated information. (Code execution may have invalidated any state records kept by OpenOCD.) @end deffn @@ -3259,9 +3262,12 @@ The information includes per-sector protect status. @end deffn @anchor{flash protect} -@deffn Command {flash protect} num first last (on|off) -Enable (@var{on}) or disable (@var{off}) protection of flash sectors -@var{first} to @var{last} of flash bank @var{num}. +@deffn Command {flash protect} num first last (@option{on}|@option{off}) +Enable (@option{on}) or disable (@option{off}) protection of flash sectors +in flash bank @var{num}, starting at sector @var{first} +and continuing up to and including @var{last}. +Providing a @var{last} sector of @option{last} +specifies "to the end of the flash bank". The @var{num} parameter is a value shown by @command{flash banks}. @end deffn -- cgit v1.2.3