]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Update documentation
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 2 Feb 2015 16:01:36 +0000 (17:01 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 2 Feb 2015 16:01:36 +0000 (17:01 +0100)
doc/rpp_simulink.tex
rpp/lib

index 32bc57870045d62a2de8dd082281d198f31be3de..71f5e763397b61ede2aa59f037c0195081cfc110 100644 (file)
@@ -622,48 +622,52 @@ sudo apt-get install gcc
 For Windows, the C/C++ compiler is a part of Windows SDK, which is available from\\
 \url{http://www.microsoft.com/en-us/download/details.aspx?id=8279}
 
-\section{Project Installation}
+\section{Project installation}
 \label{sec-project-installation}
-The RPP software is distributed in three packages and a standalone pdf file,
-containing this documentation. Every package is named like
-\texttt{package\_name-version.zip}. The three packages are: 
+The RPP software is distributed in three packages and a standalone pdf
+file containing this documentation. Every package is named like
+\emph{$\langle$package\_name$\rangle$-version.zip}. The three packages
+are:
 
 \begin{description}
-\item[rpp-lib] Contains the source codes of the RPP library, described
+\item[rpp-lib] Contains the source code of the RPP library, described
   in Chapter \ref{chap-c-support-library}. If you want to make any
   changes in the drivers or RPP API, this library has to be compiled
   and linked with applications in the other two packages. The compile
   procedure can be found in Section \ref{sec-compilation}.
-\item[rpp-simulink] Contains source code of Matlab Simulink blocks,
-  demo models and scripts for downloading the generated firmware to
-  the target from the Matlab Simulink. Details can be found in Chapter
-  \ref{chap-simulink-coder-target}.
+\item[rpp-simulink] Contains the source code of Matlab Simulink
+  blocks, demo models and scripts for downloading the generated
+  firmware to the target from Matlab/Simulink. Details can be
+  found in Chapter \ref{chap-simulink-coder-target}.
 
   The package also contains the binary of the RPP Library and all
   headers and other files necessary for building and downloading the
   models.
 \item[rpp-test-sw] Contains an application for interactive testing and
-  control of the RPP board over the serial interface.
+  control of the RPP board over the serial interface. Details can be
+  found in Chapter~\ref{chap-rpp-test-software}.
 
   The package also contains the binary of the RPP Library and all
   headers and other files necessary for building and downloading the
   application.
 \end{description}
 
+The following sections describe how to start working with individual
+packages.
+
 \subsection{rpp-lib}
 \label{sec-rpp-lib-installation}
 
 This section describes how to open the rpp-lib project in Code
 Composer Studio and how to use the resulting static library in an
-application. This is necessary if you need to modify the library for
-some reason.
+application. This is only necessary if you need to modify the library
+for some reason.
 
 \begin{enumerate}
        \item Unzip the \texttt{rpp-lib-version.zip} file.
        \item Open the Code Composer Studio (see Section \ref{sec-ti-ccs}).
-       \item Follow the procedure for openning the projects in CCS in
-      Section \ref{sec-openning-of-existing-project} and open the
-      rpp-lib project.
+       \item Import the rpp-lib project as described in
+      Section~\ref{sec-openning-of-existing-project}.
     \item Compile the static library using the procedure from Section
       \ref{sec-compilation}. The compiled library \texttt{rpp-lib.lib}
       will appear in the project root directory.
@@ -1430,89 +1434,77 @@ library.
 \section{Compilation}
 \label{sec-compilation}
 
-The RPP Library can be compiled as a static library using a Code
-Composer Studio project. The compilation process will automatically
-update the generated binary static library file in the library root
-directory.
-
-For the compilation of the library as a static library open the Code
-Composer studio project \texttt{rpp-lib} (see
-Section~\ref{sec-openning-of-existing-project}) and build the project.
+To compile the library open the Code Composer studio project
+\texttt{rpp-lib} (see Section~\ref{sec-openning-of-existing-project})
+and build the project (\textsc{Project $\rightarrow$ Build Project}).
 If the build process is successful, the \texttt{rpp-lib.lib} file will
 appear in the library root directory.
 
-Because compilation of the libraries in Eclipse IDE can be error
-prone, there is a \texttt{Makefile} that allows to compile the
-libraries from the Linux terminal: 
-
+It is also possible to compile the library using the included
+\texttt{Makefile}. From the Linux command line run:
 \begin{lstlisting}[language=bash]
 cd <library-root>
 make lib
 \end{lstlisting}
+Note that this only works if Code Composer Studio is installed in
+\texttt{/opt/ti} directory. Otherwise, you have to set
+\texttt{CCS\_UTILS\_DIR} variable.
 
-or Windows command line:
-
+On Windows command line run:
 \begin{lstlisting}[language=bash]
 cd <library-root>
 set CCS_UTILS_DIR=C:\ti\ccsv5\utils
 "C:\ti\ccsv5\utils\bin\"gmake.exe lib
 \end{lstlisting}
 
-On Windows \texttt{gmake.exe} supplied with CCS is used instead of
-\texttt{make}. The \texttt{gmake.exe} uses variable \texttt{CCS\_UTILS\_DIR},
-which has to be set properly, before the build process is invoked. The variable
-can be set manually for one session by the \texttt{set} command like in the
-previous example or permanently in \texttt{\repo/Debug/GNUMakefile}.
+You have to use \texttt{gmake.exe} is instead of \texttt{make} and it
+is necessary to set variable \texttt{CCS\_UTILS\_DIR} manually. You
+can also edit \texttt{\repo/Debug/GNUmakefile} and set the variable
+there.
 
 Note that the Makefile still requires the Code Composer Studio (ARM
 compiler) to be installed because of the CGT.
 
-The relevant aspects for compiling and linking an application using the static
-libraries are: 
+\section{Compiling applications using the library}
+\label{sec:comp-appl-using}
+
+The relevant aspects for compiling and linking an application using
+the RPP library are summarized below.
+
+\subsection{ARM target (RPP board)}
+\label{sec:arm-target-rpp}
 
-\begin{itemize}
-       \item \textbf{ARM compilation using CCS for the RPP board:}
        \begin{compactitem}
-               \item Include headers files of the OS for which the library was
-compiled against. At the time of this writing the OS is FreeRTOS 7.0.2. See
-Section \ref{sec-software-architecture}
-               \item Include header files for the RPP library or for modules
-you want to use rpp\_can.h for CAN module for example.  
-               \item Add library \texttt{rpp-lib.lib} to the linker libraries.
-The RPP library \textbf{MUST} be looked for  before Texas Instruments support
-library \texttt{rtsv7R4\_T\_le\_v3D16\_eabi.lib}.
-               \item Configure linker to retain \texttt{.intvecs} section from
-RPP Library:\newline{}
-\texttt{--retain="rpp-lib.lib$\langle$sys\_intvecs.obj$\rangle$(.intvecs)"}
-               \item Use the provided linker command file
-\texttt{RM48L952FlashLnk.cmd}.  
+    \item Configure include search path to contain the directory of
+      used FreeRTOS version, e.g.
+      \texttt{\repo/os/7.0.2\_rm48/include}. See Section
+      \ref{sec-software-architecture}.
+    \item Include \texttt{rpp/rpp.h} header file or just the needed
+      peripheral specific header files such as \texttt{rpp/can.h}.
+    \item Add library \texttt{rpp-lib.lib} to the linker libraries.
+      The RPP library must be looked for before Texas Instruments
+      support library \texttt{rtsv7R4\_T\_le\_v3D16\_eabi.lib}.
+    \item Use the provided linker command file
+      \texttt{RM48L952FlashLnk.cmd}.
        \end{compactitem}
-       \item \textbf{x86(\_64) compilation using GCC for Simulation:}
+
+\subsection{POSIX target}
+\label{sec:posix-target}
+
        \begin{compactitem}
-               \item Include headers files of the OS for Simulation. At the
-time of this writing the OS is POSIX FreeRTOS 6.0.4.  
-               \item Include header files for the RPP library or for modules
-you want to use (rpp\_can.h for CAN module for example).  
-               \item Add library \texttt{librpp.a} to the linker libraries.
-               \item Add \texttt{pthread} to the linker libraries.
+    \item Include headers files of the OS for Simulation. At the time
+      of this writing the OS is POSIX FreeRTOS 6.0.4.
+    \item Include header files for the RPP library or for modules you
+      want to use (rpp\_can.h for CAN module for example).
+    \item Add library \texttt{librpp.a} to the linker libraries.
+    \item Add \texttt{pthread} to the linker libraries.
        \end{compactitem}
-\end{itemize}
-
-As an important note, all the models compiled using Simulink will link against
-\texttt{rpp-lib.lib}.  When compiling a Simulink model, neither Simulink nor the
-\texttt{make} invoked during the build process, will update the generated binary
-if the model hasn't changed, and then if the source code hasn't changed. Static
-libraries changes are not considered for re-compilation and re-linking. If
-library development is being done and static library is updated, in order for
-the Simulink model to generate a newly linked version of the binary the whole
-code generation folder needs to be deleted in order to force code generation,
-compilation and linking with the new static library.
 
 \section{Compiling API documentation}
 \label{sec-compiling-api-documentation}
-The RPP Layer is formatted using Doxygen documentation generator. This allows to
-generate a high quality API reference. To generate the API reference run in a
-Linux terminal:
+The documentation of the RPP layer is formatted using Doxygen
+documentation generator. This allows to generate a high quality API
+reference. To generate the API reference run in a Linux terminal:
 
 \lstset{language=bash}
 \begin{lstlisting}
@@ -1521,7 +1513,7 @@ make
 xdg-open html/index.html
 \end{lstlisting}
 
-The files under \texttt{\repo/rpp/lib/rpp/doc/api/content} are used for the API
+The files under \texttt{\repo/rpp/doc/api/content} are used for the API
 reference generation are their name is self-explanatory:
 
 \begin{verbatim}
diff --git a/rpp/lib b/rpp/lib
index 87e73677fdeec0e6434a7f86b8533935f002877b..d2effbc43952a447c183ce4f956262f546064e96 160000 (submodule)
--- a/rpp/lib
+++ b/rpp/lib
@@ -1 +1 @@
-Subproject commit 87e73677fdeec0e6434a7f86b8533935f002877b
+Subproject commit d2effbc43952a447c183ce4f956262f546064e96