Project

General

Profile

SysLink Configuration

These steps will help you configure the TI SysLink for the MityDSP-L138 processor. Please refer to the SysLink Install Guide and the SysLink FAQ at TI's website for more information.

Syslink will be included in the next release of the MDK. At this time, you should download SysLink version 2.21.03.11 from TI with the link below. The Critical Link modified "products.mak" file is attached at the bottom of this page and is configured as described in the build details section.
SysLink version 2.21.03.11 was used for this guide. A Critical Link modified version can be found in the MDK at {MDK}/sw/3rdparty/syslink_2_21_03_11. The modified version is configured to build for the OMAPL138. Depending on the locations of installed tools, the paths set in the configuration may need to be changed. An unmodified version can be found at TI's website here.

Prerequisites

  1. SysLink version 2.21.03.11 (See above for location)
  2. Code Composer Studio version 5.3.0 (Download from TI here with a TI account)
  3. Build of the latest Linux Kernel. The latest Linux Kernel can be found in the MDK at ${MDK}/sw/ARM/linux/linux-davinci/ and details on building the kernel can be found here. This must also be the kernel used on the MityDSP-L138
  4. The MityDSP Toolchain. The toolchain is installed on the Critical Link MityDSP Virtual Machine found here.

Note: Code Composer Studio comes packaged with XDC Tools v3, IPC v1, SYS/BIOS v6, and the Code Generation Tools for the DSP. Each of these tools can be downloaded separately if desired, but tool versions used in this guide assume CCS v5.3.0 is installed. If downloaded separately, check tool versions and install directories carefully when modifying the configuration.

Build Details (sudo is required for these instructions to work)

Extract the SysLink tarball into a working directory and navigate to that directory. For our purposes, the "/opt/ti" directory was used. If rebuilding from the SysLink version provided in the MDK, skip this step and navigate to the SysLink base directory in the MDK.

root@mitydsp-dev:~/Downloads# cd /opt/ti/
root@mitydsp-dev:/opt/ti# tar -xvf syslink_2_21_03_11.tar.gz
root@mitydsp-dev:/opt/ti# cd syslink_2_21_03_11

Navigate to the SysLink base directory and modify the products.mak file. This will prepare the makefile to build SysLink for the OMAPL138. If rebuilding from the SysLink version provided in the MDK, this file should already be configured. you can type "make .show-products" to ensure the variables are set correctly.

DEVICE = OMAPL1XX
GPPOS = Linux
SDK = NONE
EXEC_DIR = ${HOME}/syslink
LOADER = ELF
DEPOT = /opt/ti
######## For OMAPL1XX device ########
else ifeq ("$(DEVICE)","OMAPL1XX")
LINUXKERNEL             = $(HOME)/MDK_XXXX-XX-XX/sw/ARM/linux/linux-davinci      
CGT_ARM_INSTALL_DIR     = /usr/local/oecore-i686/sysroots/i686-angstromsdk-linux/usr/bin/armv5te-angstrom-linux-gnueabi
CGT_ARM_PREFIX          = $(CGT_ARM_INSTALL_DIR)/arm-angstrom-linux-gnueabi-
IPC_INSTALL_DIR         = $(DEPOT)/ipc_1_25_00_04    
BIOS_INSTALL_DIR        = $(DEPOT)/bios_6_34_02_18    
XDC_INSTALL_DIR         = $(DEPOT)/xdctools_3_24_05_48    

# If LOADER=ELF then below elf tools path is required else set C674 path
ifeq ("$(LOADER)","ELF")
CGT_C674_ELF_INSTALL_DIR= $(DEPOT)/ccsv5/tools/compiler/c6000_7.4.1
else
CGT_C674_INSTALL_DIR= $(DEPOT)/_your_c674_code_gen_install_
endif
######## End of device specific variables ########

For the LINUXKERNEL, replace MDK_XXXX-XX-XX with the name of the MDK you downloaded from Critical Link.

Use make to build SysLink. There are multiple make targets available to build parts of SysLink individually. Type "make help" to see the available targets. Any directory with a makefile should have an accompanying README. If not, you can use "make help" and that will show you the available targets for make.

root@mitydsp-dev:/opt/ti/syslink_2_21_03_11# make help

Available build targets are:

  all (default)       : Builds GPP driver, GPP user libraries and slave
                        libraries

  syslink             : Builds GPP driver, GPP user libraries, slave
                        libraries and utilities
  syslink-driver      : Builds GPP driver
  syslink-hlos        : Builds GPP (HLOS) user libraries
  syslink-rtos        : Builds slave (RTOS) libraries

  examples            : Build examples

  install             : Install GPP driver and examples in
                        /home/mitydsp/syslink
  install-driver      : Install GPP driver
  install-examples    : Install all GPP and slave example applications

  .show-products      : Prints all component and option settings

  clean               : Remove all generated files and sample applications

Note: the install directory will change depending on the value of ${HOME}.

Build the syslink driver and libraries and then install the driver in your selected install directory. This will place the "syslink.ko" module in your install directory in "/lib/modules/3.2.0/kernel/drivers/dsp". It's important to use "make syslink" as it will not only build the driver and the libraries, but also the slaveloader tool. This syslink provided tool is needed for the example that follows.

root@mitydsp-dev:/opt/ti/syslink_2_21_03_11# make syslink
root@mitydsp-dev:/opt/ti/syslink_2_21_03_11# make install-driver

Use make to build a SysLink example. SysLink provides examples to show simple functionality for all of its modules. For this guide, we will be using the first example. This is a simple notify event.

Navigate to the examples directory and extract the examples.

root@mitydsp-dev:/opt/ti/syslink_2_21_03_11# cd examples/
root@mitydsp-dev:/opt/ti/syslink_2_21_03_11/examples# make extract

Then navigate to the first example "ex01_helloworld" and use make to build it.

root@mitydsp-dev:/opt/ti/syslink_2_21_03_11/examples# cd ex01_helloworld/
root@mitydsp-dev:/opt/ti/syslink_2_21_03_11/examples/ex01_helloworld# make

With the example built, you can install it in your selected install directory in "/ex01_helloworld/debug".

root@mitydsp-dev:/opt/ti/syslink_2_21_03_11/examples/ex01_helloworld# make install

To run this example on the MityDSP-L138, the boot argument for memory must be modified to match the expected memory by SysLink. This memory is designated per the example in the "config.bld" file. This file can be found in the examples directory at "examples/ex01_helloworld/shared". If you view this file, you will see a comment block as seen below outlining the memory configuration for this example.

~~~

/*  Memory Map for ti.platforms.evmOMAPL138
 *
 *  C000_0000 - C7FF_FFFF   800_0000  ( 128 MB) External Memory
 *  ------------------------------------------------------------------------
 *  C000_0000 - C1FF_FFFF   200_0000  (  32 MB) Linux
 *  C200_0000 - C200_FFFF     1_0000  (  64 KB) SR_0 (ipc)
 *  C201_0000 - C2FF_FFFF    FF_0000  ( ~15 MB) --------
 *  C300_0000 - C37F_FFFF    80_0000  (   8 MB) DSP_PROG (code, data)
 *  C380_0000 - C3FF_FFFF    80_0000  (   8 MB) --------
 *  C400_0000 - C7FF_FFFF   400_0000  (  64 MB) Linux
 */

~~~

This tells us that the example is designating 64 KB for SR_0 (a memory block needed by IPC), 8 MB for the DSP code and data, and 32 + 64 MB for Linux.
When booting the image from U-Boot, we need ensure that 32 MB at address C0000000 and 64 MB at address C4000000 are available to linux. To do this, boot the MityDSP-L138 into U-Boot and modify the bootargs.

U-Boot > editenv bootargs
edit: XXXX mem=32M@0xc0000000 mem=64M@0xc4000000 XXXX
U-Boot > saveenv

Note: The 'X's represent the other bootargs already set.

With the bootargs set correctly, reset and let the board boot into linux. Copy the SysLink install directory onto the board. For information on copying files to the board see the Starter Guide.

The SysLink module must first be loaded using "insmod" before running the example. You can type "lsmod" to see the currently loaded modules and to check that SysLink is listed there.

root@mityomapl138:~# cd syslink
root@mityomapl138:~/syslink# insmod lib/modules/3.2.0/kernel/drivers/dsp/syslink.ko
root@mityomapl138:~/syslink# lsmod
Module                  Size  Used by
syslink              1002717  0
ipv6                  225309  10

After loading the module, navigate to the example directory. There is a run.sh script that will load the DSP with its executable, execute the host application, then powerdown the DSP.

root@mityomapl138:~/syslink# cd ex01_helloworld/debug/
root@mityomapl138:~/syslink/ex01_helloworld/debug# ./run.sh
+ ./slaveloader startup DSP server_dsp.xe674
Attached to slave procId 0.
Loading procId 0.
Loaded file server_dsp.xe674 on slave procId 0.
Started slave procId 0.
+ ./app_host DSP
--> App_exec:
App_exec: event received from procId=0
<-- App_exec: 0
+ ./slaveloader shutdown DSP
Stopped slave procId 0.
Unloaded slave procId 0.
Detached from slave procId 0.
root@mityomapl138:~/syslink/ex01_helloworld/debug#

If you see this output, then SysLink has been configured correctly. If not, ensure the boot arguments are set correctly and check the SysLink FAQ to see if your issue is there.

Once finished, you can unload the SysLink module with the "rmmod" command.

root@mityomapl138:~# rmmod syslink

products.mak - Critical Link modified SysLink configuration file (10.1 KB) Alex Horejs, 06/24/2014 11:53 AM

Add picture from clipboard (Maximum size: 600 MB)