X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=doc%2Fopenocd.texi;h=af1684d00da6c023264d59bf57b112b9071f3915;hb=5da746fa09dc1fbc28b4b4431035f5058a7e76a2;hp=c5a926ca86b5e3a8b7d4075f3451fbfe1d58fd5e;hpb=5a235226f0db67e85f9c71288dcd015e7081c37b;p=openocd.git diff --git a/doc/openocd.texi b/doc/openocd.texi index c5a926ca86..af1684d00d 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -4949,6 +4949,20 @@ flash drivers can distinguish between probing and autoprobing, but most don't bother. @end deffn +@section Preparing a Target before Flash Programming + +The target device should be in well defined state before the flash programming +begins. + +@emph{Always issue} @command{reset init} before @ref{flashprogrammingcommands,,Flash Programming Commands}. +Do not issue another @command{reset} or @command{reset halt} or @command{resume} +until the programming session is finished. + +If you use @ref{programmingusinggdb,,Programming using GDB}, +the target is prepared automatically in the event gdb-flash-erase-start + +The jimtcl script @command{program} calls @command{reset init} explicitly. + @section Erasing, Reading, Writing to Flash @cindex flash erasing @cindex flash reading @@ -5124,7 +5138,7 @@ command or the flash driver then it defaults to 0xff. @end deffn @anchor{program} -@deffn Command {program} filename [verify] [reset] [exit] [offset] +@deffn Command {program} filename [preverify] [verify] [reset] [exit] [offset] This is a helper script that simplifies using OpenOCD as a standalone programmer. The only required parameter is @option{filename}, the others are optional. @xref{Flash Programming}. @@ -6349,6 +6363,10 @@ works only for chips that do not have factory pre-programmed region 0 code. @end deffn +@deffn Command {nrf5 info} +Decodes and shows informations from FICR and UICR registers. +@end deffn + @end deffn @deffn {Flash Driver} ocl @@ -7503,7 +7521,7 @@ change any behavior. @chapter Flash Programming OpenOCD implements numerous ways to program the target flash, whether internal or external. -Programming can be achieved by either using GDB @ref{programmingusinggdb,,Programming using GDB}, +Programming can be achieved by either using @ref{programmingusinggdb,,Programming using GDB}, or using the commands given in @ref{flashprogrammingcommands,,Flash Programming Commands}. @*To simplify using the flash commands directly a jimtcl script is available that handles the programming and verify stage. @@ -7514,6 +7532,7 @@ The script is executed as follows and by default the following actions will be p @item 'init' is executed. @item 'reset init' is called to reset and halt the target, any 'reset init' scripts are executed. @item @code{flash write_image} is called to erase and write any flash using the filename given. +@item If the @option{preverify} parameter is given, the target is "verified" first and only flashed if this fails. @item @code{verify_image} is called if @option{verify} parameter is given. @item @code{reset run} is called if @option{reset} parameter is given. @item OpenOCD is shutdown if @option{exit} parameter is given.