From: Fabien Le Mentec Date: Sun, 23 Oct 2011 13:31:40 +0000 (-0500) Subject: [update] tutorial, led blinking from flash X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=fb841229139d1b72216148b2279000019ba37516;p=fw%2Fstlink [update] tutorial, led blinking from flash --- diff --git a/doc/tutorial/tutorial.pdf b/doc/tutorial/tutorial.pdf index 82372df..6481387 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 6d7773f..0437119 100644 --- a/doc/tutorial/tutorial.tex +++ b/doc/tutorial/tutorial.tex @@ -90,8 +90,8 @@ It includes: \newpage - -\section{Building and running a program} +\section{Building and running a program in SRAM} +\paragraph{} A simple LED blinking example is provided in the example directory. It is built using:\\ \begin{small} \begin{lstlisting}[frame=tb] @@ -154,10 +154,9 @@ The board BLUE and GREEN leds should be blinking (those leds are near the user a \newpage -\section{Reading and writing to flash} +\section{Building and flashing a program} \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:\\ +FLASH memory reading and writing is done by a separate tool, as shown below:\\ \begin{small} \begin{lstlisting}[frame=tb] # change to the flash tool directory @@ -177,6 +176,21 @@ $> ./flash write in.bin 0x8000000 \end{lstlisting} \end{small} +\paragraph{} +A LED blinking example is provided:\\ +\begin{small} +\begin{lstlisting}[frame=tb] +# build the example, resulting in blink.bin +$> cd stlink.git/example/blink_flash +$> PATH=$TOOLCHAIN_PATH:$PATH make CONFIG_STM32L_DISCOVERY=1 + +# write blink.bin into FLASH +$> sudo ./flash write blink.bin 0x08000000 +\end{lstlisting} +\end{small} + +\paragraph{} +Upon reset, the board LEDs should be blinking. \newpage \section{Building and installing the CHIBIOS kernel}