]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Update creating new project section
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 12 Feb 2015 17:56:36 +0000 (18:56 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 12 Feb 2015 17:56:36 +0000 (18:56 +0100)
and user relative size of bitmap pictures rather than absolute ones.

doc/images/base_1.png
doc/images/base_2.png
doc/images/base_3.png
doc/images/debug_conf.png [new file with mode: 0644]
doc/images/debug_conf_flash.png [new file with mode: 0644]
doc/images/target_conf.png [new file with mode: 0644]
doc/rpp_simulink.tex

index b5ab858ed6c5bb5f90c11fb6c69549f2cfbaf2cc..133bd124f1a2a67a7d298a1adcd497eb1781e2d0 100644 (file)
Binary files a/doc/images/base_1.png and b/doc/images/base_1.png differ
index 9976a1e67fbb8ebacbb6bd9b8846cf68f9e36d9e..e9b84b7eda638d5eb3ba6bd54e9667a82f7b06b4 100644 (file)
Binary files a/doc/images/base_2.png and b/doc/images/base_2.png differ
index 2f6085b0fa6beca9711c52023abebcfd25f051aa..9976a1e67fbb8ebacbb6bd9b8846cf68f9e36d9e 100644 (file)
Binary files a/doc/images/base_3.png and b/doc/images/base_3.png differ
diff --git a/doc/images/debug_conf.png b/doc/images/debug_conf.png
new file mode 100644 (file)
index 0000000..bed1e8d
Binary files /dev/null and b/doc/images/debug_conf.png differ
diff --git a/doc/images/debug_conf_flash.png b/doc/images/debug_conf_flash.png
new file mode 100644 (file)
index 0000000..1bb7f61
Binary files /dev/null and b/doc/images/debug_conf_flash.png differ
diff --git a/doc/images/target_conf.png b/doc/images/target_conf.png
new file mode 100644 (file)
index 0000000..0ddf591
Binary files /dev/null and b/doc/images/target_conf.png differ
index 8bbb43f76afdc195ab54300461758647818e70e4..f07a429c0a858830df9f4e47e1e6f4619028e5b8 100644 (file)
@@ -751,15 +751,19 @@ the standard Eclipse IDE.
        \label{fig-select-project}
 \end{center}\end{figure}
 
+\newpage
 \subsection{Creating new project}
 Follow these steps to create an application for RM48 MCU compiled with
 CGT.
-\newpage
+
 \begin{compactenum}
-\item Create a new empty CCS project.\\
-  \noindent\includegraphics[width=400px]{images/base_1.png}
+\item Create a new empty CCS project.
+
+  \noindent\includegraphics[scale=0.45]{images/base_1.png}
+
 \item In \textsc{Project Explorer}, create normal folders
   named \texttt{include} and \texttt{src}.
+
 \item If you use Git version control system, add \texttt{.gitignore}
   file with the following content to the root of that project:
   \lstset{language=}
@@ -768,25 +772,81 @@ Debug
 Release
 .settings/*
 \end{lstlisting}
+
   \newpage
 \item In project \textsc{Properties}, add new variable of type
-\texttt{Directory} named \texttt{RPP\_LIB\_ROOT} and point to the rpp
-library repository root.\\ \noindent\includegraphics[width=400px]{images/base_2.png}
+  \texttt{Directory} named \texttt{RPP\_LIB\_ROOT} and set it to the
+  rpp-lib directory
+  root.
+
+  \noindent\includegraphics[scale=.45]{images/base_2.png}
+
 \item Add \texttt{rpp-lib.lib} static library to list of linked
-  libraries and add \texttt{RPP\_LIB\_ROOT} to the library search
-  path.\newline{}
-\noindent\includegraphics[width=400px]{images/base_3.png}
-\newpage
-\item Configure compiler to include local includes, OS includes for
-RM48 and RPP includes, in that order.\newline{}
-\noindent\includegraphics[width=350px]{images/base_5.png}
-\newpage
-       \item Configure compiler to allow GCC extensions.\newline{}
-\noindent\includegraphics[width=400px]{images/base_6.png}
-\item Replace the board upload descriptor \texttt{RM48L952.ccxml} in
-\texttt{targeConfigs} directory with the right one from a \texttt{rpp-test-sw}
-project.
-\item Create source file \texttt{main.c} in \texttt{src} folder.
+  libraries and add \texttt{\$\{RPP\_LIB\_ROOT\}} to the library search
+  path.
+
+  \noindent\includegraphics[scale=.45]{images/base_3.png}
+
+  \newpage
+\item Configure compiler \#include search path to contain project
+  includes, OS includes for RM48 and RPP includes, in that
+  order.
+
+  \noindent\includegraphics[scale=.45]{images/base_5.png}
+
+\item Configure the compiler to allow GCC extensions.
+
+  \noindent\includegraphics[width=.95\linewidth]{images/base_6.png}
+
+\item Create \texttt{main.c} file with the following content:
+\begin{lstlisting}[language=C]
+#include <rpp/rpp.h>
+
+int main(void)
+{
+       rpp_init();
+       rpp_sci_printf("Hello world\n");
+       vTaskStartScheduler();
+       return 0;
+}
+
+void vApplicationMallocFailedHook()
+{}
+void vApplicationStackOverflowHook()
+{}
+\end{lstlisting}
+
+\item Compile the application by e.g. \textsc{Project $\rightarrow$
+    Build All}.
+\item If not already created, create new target configuration. Select
+  \textsc{Windows $\rightarrow$ Show View $\rightarrow$ Target
+    Configurations}. In the shown window, click on \textsc{New Target
+    Configuration} icon and configure XDS100v2 connection and RM48L952
+  device as shown below. Click \textsc{Save}, connect your board and
+  click \textsc{Test Connection}.
+
+  \medskip
+  \includegraphics[width=\linewidth]{images/target_conf.png}
+
+\item Select \textsc{Run $\rightarrow$ Debug Configurations...}.
+  Create \textsc{New launch configuration}, give it a name and select
+  the Target configuration created in the previous step.
+
+  \includegraphics[width=\linewidth]{images/debug_conf.png}
+
+  Then switch to the \textsc{Program} tab and select the newly created
+  project by clicking the \textsc{Workspace...} button.
+
+  Optionally, you can tune settings in the \textsc{Target} tab. For
+  example, it is useful not to erase the whole flash, but only
+  necessary sectors (see the figure below). 
+
+  \includegraphics[width=\linewidth]{images/debug_conf_flash.png}
+
+\item Click \textsc{Debug}.
+
+TODO nefunguje to - proč?????
+
 \end{compactenum}
 
 \subsubsection{Steps to configure new POSIX application:}
@@ -809,14 +869,14 @@ Release
 \newpage
        \item Add new variable \texttt{RPP\_LIB\_ROOT} and point to this
 repository branch root.\newline{}
-\noindent\includegraphics[width=400px]{images/base_posix_1.png}
+\noindent\includegraphics[width=\linewidth]{images/base_posix_1.png}
        \item Configure compiler to include local includes, CCS application
 includes, OS includes for POSIX and RPP includes, in that order.\newline{}
-\noindent\includegraphics[width=400px]{images/base_posix_2.png}
+\noindent\includegraphics[width=\linewidth]{images/base_posix_2.png}
 \newpage
        \item Add \texttt{rpp} and \texttt{pthread} to linker libraries and add
 \texttt{RPP\_LIB\_ROOT} to the library search path.\newline{}
-\noindent\includegraphics[width=400px]{images/base_posix_3.png}
+\noindent\includegraphics[width=\linewidth]{images/base_posix_3.png}
 \end{compactenum}
 
 \subsubsection{Content of the application}
@@ -1017,13 +1077,13 @@ should look like in Figure~\ref{fig-debug-conf-main-diag}.
 \end{enumerate}
 
 \begin{figure}[H]\begin{center}
-       \includegraphics[width=350px]{images/new_empty_project.png}
+       \includegraphics[scale=.45]{images/new_empty_project.png}
        \caption{New empty project dialog}
        \label{fig-new-empty-project}
 \end{center}\end{figure}
 
 \begin{figure}[H]\begin{center}
-       \includegraphics[width=350px]{images/debug_configuration_main.png}
+       \includegraphics[scale=.45]{images/debug_configuration_main.png}
        \caption{Debug Configuration Main dialog}
        \label{fig-debug-conf-main-diag}
 \end{center}\end{figure}
@@ -1044,7 +1104,7 @@ and close the dialog.
 \end{enumerate}
 
 \begin{figure}[H]\begin{center}
-       \includegraphics[width=350px]{images/debug_configuration_program.png}
+       \includegraphics[scale=.45]{images/debug_configuration_program.png}
        \caption{Configuration Program dialog}
        \label{fig-debug-conf-program-diag}
 \end{center}\end{figure}
@@ -1181,7 +1241,7 @@ Section~\ref{sec-running-model-on-hw}.
         \item Tasking mode: \textit{SingleTasking}.
           \begin{figure}
                 \centering
-                \includegraphics[width=400px]{images/simulink_solver.png}
+                \includegraphics[scale=.45]{images/simulink_solver.png}
                 \caption{Solver settings}
                 \label{fig-solver}
        \end{figure}
@@ -1192,7 +1252,7 @@ Section~\ref{sec-running-model-on-hw}.
 %        time''. It's ok for the source blocks to run once per tick.
 %         \begin{figure}
 %               \centering
-%               \includegraphics[width=400px]{images/simulink_diagnostics.png}
+%               \includegraphics[scale=.45]{images/simulink_diagnostics.png}
 %               \caption{Sample Time settings}
 %               \label{fig-sample-time-settings}
 %      \end{figure}
@@ -1202,7 +1262,7 @@ Section~\ref{sec-running-model-on-hw}.
         \item Set ``System target file'' to \texttt{rpp.tlc}.
           \begin{figure}
                 \centering
-                \includegraphics[width=400px]{images/simulink_code.png}
+                \includegraphics[scale=.45]{images/simulink_code.png}
                 \caption{Code Generation settings}
                 \label{fig-code-gen-settings}
        \end{figure}
@@ -1540,7 +1600,7 @@ board.
 
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=300px]{images/tlc_process.png}
+\includegraphics[scale=.45]{images/tlc_process.png}
 \caption{TLC code generation process. \cite[p. 1-6]{targetlanguagecompiler2013}}
 \end{center}\end{figure}
 
@@ -1712,7 +1772,7 @@ diagram \ref{fig-sfunctions-process}:
 
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=250px]{images/sfunctions_process.png}
+\includegraphics[scale=.45]{images/sfunctions_process.png}
 \caption{Simulation cycle of a S-Function. \cite[p. 57]{simulinkdevelopingsfunctions2013}}
 \label{fig-sfunctions-process}
 \end{center}\end{figure}
@@ -1905,7 +1965,7 @@ In the reference below you can find a complete description for each of the demos
 \subsection{ADC demo}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_adc.png}
+\includegraphics[scale=.45]{images/demo_adc.png}
 \caption{Example of the usage of the Analog Input blocks for RPP.}
 \end{center}\end{figure}
 
@@ -1918,7 +1978,7 @@ Serial Interface.
 \subsection{Simple CAN demo}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_simple_can.png}
+\includegraphics[scale=.45]{images/demo_simple_can.png}
 \caption{The simplest CAN demonstration.}
 \end{center}\end{figure}
 
@@ -1930,7 +1990,7 @@ testing the CAN configuration and transmission.
 \subsection{CAN transmit}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_cantransmit.png}
+\includegraphics[scale=.45]{images/demo_cantransmit.png}
 \caption{Example of the usage of the CAN blocks for RPP.}
 \end{center}\end{figure}
 
@@ -1957,7 +2017,7 @@ Demostrates how to use CAN Receive blocks in order to:
 \subsection{Simulink Demo model}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_board.png}
+\includegraphics[scale=.45]{images/demo_board.png}
 \caption{Model of the complex demonstration of the boards peripherals.}
 \end{center}\end{figure}
 
@@ -1977,7 +2037,7 @@ Information about the state of the application are printed on the Serial Interfa
 \subsection{Echo char}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_echo_char.png}
+\includegraphics[scale=.45]{images/demo_echo_char.png}
 \caption{Echo Character Simulink demo for RPP.}
 \end{center}\end{figure}
 
@@ -1992,7 +2052,7 @@ if data is received, that is, Serial Receive output is non-negative. Negative va
 \subsection{GIO demo}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_gio.png}
+\includegraphics[scale=.45]{images/demo_gio.png}
 \caption{Demonstration of DIN and DOUT blocks}
 \end{center}\end{figure}
 
@@ -2005,7 +2065,7 @@ on the Serial Interface with the same period.
 \subsection{Hello world}
 \begin{figure}[H]\begin{center}
 \noindent
-\includegraphics[width=450px]{images/demo_hello_world.png}
+\includegraphics[scale=.45]{images/demo_hello_world.png}
 \caption{Hello World Simulink demo for RPP.}
 \end{center}\end{figure}