From: Fabien Le Mentec Date: Mon, 17 Oct 2011 20:06:23 +0000 (-0500) Subject: [update] documentation X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=7ca637b5132c8472df0ea1ea31a941d5575406e2;p=fw%2Fstlink [update] documentation --- diff --git a/doc/tutorial/tutorial.pdf b/doc/tutorial/tutorial.pdf index b84d061..2b4618f 100644 Binary files a/doc/tutorial/tutorial.pdf and b/doc/tutorial/tutorial.pdf differ diff --git a/doc/tutorial/tutorial.tex b/doc/tutorial/tutorial.tex index cef3632..e0e8d2d 100644 --- a/doc/tutorial/tutorial.tex +++ b/doc/tutorial/tutorial.tex @@ -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}