]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Auto loading to Flash disabled, library and documentation updated
authorMichal Horn <hornmich@fel.cvut.cz>
Wed, 15 Oct 2014 13:15:17 +0000 (15:15 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Wed, 15 Oct 2014 13:15:17 +0000 (15:15 +0200)
Some models had loading to Flash enabled, which caused the
rpp_compile_blocks to fail, when rpp board is disconnected.

The library and documentation was updated according to refs #916
The commit fixes #917.

Signed-off-by: Michal Horn <hornmich@fel.cvut.cz>
doc/images/base_posix_4.png [deleted file]
doc/rpp_simulink.tex
rpp/blocks/tlc_c/common.tlc
rpp/demos/can_ext_mode_demo.slx
rpp/demos/three_phase_freq.slx
rpp/lib

diff --git a/doc/images/base_posix_4.png b/doc/images/base_posix_4.png
deleted file mode 100644 (file)
index 376053d..0000000
Binary files a/doc/images/base_posix_4.png and /dev/null differ
index b02f3bfc9423d9a44f49a30a977e75261a759aa4..57f5e4562627619f56d3a8dd8a74d8a370993929 100644 (file)
@@ -1066,8 +1066,6 @@ The following are the development guidelines used for developing the RPP API:
   elements on the implementations files only and never on the interface files. Never expose any
   other layer to the application or to the whole system below that layer will be exposed. In other
   words, never \texttt{\#include "foo/foo.h"} in any RPP Layer interface file.
-\item Any module is conditionally included by using \texttt{rppCONFIG\_INCLUDE\_\{MNEMONIC\}} directive on the
-  \texttt{RppConfig.h} configuration file.
 \end{compactitem}
 
 \vspace{-0.40cm}
@@ -1165,20 +1163,11 @@ Main library header file.
 To use this library just include this file and this file only. Also, before using any library
 function please call \texttt{rpp\_init()} function for hardware initialization.
 
-\noindent$\rightarrow$ \texttt{rpp/include/rpp/RppConfig.h}
-
-Library configuration file.
-
-Please refer to the API documentation and header file comments for specific documentation for each
-configuration parameter.
-
 \noindent$\rightarrow$ \texttt{rpp/include/rpp/rpp\_\{mnemonic\}.h}
 
 Header file for \texttt{\{mnemonic\}} module.
 
-This files includes function definitions, pin definitions, etc, specific to \{mnemonic\} module. The
-inclusion of this header can be configured in \texttt{RppConfig.h} using
-\texttt{rppCONFIG\_INCLUDE\_\{MNEMONIC\}} directive. See
+This files includes function definitions, pin definitions, etc, specific to \{mnemonic\} module. See
 \htmladdnormallink{API development guidelines}{\#api\_development\_guidelines}.
 
 \noindent$\rightarrow$ \texttt{rpp/src/rpp/rpp\_\{mnemonic\}.c}
@@ -1433,7 +1422,7 @@ compiling and linking an application using the static libraries are:
 \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 \htmladdnormallink{OS interchangeable layer}{\#os\_interchangeable\_layer}
   section above.
-\item Include header files for the RPP library.
+\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\_be\_v3D16\_eabi.lib}.
 \item Configure linker to retain \texttt{.intvecs} section from RPP Library:\newline{}
@@ -1446,10 +1435,7 @@ compiling and linking an application using the static libraries are:
 \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.
-\item Create a \texttt{RppConfig.h} override file and drop DRV layer dependency: \texttt{rppCONFIG\_DRV 0}.
-\item Includes must be configured in a way that the \texttt{RppConfig.h} taken under consideration is the
-  override and not the library one.
+\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}
@@ -1533,20 +1519,26 @@ Release
 \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}
-\item Copy \texttt{RppConfig.h} from RPP Library to a new folder \texttt{include/rpp} and configure it drop DRV
-  layer dependency: \texttt{rppCONFIG\_DRV 0}.\newline{}
-\noindent\includegraphics[width=200px]{images/base_posix_4.png}
 \end{compactenum}
 
 \textbf{In general any RPP application uses the layout/template:}
 
 \begin{enumerate}
-\item Include RPP library header file.
+\item Include RPP library header file. You may also include only a selected modules to save space.
 \lstset{language=c++}
 \begin{lstlisting}
 #include "rpp/rpp.h"
 \end{lstlisting}
 
+You may not want to include the whole library to save space and compile time. In this case you may
+include only those modules, that you want to use. Inclusion selected modules only requires two more
+header files to be included as well: base.h and, in case sci is used for printing, rpp/sci.h.
+\begin{lstlisting}
+#include "rpp/hbr.h" /* We want to use H-bridge */
+#include <base.h>      /* This is a necessary base header file of the rpp library. */
+#include "rpp/sci.h" /* This is needed, because we are using rpp_sci_printf in following examples. */
+\end{lstlisting}
+
 \newpage
 \item Create one or as many FreeRTOS task function definitions as required. Those tasks should use
   functions from this library.
@@ -1566,7 +1558,8 @@ void my_task(void* p)
 
 \item Create the main function that will:
  \begin{itemize}
- \item Initialize the RPP board.
+ \item Initialize the RPP board. If you have included only selected modules in step 1, initialize only
+   those modules by calling their init functions, for example rpp\_hbr\_init\(\).
  \item Spawn the tasks the application requires. Refer to FreeRTOS API for
    details.
  \item Start the FreeRTOS Scheduler. Refer to FreeRTOS API for details.
@@ -1576,8 +1569,16 @@ void my_task(void* p)
 \begin{lstlisting}
 void main(void)
 {
-    /* Initialize RPP board */
-    rpp_init();
+    /* In case whole library is included: */
+        /* Initialize RPP board */
+        rpp_init();
+    /* In case only selected modules are included: */
+        /* Initialize HBR */
+           rpp_hbr_init();
+        /* Initialize sci for printf */
+        rpp_sci_init();
+        /* Enable interrups */
+        _enable_IRQ();
 
     /* Spawn tasks */
     if (xTaskCreate(my_task, (const signed char*)"my_task",
@@ -2291,8 +2292,7 @@ library.
 \begin{center}\begin{tabular}{lllll}
 \textbf{Category} & \textbf{Name} & \textbf{Status*} & \textbf{Mnemonic} & \textbf{Header} \\
 \input{block_table.tex}
-System blocks & Configuration block & \texttt{X} & \texttt{[CONF]} & \texttt{RppConfig.h} \\
- & High-Power output block & \texttt{X} & \texttt{[HOUT]} & \texttt{rpp\_hout.h} \\
+System blocks & High-Power output block & \texttt{X} & \texttt{[HOUT]} & \texttt{rpp\_hout.h} \\
  & LIN receive block & \texttt{X} & \texttt{[LINR]} & \texttt{rpp\_lin.h} \\
  & LIN send msg block & \texttt{X} & \texttt{[LINS]} & - Idem - \\
  & Ethernet receive block & \texttt{X} & \texttt{[ETHR]} & \texttt{rpp\_eth.h} \\
index 682db122d587df1135a78d4b5dfe94604de732cc..20d3b796c99e49f8334a944b39b17e7f29c2ac9e 100644 (file)
@@ -31,7 +31,6 @@
     %if EXISTS("_DONE_COMMON_BLOCK_TYPE_SETUP_") == 0
         %assign _DONE_COMMON_BLOCK_TYPE_SETUP_ = 1
          %if !SLibCodeGenForSim()
-            %<LibAddToCommonIncludes("<rpp/RppConfig.h>")>
             %<LibAddToCommonIncludes("<base.h>")>
             %<LibAddToCommonIncludes("<rpp/sci.h>")>
         %endif
index d001b82cd005afcfcead842de939b9680354ecc5..bbb6b4dbe6612172b4d47f6d5b4871ec55e1678f 100644 (file)
Binary files a/rpp/demos/can_ext_mode_demo.slx and b/rpp/demos/can_ext_mode_demo.slx differ
index edbb43967384bc1b30722ba065d8c03ffa5df6ac..8ffe614021030301e76a40183361225d9ce39cd3 100644 (file)
Binary files a/rpp/demos/three_phase_freq.slx and b/rpp/demos/three_phase_freq.slx differ
diff --git a/rpp/lib b/rpp/lib
index f0d49f1147595ec7f86e7bd0e2f689ccc20c3b8d..3e0b650fe9e8a76af16b119a0730c9a5df02c40c 160000 (submodule)
--- a/rpp/lib
+++ b/rpp/lib
@@ -1 +1 @@
-Subproject commit f0d49f1147595ec7f86e7bd0e2f689ccc20c3b8d
+Subproject commit 3e0b650fe9e8a76af16b119a0730c9a5df02c40c