+++ /dev/null
-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 #
-#####################################
-
-This library includes Simulink blocks for RPP board peripherals. Each block is
-implemented as a Matlab C-MEX S-Functions.
-
-The blocks ideally included in this library are:
-
- CATEGORY NAME STATUS* MNEMONIC LRH*
- ----------------------------------------------------------------------------
-
- System blocks
- Configuration block X [CONF] RppConfig.h
-
- Logic IO blocks
- Digital Input block T [DIN ] rpp_din.h
- Digital Output block T [LOUT] rpp_lout.h
- Analog Input block T [AIN ] rpp_ain.h
- Analog Output block T [AOUT] rpp_aout.h
-
- Power output blocks
- H-Bridge Control block T [HBR ] rpp_hbr.h
- Power output block T [MOUT] rpp_mout.h
- High-Power output block X [HOUT] rpp_hout.h
-
- Communication blocks
- 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 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 -
- Ethernet receive block X [ETHR] rpp_eth.h
- Ethernet send msg block X [ETHS] - Idem -
-
- Logging/Storage blocks
- SD Card write block T [SDCW] rpp_sdc.h
- SDRAM write block X [SDRW] rpp_sdr.h
-
- Trigger blocks
- Overrun detected block T [TROR] - None -
- Stack overflow detected X [TRSO] - None -
- block
- Malloc Failed detected X [TRMF] - None -
- block
-
- ** Legend **
- *LRH : Library Reference Header.
- *STATUS : X - Unimplemented. Files non present.
- P - Unimplemented. Files present.
- W - Work in progress.
- I - Implemented.
- T - Implemented and tested.
-
-
-Note: Each block that can detect fault condition should have a trigger output.
- High-power output provides current flow as an input to the model.
-
-
-
-Library file layout:
-
- -> header.c and trailer.c
-
- RPP framework for simple S-Functions.
-
- This files are included at the head and tail of each S-Function file.
- They include refactored and commonly repeated structures that pollute
- S-Functions implementations. They include basic includes, required
- definitions, macro definitions, common functions implementations and
- documentation on optional functions and commented prototypes for
- optional model calls/hooks.
-
- Reference:
- None.
-
-
- -> sfunction_{mnemonic}.c
-
- C-MEX S-Function implementation for {mnemonic} block.
-
- This file implements the {mnemonic} block using C-MEX S-Function API.
- See the reference for information about the S-Function API.
-
- Reference:
- <repo>/refs/sfunctions.pdf
-
-
- -> tlc_c/sfunction_{mnemonic}.tlc
-
- Target Language Compiler (TLC) file for {mnemonic} block.
-
- This file implements the C code inlining for {mnemonic} block. See the
- reference for information about the TLC API.
-
- Reference:
- <repo>/refs/rtw_tlc.pdf
-
-
- -> tlc_c/common.tlc
-
- Common TLC functions.
-
- This file implements common TLC functions used by all the blocks.
-
- Reference:
- None.
-
-
- -> slblocks.m
-
- Simulink library control file.
-
- This file allows a group of blocks to be integrated into the Simulink
- Library and Simulink Library Browser. This file is required by Simulink
- in order to interpret this folder as a block library. For information
- about this file see the references.
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1127
-
-
- -> rpp_lib.slx
-
- RPP Simulink block library.
-
- Simulink block library that includes all the blocks. This file is
- referenced by slblocks.m
-
- Reference:
- None.
-
-
- -> compile_blocks.m
-
- Blocks compilation script.
-
- This script compiles all the sfunction blocks to MEX executables. This
- script is called by the rpp_setup() function in order make all the
- blocks available to the Simulink environment or it can be called
- independently when developing S-Functions.
-
- Reference:
- None.
-
-
-
-Library block description:
-
-The following are the currently specified Simulink blocks.
-
-
-[DIN] Digital Input block ======================================================
- Inputs : 0
- None
-
- Outputs : 2
- bool Digital Input
- bool ErrFlag
-
- Parameters : 2
- uint8 Pin number [1-16]
- bool Use variable threshold
-
-
-[LOUT] Digital Output block ====================================================
- Inputs : 1
- bool Digital Output
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 1
- uint8 Pin number [1-8]
-
-
-[AIN] Analog Input block =======================================================
- Inputs : 0
- None
-
- Outputs : 2
- uint16 Analog Input
- bool ErrFlag
-
- Parameters : 1
- uint8 Pin number [1-12]
-
-
-[AOUT] Analog Output block =====================================================
- Inputs : 1
- uint16 Analog Output
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 1
- uint8 Pin number [1-4]
- bool UseVoltage
-
-
-[HBR] H-Bridge Control block ===================================================
- Inputs : 1
- double Control
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 0
- None
-
-
-[MOUT] Power Output block ======================================================
- Inputs : 1
- bool Power Output
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 1
- uint8 Pin number [1-6]
-
-
-[CANR] CAN Receive =============================================================
- Inputs : 0
- None
-
- Outputs : 2
- uint8 Payload
- bool ErrFlag
-
- Parameters : 1
- uint8 CAN Interface [1-4]
-
-
-[CANS] CAN Send ================================================================
- Inputs : 1
- uint8 Payload
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 1
- uint8 CAN Interface [1-4]
-
-
-[SCIR] Serial Comm. Interface Receive ==========================================
- Inputs : 0
- None
-
- Outputs : 2
- uint8 Data
- bool ErrFlag
-
- Parameters : 0
- None
-
-
-[SCIS] Serial Comm. Interface Send =============================================
- Inputs : 1
- uint8 Data
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 2
- bool UsePrintf
- string PrintFormat [SETTING]
-
-
-[SCIC] Serial Comm. Interface Configure ========================================
- Inputs : 0
- None
-
- Outputs : 0
- None
-
- Parameters : 1
- uint32 Baud rate
-
-
-[SDRW] SD-RAM Write (Logging) ==================================================
- Inputs : 1
- double Data
-
- Outputs : 1
- bool ErrFlag
-
- Parameters : 2
- uint8 Block ID
- string PrintFormat [SETTING]
# Simulink Target for RPP #
#####################################
-
-This library provides support for C source code generation from Simulink models
-and compilation of that code on top of the RPP library and the FreeRTOS
-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 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:
-
-1) Get the repository (omit this if you're reading this from the README.txt file
- in the repository). From a shell:
-
- git clone ssh://git@rtime.felk.cvut.cz/jenkicar/rpp-simulink.git
-
-This is a private server, you require your SSH private key to be authorized.
-For access please consult the Real-Time Systems Group, Department of Control
-Engineering, Faculty of Electrical Engineering, Czech Technical University in
-Prague. For details about this git server consult:
-
- http://rtime.felk.cvut.cz/hw/index.php/Git_repository_on_this_server
-
-
-2) Install Code Composer Studio.
-
-Install Code Composer Studio (CCS) from the following URL:
-
- http://processors.wiki.ti.com/index.php/Category:Code_Composer_Studio_v5
-
-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 13.10 GNU/Linux
-machine using the CCS Linux version.
-
- armcl reference documentation:
- <repo>/refs/armcl.pdf, also available on
- http://processors.wiki.ti.com/index.php/TI_Compiler_Information#Compiler_Manuals
-
- loadti.sh reference documentation:
- <css>/ccs_base/scripting/examples/loadti/readme.txt
- http://processors.wiki.ti.com/index.php/Loadti
-
-Notes on installing Code Composer Studio on Ubuntu 64bits:
-
- After installation the application can be run with:
-
- cd <ccs>/ccsv5/eclipse/
- ./ccstudio
-
- If the application fails to start is because CCS5 is a 32bits application a
- thus requires 32bits libraries:
-
- sudo apt-get install libgtk2.0-0:i386 libxtst6:i386
-
- If the application crashes with a segmentation fault do:
-
- Edit <ccs>/ccsv5/eclipse/plugins/com.ti.ccstudio.branding_<your version number>/plugin_customization.ini
- And change key org.eclipse.ui/showIntro to false.
-
- Choose "FREE License - for use with XDS100 JTAG Emulators" on the licensing
- options. This target is configured to download to the board using this
- particular hardware.
-
- You may create a symbolic link and a desktop entry:
-
- sudo ln -s <ccs>/ccsv5/eclipse/ccstudio /usr/local/bin/ccstudio
-
- And put in ~/.local/share/applications/ccs5.desktop
-
- [Desktop Entry]
- Version=1.0
- Type=Application
- Terminal=false
- Exec=ccstudio
- Name=Code Composer Studio
- Icon=/usr/local/ti/ccsv5/eclipse/icon.xpm
-
-
-3) Install RPP Target:
-
- Open Matlab and type on command window:
-
- cd <repo>/rpp/rpp/
- rpp_setup()
-
- This will launch the RPP setup script. This script will ask the user to
- provide the path to the CCS compiler root directory (the directory where
- armcl is located), normally:
-
- <ccs>/tools/compiler/arm_5.X.X/
-
- Find a more detailed description of what this script does in the section
- below.
-
-
-4) Create a new model or load a demo.
-
- Demos are located on <repo>/rpp/demo or you can start a new model and
- configure target to RPP.
-
-
-
-Library file layout:
-
- -> rpp_setup.m
-
- RPP Target install script.
-
- This script will, among other things, ask the user to provide the
- location of the armcl parent directory, infer and save some relevant
- CCS paths, add paths to Matlab path and build S-Function blocks for
- user's architecture (using Matlab's mex command line tool).
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1137
-
-
- -> rpp.tlc
-
- Embedded real-time system target file for RPP.
-
- This file is the system target file (STF), or target manifest file.
- Functions of the STF include:
-
- - Making the target visible in the System Target File Browser.
- - Definition of code generation options for the target (inherited
- and target-specific).
- - Providing an entry point for the top-level control of the TLC code
- generation process.
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1129 and _1144_
-
-
- -> rpp.tmf
-
- Embedded Coder Template Makefile.
-
- This is just standard Embedded Coder Template Makefile, provided by
- Matlab. It was slightly modified to support armcl particularities and
- added template rules for assembler files (which were included by the
- rpp_lib_support.m, but is no longer the case).
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1130 and _1183_
-
-
- -> rpp_download.m
-
- 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 "Download compiled binary to
- 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
-
- Code generation custom file processing template.
-
- This file should decide which "main" to generate according to
- configuration, in particular which mode, Single Tasking or Multitasking,
- is chosen. The RPP Target ignores this settings because it uses a
- tasking system based on tasking features provided by FreeRTOS. In
- consequence is only a wrapper to the "Single Tasking" main, which
- clearly is not for single tasking.
-
- Reference:
- <repo>/refs/ecoder_ug.pdf p. 556
- <repo>/refs/ecoder_ref.pdf p. 1347
-
-
- -> rpp_lib_support.m
-
- DEPRECATED. Simulink support for RPP library and operating system setup.
-
- This files used to add the source code from the RPP library and
- operating to the build. This is no longer required when using the static
- library. This is left for future reference in case new source code needs
- to be included to the build.
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1058
- <repo>/refs/rtw_ref.pdf p. 56
-
-
- -> rpp_make_rtw_hook.m
-
- Build process hooks file.
-
- This file is hook file that invoke target-specific functions or
- executables at specified points in the build process. In particular,
- this file handle the copying of required files before the compilation
- stage.
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1066-1072 and 1131
-
-
- -> rpp_select_callback_handler.m
-
- RPP Target select callback handler.
-
- This callback function is triggered whenever the user selects the target
- in the System Target File Browser. Default values for Simulation and
- configurations parameters are set. Some options are disabled if it is
- not allowed to be changed by user.
-
- Reference:
- <repo>/refs/rtw_ug.pdf p. 1211
-
-
- -> rpp_srmain.tlc
-
- Custom file processing to generate a "main" file.
-
- This file generated the "main" file for the RPP target on top of the RPP
- library and the FreeRTOS operating system. The "sr" is standard to mark
- Single Tasking main, which is not the case. See rpp_file_process.m
- description above for more information about this.
-
- Reference:
- Example in <matlab>/rtw/c/tlc/mw/bareboard_srmain.tlc
-
-
- -> target_tools.mk
-
- Makefile for CCS (armcl) toolchain support.
-
- This file set variables to CCS tools to support build for this toolchain.
- This file is included by rpp.tmf before declaring the rules for source
- code.
-
- Reference:
- "Include a tool specification settings" comment block in rpp.tmf
- Compiler options documentation available in armcl.pdf
-
+This directory contains Embedded Coder code generation target for the
+RPP board.