]> rtime.felk.cvut.cz Git - pes-rpp/rpp-simulink.git/commitdiff
Documentation updated, references updated
authorMichal Horn <hornmich@fel.cvut.cz>
Fri, 3 Oct 2014 15:17:05 +0000 (17:17 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Fri, 3 Oct 2014 15:17:05 +0000 (17:17 +0200)
Related to Feature #992

14 files changed:
doc/images/base_1.png
doc/images/block_library.png
doc/images/demo_can_demo.png
doc/images/demo_cantransmit.png
doc/rpp_simulink.tex
refs/armar.pdf
refs/armcl.pdf
rpp/blocks/README.txt
rpp/blocks/sfunction_canreceive.c
rpp/blocks/sfunction_cansetup.c
rpp/blocks/sfunction_cantransmit.c
rpp/loadopenocd/README.txt [new file with mode: 0644]
rpp/loadti/readme.txt
rpp/rpp/README.txt

index 0fcd7667ac34aa6ee41b719bf724bc49b4fa3f47..b5ab858ed6c5bb5f90c11fb6c69549f2cfbaf2cc 100644 (file)
Binary files a/doc/images/base_1.png and b/doc/images/base_1.png differ
index b4e5c84fc6c036cc3a6a4662b2684735f209100e..cdccdb07abe51203a3ef6705898f9ec3cadf6050 100644 (file)
Binary files a/doc/images/block_library.png and b/doc/images/block_library.png differ
index 4c1940a970b21f0254539e14e2040a2c6341afb2..81f8d296c75993fd24afaf0be907551850b8ef0c 100644 (file)
Binary files a/doc/images/demo_can_demo.png and b/doc/images/demo_can_demo.png differ
index 7046eca4828447fb535d6d540cb8488894e63f8e..f95da53bcd346e836e6eb70a430910071783789d 100644 (file)
Binary files a/doc/images/demo_cantransmit.png and b/doc/images/demo_cantransmit.png differ
index 392f7447ba4c964e2dbe3fd2bc49bdba14c6fb89..af421644e8781e1f8424aaeaf9aafd3dd403d3b3 100644 (file)
@@ -266,9 +266,9 @@ repositories.
 Relevant OS information on which this project was developed:
 
 \begin{compactitem}
-\item Ubuntu 12.04.2 LTS AMD64.
-\item Kernel 3.2.0-48-generic.
-\item GCC version 4.6.3.
+\item Ubuntu 13.10 AMD64.
+\item Kernel 3.11.0-12-generic.
+\item GCC version 4.8.1.
 \end{compactitem}
 
 No test for cross-platform interoperability was performed on the code developed. Although care was
@@ -299,7 +299,7 @@ Code Composer Studio (CCS) is the official Integrated Development Environment (I
 applications for Texas Instruments embedded processors. CCS is multiplatform Software based on
 Eclipse Open Source IDE.
 
-The version used in this project is the 5.3.0. Download and install CCS for Linux from:
+The version used in this project is the 5.5.0. Download and install CCS for Linux from:
 
        \begin{quotation}
 \htmladdnormallink{http://processors.wiki.ti.com/index.php/Category:Code\_Composer\_Studio\_v5}{http://processors.wiki.ti.com/index.php/Category:Code\_Composer\_Studio\_v5}
@@ -307,7 +307,7 @@ The version used in this project is the 5.3.0. Download and install CCS for Linu
 
 CCS download requires a valid MyTI account. Tedious. CCS download is about 1.5GB. Once downloaded
 extract the content of the \texttt{tar.gz} archiver and run \texttt{css\_setup\_$\langle$version$\rangle$.bin} script as
-\underline{root}. Installation must done as root in order to install driver set.
+\underline{root}. Installation must be done as root in order to install driver set.
 
 After installation the application can be executed with:
 
@@ -349,7 +349,7 @@ You can find documentation for CGT compiler in \texttt{\repo/ref/armcl.pdf} and
 \hypertarget{matlabsimulink}{}
 \subsubsection{Matlab/Simulink}
 
-Matlab/Simulink version used is R2013a for Linux 64 bits. For in-house development the CVUT should
+Matlab/Simulink version used is R2013b for Linux 64 bits. For in-house development the CVUT should
 provide a network licensing server descriptor file.
 
 \hypertarget{gtkterm}{}
@@ -1891,7 +1891,9 @@ Code download utility for Simulink RPP Target.
 This function is optionally executed at the end of the build process if it is successful and the
 user selected \textit{Download compiled binary to RPP} option on the build configuration panel. This
 function calls \texttt{loadti.sh} script with the generated binary and using configuration for the
-XDS100v2 JTAG Emulators. The board should be powered and correctly wired. \newline{}
+XDS100v2 JTAG Emulators. Optionaly, when \textit{Use OpenOCD to download the binary file} is selected,
+the function calls \texttt{loadopenocd.sh} and will use OpenOCD to download the program to the board.
+The board should be powered and correctly wired. \newline{}
 See \htmladdnormallink{Development wiring}{\#development\_wiring}.
 
 \newpage
@@ -2058,9 +2060,8 @@ cd /tmp/my-code
   $\rightarrow$ Build Model''.
 \item If \emph{Download compiled binary to RPP} was selected in
   \emph{RPP Options} pane (see Section \ref{sec:rpp-target-options}),
-  the compiled binary will be downloaded to the to the board. After
-  the download is finished you should reset the board to run the
-  downloaded code.
+  the compiled binary will be downloaded to the to the board. The program
+  will start running right after the loading is finished.
 
   Note: You should end the Code Composer Studio debug session before
   downloading the generated code to the RPP board. Otherwise the
@@ -2166,17 +2167,29 @@ under  \texttt{Code Generation} \noindent$\rightarrow$ \texttt{RPP Options}:
   \textit{Generate code only} in the \textit{Code Generation} options panel, so it will try to upload even if
   only source code has been generated, failing graciously or uploading an old binary laying around
   in the build directory. This option calls the \texttt{rpp\_download.m} script, which is in turn a
-  wrapper on the \texttt{loadti.sh} script. More information on the \texttt{loadti.sh} script can be found
-  in:
+  wrapper on the \texttt{loadti.sh} and \texttt{loadopenocd.sh} script. More information on the \texttt{loadti.sh}
+  script can be found in:
 \begin{verbatim}
 <css>/ccs_base/scripting/examples/loadti/readme.txt
 http://processors.wiki.ti.com/index.php/Loadti
 \end{verbatim}
 
-  The \texttt{loadti.sh} script will close after the download of the generated program and in
-  consequence the execution of the loaded program will stop (because it works as the CCS debug
-  server). In order to test the loaded model a manual reset of the board is always required after a
-  successful download.
+  The \texttt{loadti.sh} script will close after the download of the generated program, leaving the loaded program running.
+
+  The \texttt{loadopenocd.sh} script will close after the download of the generated program as well, but the program will be stopped.
+  In order to test the loaded program a manual reset of the board is required.
+
+\item \textbf{Download compiled binary to SDRAM}: This feature is not yet implemented for the simulink target.
+  However the RPP library is ready to be linked to run from SDRAM and base program for SDRAM configuration, which
+  will always run from FLASH, is ready.
+
+\item \textbf{Use OpenOCD to download the compiled binary}: This option switches from Ti loading script \texttt{loadti.sh}
+  to OpenOCD script \texttt{loadopenocd.sh}. The benefit of using OpenOCD, besides that it is open source
+  software, is much shorter loading time. More information about the right OpenOCD version and its installation
+  can be found at:
+\begin{verbatim}
+http://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137#OpenOCD_setup_and_Flashing
+\end{verbatim}
 
 \item \textbf{Print model metadata to SCI at start}: if set this option will print a message to the Serial
   Communication Interface when the model start execution on the board. This is very helpful to
@@ -2248,6 +2261,10 @@ reconfigures serial line parameters or CPU clocks which makes the
 communication not working. You should exist CCS debug session and
 reset the board for External Mode to work again.
 
+Sometimes is needed to select ``serial'' transport layer twice to take
+the efect. Check that ``MEX-filename: ext\_comm'' has changed to ``MEX-filename: ext\_comm\_win32\_comm''.
+
+
 \hypertarget{simulink_block_library}{}
 \section{Simulink Block Library}
 
@@ -2797,8 +2814,22 @@ be changed to buffered) and thus the last resolution millivolts are lost.
 
 \textbf{Description:}
 
-This demo is sending data in different form to the CAN1 bus. The data are then received from CAN3 bus
-and printed to the SCI.
+Demostrates how to use CAN Transmit blocks in order to:
+
+\begin{compactenum}
+\item Send unpacked data with data type uint8, uint16 and uint32.
+\item Send single and multiple signals packed into CAN\_MESSAGE by CAN Pack block.
+\item Send a message as extended frame type to be received by CAN Receive configured to receive both, standard and extended frame types. 
+\end{compactenum}
+
+Demostrates how to use CAN Receive blocks in order to:
+
+\begin{compactenum}
+\item Receive unpacked data of data types uint8, uint16 and uint32.
+\item Receive and unpack received CAN\_MESSAGE by CAN Unpack block.
+\item Configure CAN Receive block to receive Standard, Extended and both frame types.
+\item Use function-call mechanism to process received messages
+\end{compactenum}
 
 \newpage
 
@@ -2812,9 +2843,7 @@ and printed to the SCI.
 
 \textbf{Description:}
 
-This demo is sending data to the CAN1 port. The message is received on CAN2 port and a constatnt is
-added to it. The result is sent to the CAN2 port and received on CAN3 port, where another costant is
-added. The result is sent to the CAN3 port and received and printed by CAN1 port.
+This demo demonstrates simple processing of received messages.
 
 \newpage
 
index 2aeac24a7e2397583600080d4ac3b1dfd780ab59..5f44979ac54169329c262ed5ce57e877f41f417e 100644 (file)
Binary files a/refs/armar.pdf and b/refs/armar.pdf differ
index 49aa7da125e3059ae5e5bf9b4f4d4afe6c53d516..7e5b2cc5752caf01dee7142a7ad5d4502fd7965f 100644 (file)
Binary files a/refs/armcl.pdf and b/refs/armcl.pdf differ
index 98cc86dd516a987ad27b49fbf8b15ad14cc21108..99c24cffeb1cafa02dadf03c7c89afa04455dcac 100644 (file)
@@ -1,3 +1,5 @@
+FIXME: This is out of date, maybe not necessary to hawe two descriptions when one is already generated as a pdf file in doc folder.
+
 #####################################
 # Simulink Block Library for RPP    #
 #####################################
@@ -25,12 +27,13 @@ The blocks ideally included in this library are:
                 High-Power output block     X           [HOUT]      rpp_hout.h
 
     Communication blocks
-                CAN Bus receive block       X           [CANR]      rpp_can.h
-                CAN Bus send msg block      X           [CANS]      - Idem -
+                CAN Receive                 W           [CANR]      rpp_can.h
+                CAN Transmit                W           [CANS]      - Idem -
+                CAN Setup                   W           [CANS]      - Idem -
                 LIN receive block           X           [LINR]      rpp_lin.h
                 LIN send msg block          X           [LINS]      - Idem -
-                FlexRay receive block       X           [FRR ]      rpp_fr.h
-                FlexRay send msg block      X           [FRS ]      - Idem -
+                FlexRay receive block       T           [FRR ]      rpp_fr.h
+                FlexRay send msg block      T           [FRS ]      - Idem -
                 SCI receive block           T           [SCIR]      rpp_sci.h
                 SCI send msg block          T           [SCIS]      - Idem -
                 SCI configure block         T           [SCIC]      - Idem -
@@ -42,7 +45,7 @@ The blocks ideally included in this library are:
                 SDRAM write block           X           [SDRW]      rpp_sdr.h
 
     Trigger blocks
-                Overrun detected block      X           [TROR]      - None -
+                Overrun detected block      T           [TROR]      - None -
                 Stack overflow detected     X           [TRSO]      - None -
                     block
                 Malloc Failed detected      X           [TRMF]      - None -
index 7276a084960e5aae0881f46d6d7c3bf788c96d0c..8b69ea033cd9a2d0e17af1213c07f8e42704b8ed 100644 (file)
@@ -23,7 +23,7 @@
 /*
 %YAML 1.2
 ---
-Name: Receive CAN Message block
+Name: CAN Receive
 Category: CAN
 Header: rpp/can.h
 Mnemonic: CANR
@@ -93,6 +93,8 @@ Status:
   Untested:
     - Handling of error states on CAN bus
   Not working:
+    - Receiving at baudrate higher than 700kb
+    - External mode - throwing syntax error during compilation
 
 RPP API functions used:
     - rpp_can_read()
index 68c7802bcd227043b25ff59474b6357df0715880..c183277c887a224bc0e87fe8f8ecec9a59e46768 100644 (file)
@@ -23,7 +23,7 @@
 /*
 %YAML 1.2
 ---
-Name: CAN Bus Configuration
+Name: CAN Setup
 Category: CAN
 Header: rpp/can.h
 Mnemonic: CANC
@@ -49,6 +49,8 @@ Status:
     - Configuring CAN1, CAN2 and CAN3
   Untested:
   Not working:
+    - Receiving at baudrate higher than 700kb
+    - External mode - throwing syntax error during compilation
 
 RPP API functions used:
     - rpp_can_init()
index bdeb585a737ef1e11374ef58d390c0126721d6e3..99a0824ebe546243b13ba80c229e6ef5a1063746 100644 (file)
@@ -23,7 +23,7 @@
 /*
 %YAML 1.2
 ---
-Name: Send CAN Message block
+Name: CAN Transmit
 Category: CAN
 Header: rpp/can.h
 Mnemonic: CANT
@@ -80,6 +80,7 @@ Status:
   Untested:
     - Handling of error states on CAN bus
   Not working:
+    - External mode - throwing syntax error during compilation
 
 RPP API functions used:
     - rpp_can_write()
diff --git a/rpp/loadopenocd/README.txt b/rpp/loadopenocd/README.txt
new file mode 100644 (file)
index 0000000..9820d53
--- /dev/null
@@ -0,0 +1,38 @@
+******************************************************************************
+OpenOCD Generic Loader (loadopenocd)
+README.txt
+******************************************************************************
+
+
+DESCRIPTION
+===========
+
+Command line loader. For information about which version of OpenOCD, installation process
+and low level OpenOCD commands visit:
+http://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137#OpenOCD_setup_and_Flashing
+
+This loader is available for Linux workstations only.
+
+INSTRUCTIONS
+============
+
+Run loadti batch file (WINDOWS) or shell script (LINUX):
+
+  Usage: loadopenocd [OPTION] -d TARGET -s OUT_FILE
+  Load OUT_FILE executable to target.
+  
+  Available options:
+
+  -h   Print help
+
+  -b   Stop the program after it is loaded
+
+  -d   Target destination selector - sdram or flash
+
+  -s   File selector for binary file to be loaded
+
+  Examples: 
+
+  Windows: not available
+  Linux:   loadopenocd.sh -d flash -b -s ./bin/foo.out
+
index be10f23ba574b5f7621a1fab137eeef62166af42..b2a174eb3cf37e53d27134a936a339019dceecb9 100644 (file)
@@ -24,51 +24,18 @@ Run loadti batch file (WINDOWS) or shell script (LINUX):
 
   -a,   --async-run            Run the specified executable and return without halting
 
-  -b,   --init-bss-section[=VALUE]
-                                               Initialize .bss section to specified value, or 0 if
-                                               value is omitted
-  
   -c,   --cfg-file=CONFIG_FILE
                                                Target setup config file
-
-  -f    --fileio=[FOLDER PATH]
-                        Specify the default folder to use for File IO
-                                                                                               
+                                                                               
   -h,   --help                 Print help
 
   -l,   --load                 Load program only
 
-  -mlr, --mem-load-raw="PAGE,ADDR,FILE,TYPE_SIZE,BYTE_SWAP"
-                                               Load binary data file on host to target
-
-  -mld, --mem-load-dat="PAGE,ADDR,FILE,LEN"
-                                               Load *.dat file on host to target
-
-  -msr, --mem-save-raw="PAGE,ADDR,FILE,LEN,TYPE_SIZE,BYTE_SWAP"
-                                               Save data from target memory to binary file on the host
-
-  -msd, --mem-save-dat="PAGE,ADDR,FILE,LEN,IO_FORMAT,APPEND"
-                                               Save data from target memory to *.dat file on the host
-
-  -n,   --no-profile   Do not perform basic application profiling (total
-                                               cycles)
-
-  -q,   --quiet                Quiet mode (only C I/O messages to the console)
-
   -r,   --reset                        Reset target before run
 
   -s,   --stdout-file=FILE
                                                Save C I/O to specified file
 
-  -t,   --timeout=VALUE        Overall scripting timeout value (in milliseconds)
-
-  -v,   --verbose              Print informative messages during execution
-
-  -x,   --xml-log=FILE Generate specified XML log file
-  
-  -@,   --options-file=FILE
-                                               Use options from specified file
-
   Debug Server configuration is done using the '-c' option The '-c' option
   takes a target setup configuration file as the parameter. These files have a
   *.ccxml extension and by default reside in
@@ -102,14 +69,14 @@ Run loadti batch file (WINDOWS) or shell script (LINUX):
   ------------------------------------------------------------------------------  
   CALL loadti -c dm6446_sim_custom.ccxml myapp1.out
   CALL loadti -c C:\TI\CCSv4\common\targetdb\configurations\tisim_c64xpbe.ccxml myapp3.out
-  CALL loadti -c C:\TI\CCSv4\common\targetdb\configurations\tisim_c55xp_ca.ccxml -x myapp2log.xml myapp2.out arg1 arg2
+  CALL loadti -c C:\TI\CCSv4\common\targetdb\configurations\tisim_c55xp_ca.ccxml myapp2.out arg1 arg2
   ------------------------------------------------------------------------------   
   
   Linux (Example shell script):
   ------------------------------------------------------------------------------
   loadti.sh -c dm6446_sim_custom.ccxml myapp1.out
   loadti.sh -c /opt/ti/ccs4/common/targetdb/configurations/tisim_c64xpbe.ccxml myapp3.out
-  loadti.sh -c /opt/ti/ccs4/common/targetdb/configurations/tisim_c55xp_ca.ccxml -x myapp2log.xml myapp2.out arg1 arg2
+  loadti.sh -c /opt/ti/ccs4/common/targetdb/configurations/tisim_c55xp_ca.ccxml myapp2.out arg1 arg2
   ------------------------------------------------------------------------------
 
 
@@ -122,20 +89,19 @@ FILES
 - loadti.sh
   Linux shell script that executes loadti.
 
-- DefaultStylesheet.xsl
-  XML Stylesheet used by DSS XML logs.
 - main.js
   Main JavaScript.
+  This is a modified version inspired by the one provided by Ti in <CCS_ROOT>/ccs_base/scripting/examples/loadti.
+  It has reduced features and some improvements to fit our needs. The main feature is that the loaded program
+  starts running right after it is loaded, only necessary sectors of the FLASH memory are erased.
 
 - dsSetup.js
   JavaScript used to configure the Debug Server.
   
-- memXfer.js
-  JavaScript used for host<->target data transfer.
-  
 - getArgs.js
   JavaScript used for parsing command-line arguments.
+  This is a modified version inspired by the one provided by Ti in <CCS_ROOT>/ccs_base/scripting/examples/loadti.
+  It reflects reduced feature set by reducing accepted parameters.
    
 - readme.txt
   This text file.
index 1edf0327b3bcffed6573d1f6083b4501d8c65e3f..1e646e4089ff59c6080024636c7498f730d217db 100644 (file)
@@ -9,7 +9,10 @@ operating system. This library uses Texas Instrument ARM compiler (armcl)
 included in the Code Generation Tools available with Code Composer Studio, and
 thus it depends on it for proper functioning.
 This library also provides support for automatically download the compiled
-machine code to the RPP board.
+machine code to the RPP board with CCS loadti script or, optionaly, with the OpenOCD.
+Find more abou OpenOCD Flashing on a page:
+http://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137#OpenOCD_setup_and_Flashing
+
 
 How to install RPP Target support:
 
@@ -36,7 +39,7 @@ CCS GUI is not used, this target relies on the ARM Compiler and Linker
 (<ccs>/tools/compiler/arm_5.X.X/bin/armcl) and the Debug Server Scripting (DSS)
 Generic Loader (<ccs>/ccs_base/scripting/examples/loadti/loadti.sh) command line
 tools.
-Please note that all the development was done in a Ubuntu 12.04 LTS GNU/Linux
+Please note that all the development was done in a Ubuntu 13.10 GNU/Linux
 machine using the CCS Linux version.
 
     armcl reference documentation:
@@ -158,15 +161,17 @@ Library file layout:
 
         This function is optionally executed at the end of the build process
         if it is successful and the user selected "Download compiled binary to
-        RPP" option on the build configuration panel. This function calls
-        loadti.sh script with the generated binary and using configuration for
-        the XDS100v2 JTAG Emulators. The board should be powered and correctly
-        wired. See "Wiring the RPP board for programming" on the main
-        documentation files.
+        RPP" option on the build configuration panel. By default this function
+        calls loadti.sh script with the generated binary and using configuration for
+        the XDS100v2 JTAG Emulators. Optionaly, when "Use OpenOCD to download the
+        compiled binary" is selected, loadopenocd.sh script is used instead.
+        The board should be powered and correctly wired. See "Wiring the RPP
+        board for programming" on the main documentation files.
 
         Reference:
             Readme file in <css>/ccs_base/scripting/examples/loadti/readme.txt
             loadti utility wiki at http://processors.wiki.ti.com/index.php/Loadti
+            openocd utility wiki at http://rtime.felk.cvut.cz/hw/index.php/TMS570LS3137#OpenOCD_setup_and_Flashing
 
 
     -> rpp_file_process.tlc