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

  • AH Added by Andri Haryono about 9 years ago

    Hello,

    can you give an example on the following step?

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

    i set mine as the following
    bootargs=mem=96M mem=32M@0xc0000000 mem=64M@0xc4000000 console=ttyS1,115200n8 mtdparts=nand:128M(rootfs),-(userfs) root=/dev/mtdblock0 rw noatime rootfstype=jffs2

    and got this result when running the helloworld
    root@mityomapl138:~/ex01_helloworld/debug# ./run.sh
    + ./slaveloader startup DSP server_dsp.xe674
    Attached to slave procId 0.
    Loading procId 0.
    ------------[ cut here ]------------
    WARNING: at arch/arm/mm/ioremap.c:207 __arm_ioremap_pfn_caller+0x48/0x15c()
    Modules linked in: syslink(O)
    [<c000d518>] (unwind_backtrace+0x0/0xe0) from [<c001cd48>] (warn_slowpath_common+0x4c/0x64)
    [<c001cd48>] (warn_slowpath_common+0x4c/0x64) from [<c001cd78>] (warn_slowpath_null+0x18/0x1c)
    [<c001cd78>] (warn_slowpath_null+0x18/0x1c) from [<c000f204>] (__arm_ioremap_pfn_caller+0x48/0x15c)
    [<c000f204>] (__arm_ioremap_pfn_caller+0x48/0x15c) from [<c000f378>] (__arm_ioremap_caller+0x50/0x54)
    [<c000f378>] (__arm_ioremap_caller+0x50/0x54) from [<bf024710>] (MemoryOS_map+0x1ec/0x3ac [syslink])
    [<bf024710>] (MemoryOS_map+0x1ec/0x3ac [syslink]) from [<bf006748>] (_ProcMgr_map+0x1e8/0x520 [syslink])
    [<bf006748>] (_ProcMgr_map+0x1e8/0x520 [syslink]) from [<bf00b844>] (ElfLoaderTrgWrite_copy+0x154/0x3f4 [syslink])
    [<bf00b844>] (ElfLoaderTrgWrite_copy+0x154/0x3f4 [syslink]) from [<bf00ff24>] (DLIF_copy+0x8/0x14 [syslink])
    [<bf00ff24>] (DLIF_copy+0x8/0x14 [syslink]) from [<bf00e8e4>] (DLOAD_load+0x71c/0xa38 [syslink])
    [<bf00e8e4>] (DLOAD_load+0x71c/0xa38 [syslink]) from [<bf00aec8>] (ElfLoader_load+0x268/0x3a8 [syslink])
    [<bf00aec8>] (ElfLoader_load+0x268/0x3a8 [syslink]) from [<bf0024b8>] (Loader_load+0xe8/0x164 [syslink])
    [<bf0024b8>] (Loader_load+0xe8/0x164 [syslink]) from [<bf004a48>] (ProcMgr_load+0x21c/0x318 [syslink])
    [<bf004a48>] (ProcMgr_load+0x21c/0x318 [syslink]) from [<bf009158>] (ProcMgrDrv_ioctl+0xa8c/0x1a14 [syslink])
    [<bf009158>] (ProcMgrDrv_ioctl+0xa8c/0x1a14 [syslink]) from [<c0091018>] (do_vfs_ioctl+0x500/0x584)
    [<c0091018>] (do_vfs_ioctl+0x500/0x584) from [<c00910d0>] (sys_ioctl+0x34/0x54)
    [<c00910d0>] (sys_ioctl+0x34/0x54) from [<c00093a0>] (ret_fast_syscall+0x0/0x2c)
    ---[ end trace f031d267df7b5391 ]---
    Assertion at Line no: 356 in /opt/ti/syslink_2_21_03_11/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/osal/Linux/OsalKfile.c: ((bytesRead / size) == (UInt32) count) : failed
    ------------[ cut here ]------------
    WARNING: at arch/arm/mm/ioremap.c:207 __arm_ioremap_pfn_caller+0x48/0x15c()
    Modules linked in: syslink(O)
    [<c000d518>] (unwind_backtrace+0x0/0xe0) from [<c001cd48>] (warn_slowpath_common+0x4c/0x64)
    [<c001cd48>] (warn_slowpath_common+0x4c/0x64) from [<c001cd78>] (warn_slowpath_null+0x18/0x1c)
    [<c001cd78>] (warn_slowpath_null+0x18/0x1c) from [<c000f204>] (__arm_ioremap_pfn_caller+0x48/0x15c)
    [<c000f204>] (__arm_ioremap_pfn_caller+0x48/0x15c) from [<c000f378>] (__arm_ioremap_caller+0x50/0x54)
    [<c000f378>] (__arm_ioremap_caller+0x50/0x54) from [<bf024710>] (MemoryOS_map+0x1ec/0x3ac [syslink])
    [<bf024710>] (MemoryOS_map+0x1ec/0x3ac [syslink]) from [<bf006748>] (_ProcMgr_map+0x1e8/0x520 [syslink])
    [<bf006748>] (_ProcMgr_map+0x1e8/0x520 [syslink]) from [<bf00b844>] (ElfLoaderTrgWrite_copy+0x154/0x3f4 [syslink])
    [<bf00b844>] (ElfLoaderTrgWrite_copy+0x154/0x3f4 [syslink]) from [<bf00ff24>] (DLIF_copy+0x8/0x14 [syslink])
    [<bf00ff24>] (DLIF_copy+0x8/0x14 [syslink]) from [<bf00e8e4>] (DLOAD_load+0x71c/0xa38 [syslink])
    [<bf00e8e4>] (DLOAD_load+0x71c/0xa38 [syslink]) from [<bf00aec8>] (ElfLoader_load+0x268/0x3a8 [syslink])
    [<bf00aec8>] (ElfLoader_load+0x268/0x3a8 [syslink]) from [<bf0024b8>] (Loader_load+0xe8/0x164 [syslink])
    [<bf0024b8>] (Loader_load+0xe8/0x164 [syslink]) from [<bf004a48>] (ProcMgr_load+0x21c/0x318 [syslink])
    [<bf004a48>] (ProcMgr_load+0x21c/0x318 [syslink]) from [<bf009158>] (ProcMgrDrv_ioctl+0xa8c/0x1a14 [syslink])
    [<bf009158>] (ProcMgrDrv_ioctl+0xa8c/0x1a14 [syslink]) from [<c0091018>] (do_vfs_ioctl+0x500/0x584)
    [<c0091018>] (do_vfs_ioctl+0x500/0x584) from [<c00910d0>] (sys_ioctl+0x34/0x54)
    [<c00910d0>] (sys_ioctl+0x34/0x54) from [<c00093a0>] (ret_fast_syscall+0x0/0x2c)
    ---[ end trace f031d267df7b5392 ]---
    Unable to handle kernel paging request at virtual address ffffffff
    pgd = c52a4000
    [ffffffff] *pgd=c5ffe831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 817 [#1] PREEMPT
    Modules linked in: syslink(O)
    CPU: 0 Tainted: G W O (3.2.0+ #3)
    PC is at memset+0xd8/0xe0
    LR is at ElfLoaderTrgWrite_copy+0x1a4/0x3f4 [syslink]
    pc : [<c014bdf8>] lr : [<bf00b894>] psr: 20000013
    sp : c455fd20 ip : 00000000 fp : 0000000b
    r10: 00000002 r9 : c6fda000 r8 : ffffffff
    r7 : c6fa3000 r6 : 00006828 r5 : 06a85000 r4 : c455fda8
    r3 : 00000003 r2 : 00000000 r1 : 00006824 r0 : ffffffff
    Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 0005317f Table: c52a4000 DAC: 00000015
    Process slaveloader (pid: 2390, stack limit = 0xc455e270)
    Stack: (0xc455fd20 to 0xc4560000)
    fd20: c301ae20 fffffff2 0001ae20 00000001 00000080 ffffffff 00000001 c301ae20
    fd40: c301ae20 00000001 00006828 bf010000 c700c000 00000001 fffffff2 c301ae20
    fd60: 00000000 c6fcf000 00000001 c6fda000 c6ff2030 c6fdc000 c6fda000 00000002
    fd80: 0000000b bf00ff24 00000002 bf00e8e4 00000000 ffffffff 00000000 00000000
    fda0: 00000002 c6fcf01c c6fda000 c6ff6000 ffffffff 00000001 0001ae60 00000000
    fdc0: 00000002 00000008 c6fdc000 c6fdc000 03046000 03046000 c6fa3000 00000000
    fde0: c6f9f000 00000000 00000000 00000000 c455ff00 bf00aec8 c6fd8000 00000000
    fe00: 00000000 00000000 c302f940 c6fda000 c6ae3000 c6f9f000 00000000 00000000
    fe20: c6fd8000 00000000 c6fd8000 c455ff00 00000000 bf0024b8 00000000 c455ff00
    fe40: 00000000 00000000 00000000 c6fa9000 00000000 00000000 00000000 c455ff00
    fe60: 00000000 bf004a48 00000000 c455ff00 00000000 00000000 c6fd8000 be8c1b88
    fe80: 00000000 c455e000 c6fd8000 c0009524 c455e000 00000000 be8c1b64 bf009158
    fea0: 00000000 c455ff00 c512936c 0000000a c5129000 c5129c11 c455e000 c5129c00
    fec0: a0000013 c0189f2c c51290cc c00363f8 c5129000 00000000 00000000 60000013
    fee0: c455e000 0485f000 c6fa9000 be8c1ea3 00000011 00000000 00000000 00000000
    ff00: 00000000 c00216fc a0000093 c5129000 c45be420 be8c1b88 be8c1b88 c4656d58
    ff20: c0009524 c0091018 c5158560 00000000 00000000 00000000 00000000 00000012
    ff40: c5322aa8 00000002 c5a60cb8 00000000 c455e000 00000000 00000001 c45be420
    ff60: 00000000 c5819440 c455ff8c c45be420 be8c1b88 c020e0a2 00000008 c0009524
    ff80: c455e000 c00910d0 00000008 00000001 be8c1b88 be8c1e97 00000000 be8c1bd4
    ffa0: 00000036 c00093a0 be8c1e97 00000000 00000008 c020e0a2 be8c1b88 00000008
    ffc0: be8c1e97 00000000 be8c1bd4 00000036 00000000 be8c1ea3 097d2000 be8c1b64
    ffe0: 00000000 be8c1b40 00046928 4030b19c 60000010 00000008 08000200 80220821
    Code: ba00001d e3530002 b4c02001 d4c02001 (e4c02001)
    ---[ end trace f031d267df7b5393 ]---