[update] documentation
authorFabien Le Mentec <texane@gmail.com>
Mon, 17 Oct 2011 20:06:23 +0000 (15:06 -0500)
committerFabien Le Mentec <texane@gmail.com>
Mon, 17 Oct 2011 20:06:23 +0000 (15:06 -0500)
doc/tutorial/tutorial.pdf
doc/tutorial/tutorial.tex

index b84d061f57921ebc02df6a11261675a97c3d31fa..2b4618ff5b52877f2147399ca583b6204f8e9959 100644 (file)
Binary files a/doc/tutorial/tutorial.pdf and b/doc/tutorial/tutorial.pdf differ
index cef3632ac51a4cfefc36de88965c664dd3d0c78d..e0e8d2d73a1fe8a4caba5ca80b0dc140ffc87cde 100644 (file)
@@ -144,6 +144,31 @@ $> continue
 The board BLUE and GREEN leds should be blinking (those leds are near the user and reset buttons).
 
 
+\newpage
+\section{Reading and writing to flash}
+\paragraph{}
+Flash memory reading and writing is done by a separate tool. A binary running in flash is assumed to
+be linked against address 0x8000000. The flash tool is then used as shown below:\\
+\begin{small}
+\begin{lstlisting}[frame=tb]
+# build the flash tool
+$> cd stlink.git/flash ; make ;
+
+# stlinkv1 command to read 4096 from flash into out.bin
+$> ./flash read /dev/sg2 out.bin 0x8000000 4096
+
+# stlinkv2 command
+$> ./flash read out.bin 0x8000000 4096
+
+# stlinkv1 command to write the file in.bin into flash
+$> ./flash write /dev/sg2 in.bin 0x8000000
+
+# stlinkv2 command
+$> ./flash write in.bin 0x8000000
+\end{lstlisting}
+\end{small}
+
+
 \newpage
 \section{Notes}