aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2015-04-04 11:08:15 +0300
committerPaul Fertser <fercerpav@gmail.com>2015-04-16 20:29:06 +0100
commit03b72c367c327b4e0510fa65c9664fd62d3ca6af (patch)
treee386cdfd816c0f52c8f123553b17aedf732df26a /doc
parent14040c7a57320fd62386e2bbb16cd88044eb282a (diff)
downloadriscv-openocd-03b72c367c327b4e0510fa65c9664fd62d3ca6af.zip
riscv-openocd-03b72c367c327b4e0510fa65c9664fd62d3ca6af.tar.gz
riscv-openocd-03b72c367c327b4e0510fa65c9664fd62d3ca6af.tar.bz2
flash/nor/mdr: add docs, remove memory leak on probe()
This adds the mandatory Info documentation for the driver as well as the usage field. As a clean up, this also includes freeing of the allocated memory which results in a memory leak if probe is invoked multiple times. Valgrind-tested. Reported by Dmitry Shpak. Change-Id: I2b1d9b9e8b069c6665b11d880b40ce19a1b26ce6 Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2694 Tested-by: jenkins Reviewed-by: Дмитрий Шпак <disona@yandex.ru> Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'doc')
-rw-r--r--doc/openocd.texi25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 3573d6d..679d017 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -5874,6 +5874,31 @@ flash bank $_FLASHNAME mrvlqspi 0x0 0 0 0 $_TARGETNAME 0x46010000
@end deffn
+@deffn {Flash Driver} mdr
+This drivers handles the integrated NOR flash on Milandr Cortex-M
+based controllers. A known limitation is that the Info memory can't be
+read or verified as it's not memory mapped.
+
+@example
+flash bank <name> mdr <base> <size> 0 0 <target#> @var{type} @var{page_count} @var{sec_count}
+@end example
+
+@itemize @bullet
+@item @var{type} - 0 for main memory, 1 for info memory
+@item @var{page_count} - total number of pages
+@item @var{sec_count} - number of sector per page count
+@end itemize
+
+Example usage:
+@example
+if @{ [info exists IMEMORY] && [string equal $IMEMORY true] @} @{
+ flash bank $@{_CHIPNAME@}_info.flash mdr 0x00000000 0x01000 0 0 $_TARGETNAME 1 1 4
+@} else @{
+ flash bank $_CHIPNAME.flash mdr 0x00000000 0x20000 0 0 $_TARGETNAME 0 32 4
+@}
+@end example
+@end deffn
+
@section mFlash
@subsection mFlash Configuration