X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=doc%2Ftutorial%2Ftutorial.tex;fp=doc%2Ftutorial%2Ftutorial.tex;h=0437119c1351ed910d1d02a78078b0ab6f80c602;hb=0ff09f90ce176d0700eb88ec1ee1ec3932978c73;hp=6d7773f9cfaefa05a6394972ff4a6decbb8ec246;hpb=13c0da3bccf358150e11eab21d28d618db5ab25f;p=fw%2Fstlink 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}