NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Desktop-linux-sdk 01.00.00.02 Getting Started Guide

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png


Desktop Linux SDK



Version 1.0.0.2 Alpha Release

Getting Started Guide

Last updated: 07/28/2014


Introduction[edit]

c66x-multicore.jpg

The Desktop Linux SDK provides a software development environment to help offload highly compute intensive processing from a desktop Linux PC to TI C66x multi-core DSPs. The Desktop Linux SDK is supported on a Desktop Linux PC with Ubuntu Linux 12.04 LTS, installed with the PCIe TI Multicore DSP Cards.

Specifically, this Getting Started Guide provides information on installing and rebuilding the Desktop Linux SDK. By the end of this Getting Started Guide the user should have:

  • Installed the Desktop Linux SDK Software and its requiring tools
  • Built the Desktop Linux SDK demo application
  • Run the demo application


Supported Devices/Platforms[edit]

This release supports the following Texas Instrument devices/platforms:

Platform Development Kit Supported Devices Supported platforms
C6678 TMS320C6678 TMDSEVM6678L , DSPC-8681E

Getting Started[edit]

Pre-requisites[edit]

The package is meant to be used on a Linux desktop PC with Ubuntu 12.04 LTS, with a DSP card with PCIe interface installed. The DSP cards supported are
a) Single C6678 EVM - TMDSEVM6678 with TMDXEVMPCI (AMC to PCIe Adapter Card)(TMDSEVM6678L with TMDXEVMPCI)
b) QUAD C6678 BRD – ADVANTECH (LIGHTNING DSPC-8681E)(Advantech Lightning DSPC-8681E)
Currently the testing is limited to these boards configured for Little Endian mode for the DSP.

Follow the guidelines at Desktop Linux SDK: Hardware setup guide to check the PCIE card is functional and available for use on the desktop linux PC.

Reference platform used to develop and execute the sdk, host side used the following

  1. Linux distribution: Ubuntu 12.04 LTS
  2. Kernel: Linux kernel version: 3.2.0-25

(Both the 32-bit and 64 bit operating systems are supported)

Also the following packages are needed for compiling the demos.

  • libpciaccess-dev :version 0.12.902-1 or later

<syntaxhighlight lang="bash"> sudo apt-get install libpciaccess-dev </syntaxhighlight>

  • binutils-dev

<syntaxhighlight lang="bash"> sudo apt-get install binutils-dev </syntaxhighlight>

Installing the Desktop Linux SDK[edit]

The Desktop Linux SDK installer allows you to choose the installation directory. Once the installation is complete all the Desktop Linux SDK components will be installed with a directory name destop-linux-sdk_<version> in the specified installation directory.

There are separate installers for 32 bit and 64 bit operating systems.

After downloading the Linux installer, (desktop-linux-sdk_<version><xxbit>_setuplinux.bin), please change the attribute of the installer to executable and run the installer as shown below.
<syntaxhighlight lang='bash'> chmod +x desktop-linux-sdk_<version>_<xxbit>_setuplinux.bin ./desktop-linux-sdk_<version>_<xxbit>_setuplinux.bin </syntaxhighlight>

Major Steps of Desktop Linux Installation


  • Step-1: Welcome Screen : Click Next


Screenshot_DLSDK_Welcome.png

  • Step-2: Select Destination Folder and click Next


Screenshot DLSDK Destination.png

  • Step-3: Select Components and click Next


Screenshot_DLSDK_Selectcomponents.png

  • Step-4: Copy the Components selected in Step-2 to the Destination Folder specified in Step-1,

then automatically install Desktop linux sdk
Screenshot_DLSDK_Installationcomplete.png
Click Finish to complete installation.



Building SDK host modules and demo applications[edit]

Use the make file in the desktop-linux-sdk to build sdk host modules and demo applications. <syntaxhighlight lang='bash'> cd <install_dir>/desktop-linux-sdk_<version> make clean make </syntaxhighlight>
This compiles the individual module libraries of the SDK and the file demo test application. The Module libraries can be found in the individual module/lib directory.
The file demo test application demo_filetest executable will be produced at the following directory:
<install_dir>/desktop-linux-sdk_<version>/demos/filetestdemo/host/bin



The follow step is needed to install cmem driver and set PCIe resource permissions for access by user space driver. This step also takes care of automatically loading the cmem driver and set permissions for the user space driver on boot up through udev. NOTE: This step needs super user privilege to execute the scripts. <syntaxhighlight lang='bash'> cd demos/scripts sudo ./install_udev.sh </syntaxhighlight>

Running the Demonstration Applications[edit]

This file test demo code provided with the Desktop Linux SDK, reads contents of a input binary test file and sends the data to DSP memory (or through DSP accessible host memory) and sends a message to DSP through mailbox(Mailbox message includes pointer to input and output data location). The DSP build does a simple loop back by sending the buffer back to host through the Mailbox to Host. The host then receives message through mailbox, reads data from output buffer and writes to the output file.

For running the file test demo, you will need a binary file, which is used as the input file. Currently the scripts assume the file is test.file at the directory location: desktop-linux-sdk_<version>/../testfiles/test.file
For example, create a directory and put a test file as follows.

mkdir ../testfiles
cp <anyfile.file> ../testfiles/test.file

The size of the data payload per message to DSP is determined by the following parameter in the header file desktop-linux-sdk_<version>/demos/filetestdemo/host/inc/demo.h
"#define DEMO_FILETEST_PAYLOAD_BUFFER_SIZE 0x400000"
Note: Remember to use an appropriately sized file for this test. The size of the file is recommended to be > 2 * Number of DSP cores * PAYLOAD_SIZE( e.g When using a quad DSP card, the minimum file size to be used is recommended to be >128 MBytes (32 cores * 4 MB ), so that all the cores in the card are used in the test.

Here are the steps to run the Demo

1. Load the cmem Driver & Initialize the DSPs DDR (Note: This requires the super user privilege)
Run the commands:
<syntaxhighlight lang="bash"> cd demos/scripts </syntaxhighlight>
Based on the platform and frequency of operation do any one of the following.
For Quad C6678 : DSPC 8681 @1 GHz operation <syntaxhighlight lang="bash"> ./init_dspc8681_1000.sh 4 </syntaxhighlight>
For Quad C6678 : DSPC 8681 @1.25 GHz operation <syntaxhighlight lang="bash"> ./init_dspc8681_1250.sh 4 </syntaxhighlight>
Note: The parameter 4 --> Is the number of DSPs used for the test. This can be set to any value less than the number of available dsps.
For EVM single C6678 : EVM6678 @1 GHz operation <syntaxhighlight lang="bash"> ./init_evm6678_1000.sh </syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash"> ./init_evm6678_1250.sh </syntaxhighlight>
2. Load the Demo DSP image to all the cores
Run the commands: <syntaxhighlight lang="bash"> cd ../filetestdemo/scripts </syntaxhighlight>
Use the following command structure. <syntaxhighlight lang="bash"> ./dnld_demo_loopback.sh <number_of_dsps> </syntaxhighlight>
The number_of_dsps can be set to any value less than the available number of dsps For Quad C6678 platform use <syntaxhighlight lang="bash"> ./dnld_demo_loopback.sh 4 </syntaxhighlight>
For EVM Single C6678 platform use <syntaxhighlight lang="bash"> ./dnld_demo_loopback.sh 1 </syntaxhighlight>
3. Run Desktop Demo application This step uses the test.file under desktop-linux-sdk/../testfiles/ directory created as explained above.

The demo can be run in 3 different modes

a) Data transfer using DMA to and from DSP memory
b) Data transfer using direct memcpy to or from DSP memory through PCIE
c) Data transfer using direct mapping of Host buffer to DSP memory range

Run the following commands:
If not already in the directory:
<syntaxhighlight lang="bash"> cd demos/filetestdemo/scripts </syntaxhighlight>
Run any of the following to run the test, based on the data transfer mode to be used in the test.
For EVM Single C6678 platform use
<syntaxhighlight lang="bash"> ./run_dmatest.sh 0xff ./run_memcpytest.sh 0xff ./run_dspmaptest.sh 0xff </syntaxhighlight>
For Quad C6678 platform use
<syntaxhighlight lang="bash"> ./run_dmatest.sh 0xffffffff ./run_memcpytest.sh 0xffffffff ./run_dspmaptest.sh 0xffffffff </syntaxhighlight>
The outputfile "testout.file" is generated by the test. ( See the scripts for details). This can be compared to the input file to check proper operation.

Troubleshooting tips[edit]

1. Compilation failure with SDK Build

  • Check the pre requisites section to make sure the required packages are installed.

2. Permission issues encountered during execution of install_udev.sh.

  • Check sudo permission for the user. The install udev procedure requires super user privileges (sudo) on the Linux Host Machine. Please contact your system administrator to install or add sudo permissions on the Linux PC.

3. Running the scripts shows failure: Unable to open device.

  • Check the supported EVM+PCIE adapter or the PCIE card is properly inserted into the desktop PC.
  • Follow the instructions at Hardware setup Guide to make sure the hardware setup is working fine.

4. When running the demo application the following error is displayed <syntaxhighlight lang='bash'> ERROR: DMA MEM Device "/dev/cmem" could not opened ERROR: dma mem driver open failed </syntaxhighlight>

  • This probably is because of problems with udev rules not taking effect. Currently the work around for this is to

run the following commands, before following the steps for the demo. This requires super user (sudo) privilege and need to be executed every time the machine is booted up.
<syntaxhighlight lang='bash'> If not in the directory. cd demos/scripts sudo sh ./driver_init.sh </syntaxhighlight>

Related Documents[edit]

Technical Support and Product Updates[edit]

For technical discussions and issues, please visit

NoteNote: When asking for help in the forum you should tag your posts in the Subject with “DESKTOP-LINUX-SDK” and the part number (e.g. “C6678”)

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Desktop-linux-sdk 01.00.00.02 Getting Started Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity