Here is the patch for openocd.texi for load_image as requested.
Michal

On Wed, 2010-04-14 at 07:40 +0200, Øyvind Harboe wrote:
> > Perhaps adding this to openocd docs will help others.
> > I would think that adding a command
> > 'load_image_bin filename address length file_offset' would be helpful.
> 
> Why don't you write a small proc and add it as an example to the
> manual?
> 
> proc load_image_bin {a b c ...} {
>    load_image [expr.... ] a b c
> }
> 

diff --git a/doc/openocd.texi b/doc/openocd.texi
index bb8f3ab..57c30dc 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -5666,10 +5666,20 @@ separately.
 @end deffn
 
 @anchor{load_image}
-...@deffn Command {load_image} filename address [...@option{bin}|@option{ihex}|@option{elf}]
+...@deffn Command {load_image} filename address [...@option{bin}|@option{ihex}|@option{elf}] @option{min_addr} @option{max_length}]
 Load image from file @var{filename} to target memory at @var{address}.
 The file format may optionally be specified
-(@option{bin}, @option{ihex}, or @option{elf})
+(@option{bin}, @option{ihex}, or @option{elf}).
+In addition the following arguments may be specifed:
+...@var{min_addr} - ignore data below @var{min_addr} (this is w.r.t. to the target's @var{address})
+...@var{max_length} - maximum number of bytes to load.
+...@example
+proc load_image_bin @{fname foffset address length @} @{
+    # Load data from fname filename at foffset offset to
+    # target at address. Load at most length bytes.
+    load_image $fname [expr $address - $foffset] bin $address $length      
+...@}
+...@end example
 @end deffn
 
 @deffn Command {test_image} filename [address [...@option{bin}|@option{ihex}|@option{elf}]]
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to