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.01 Getting Started Guide
Desktop Linux SDK
Version 1.0.0.1 Alpha Release
Getting Started Guide
Last updated: 07/28/2014
Contents
Introduction[edit]
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 or similar, 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 EVMs |
C6678 | TMS320C6678 | TMDSEVM6678L with TMDXEVMPCI, Advantech Lightning DSPC-8681E |
Getting Started[edit]
Pre-requisites[edit]
The package is meant to be used on a Linux desktop PC with Ubuntu 11.04 or later version, 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
Reference platform used to develop and execute the sdk, host side used the following
- Linux distribution: Ubuntu 12.04 & 11.10
- Kernel: Linux kernel version: 3.2.0-25, & 3.0.0-17
Also the following packages are needed for compiling the demos.
- libpciaccess-dev
<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.
After downloading the Linux installer, (desktop-linux-sdk_<version>_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>_setuplinux.bin
./desktop-linux-sdk_<version>_setuplinux.bin
</syntaxhighlight>
- Major Steps of Desktop Linux Installation
- Step-1: Welcome Screen : Click Next
- Step-2: Select Destination Folder and click Next
- Step-3: Select Components and click Next
- Step-4: Copy the Components selected in Step-2 to the Destination Folder specified in Step-1,
then automatically install Desktop linux sdk
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
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">
sudo ./init_dspc8681_1000.sh 4
</syntaxhighlight>
For Quad C6678 : DSPC 8681 @1.25 GHz operation <syntaxhighlight lang="bash">
sudo ./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">
sudo ./init_evm6678_1000.sh
</syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash">
sudo ./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">
sudo ./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">
sudo ./dnld_demo_loopback.sh 4
</syntaxhighlight>
For EVM Single C6678 platform use <syntaxhighlight lang="bash">
sudo ./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">
sudo ./run_dmatest.sh 0xff
sudo ./run_memcpytest.sh 0xff
sudo ./run_dspmaptest.sh 0xff
</syntaxhighlight>
For Quad C6678 platform use
<syntaxhighlight lang="bash">
sudo ./run_dmatest.sh 0xffffffff
sudo ./run_memcpytest.sh 0xffffffff
sudo ./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]
- Compilation failure with SDK Build
- Check the pre requisites section to make sure the required packages are installed.
- Check the pre requisites section to make sure the required packages are installed.
- Permission issues encountered in running Desktop Linux SDK Demo application.
- Check sudo permission for the user. The installation of the Desktop Linux SDK and the execution of the demo build requires sudo access on the Linux Host Machine.
- Running the scripts shows failure: Unable to open device.
- Check the supported EVM+PCIE adatper or the PCIE card is properly inserted into the desktop PC.
- To make sure the card is inserted, execute command
<syntaxhighlight lang='bash'> lspci | grep "Texas Instruments" </syntaxhighlight> to see the detected TI device(s)
Related Documents[edit]
- Desktop Linux SDK: Release Notes: <release notes link: to be populated after web publish>
- Desktop Linux SDK: Development Guide: http://processors.wiki.ti.com/index.php/Desktop-linux-sdk_01.00.00_Development_Guide
- Desktop Linux SDK : Guide to Rebuild DSP images: http://processors.wiki.ti.com/index.php/Desktop-linux-sdk_01.00.00_DSP_Rebuild_Guide
Technical Support and Product Updates[edit]
For technical discussions and issues, please visit
- C66x Multicore forum: http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639.aspx
- BIOS Embedded Software forum: http://e2e.ti.com/support/embedded/f/355.aspx
- Code Composer Studio forum: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/3131.aspx
- TI C/C++ Compiler forum: http://e2e.ti.com/support/development_tools/compiler/f/343/t/34317.aspx
- Embedded Processors wiki: http://processors.wiki.ti.com
Note: 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”)