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.06 Getting Started Guide

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png


Desktop Linux SDK



Version 1.0.0.6 Alpha Release

Getting Started Guide

Last updated: 07/28/2014


Introduction[edit]

c66x-multicore.jpg

(Note: This page has the instructions for the latest Desktop linux sdk 01.00.00 (version 01.00.00.06)release. If you are using a release older than 01.00.00.06. Please check specific instructions in the archived section below :Archived Pages )

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 , DSPC-8682E

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)
c) Octal C6678 BRD – ADVANTECH (LIGHTNING DSPC-8682E):(Advantech Lightning DSPC-8682E)
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: version 2.22-6 or later

<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



Using larger and pre-reserved contiguous memory allocation: Optional[edit]

The default contiguous memory driver, which is part of the desktop linux sdk allocates the memory dynamically. Hence the allocation of contiguous memory is not guaranteed, especially if the memory is defragmented due to memory usage by other applications running on the desktop.
The Desktop linux sdk can be configured to use reserved memory at boot time to guarantee allocation of memory during runtime.
[NOTE: Please note this procedure only works if the memory on the desktop is more than 4 GB. If the memory is <= 4 GB, this is not recommended. Skip this step if using < 4GB]
The following procedures are required to configure the boot time reservation of memory.

[NOTE: If there was an earlier release of desktop linux was installed on this machine. It is recommende to use ./uninstall_grub.sh before executing the install grub in the following procedure]

<syntaxhighlight lang='bash'> cd demos/scripts ./install_grub.sh <memory to be reserved in MB> </syntaxhighlight>
For example to reserve 520 MB, use the following command. <syntaxhighlight lang='bash'> ./install_grub.sh 520 </syntaxhighlight>

This script will show the lines getting changed in the grub configuration file on your desktop and request permission to do the change. <syntaxhighlight lang='bash'> Please confirm to replace line(Y/n) </syntaxhighlight> If the change is acceptable press Y. Then the script will proceed to update the grub and the source files to match the memory configured and recompile the driver. Then follow the steps below to enable loading of the driver automatically. After finishing all the steps, the system need to be powered down and restarted for the reserve memory driver to work.

Later on, if required to uninstall the reservation and return back to regular memory allocation, the following script can be used <syntaxhighlight lang='bash'> ./uninstall_grub.sh </syntaxhighlight>

Install cmem autoload and set permissions for pcie access[edit]

The following steps are needed to install cmem driver and set PCIe resource permissions for access by user space driver. This also takes care of automatically loading the cmem driver and set permissions for the user space driver on boot up through udev.

NOTE: These steps need 'super user (sudo) privilege' to execute these scripts.

Step 1: Load and setup auto load for cmem driver <syntaxhighlight lang='bash'> cd demos/scripts ./install_cmem_autoload.sh </syntaxhighlight>

Step 2: Set permissions and setup udev for automatic setting of permissions on bootup. <syntaxhighlight lang='bash'> cd demos/scripts ./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 "testfiles" on the same base directory the Destop Linux SDK is installed: <install_dir>/desktop-linux-sdk_<version>/../testfiles/test.file

For example, if you are in the destkop-linux-sdk_<version&gt directory, create a directory and put a test file as follows.

<syntaxhighlight lang="bash"> mkdir ../testfiles cp <anyfile.file> ../testfiles/test.file </syntaxhighlight>

The size of the data payload per message to DSP is determined by command line paramter at run time. 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 and using a payload size input during command line as 4 MB( 0x400000), the minimum file size to be used is recommended to be >256 MBytes (2 * 32 cores * 4 MB ), so that all the cores in the card are used in the test at least twice.

Here are the steps to run the Demo


1. Download init DSP image to initialize the DSPs DDR

There are 2 alternate methods to do this step.


Alternative 1: This step can be used to automatically detect the type of card in the system and download the appropriate init code to all dsps


Run the commands:
<syntaxhighlight lang="bash"> cd demos/scripts ./init_dsps.sh <cpu frequency> </syntaxhighlight>



Alternative 2: This step assumes that the type of card in the system is known.


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>

For Octal C6678 : DSPC8682 @1 GHz operation <syntaxhighlight lang="bash"> ./init_dspc8682_1000.sh 8 </syntaxhighlight>
For EVM single C6678 @1.25 GHz operation <syntaxhighlight lang="bash"> ./init_dspc8682_1250.sh 8 </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. The command structure is ./scriptfile.sh <no of dsps> <payloadsize>
For example for EVM Single C6678 platform use
<syntaxhighlight lang="bash"> ./run_dmatest.sh 1 0x400000 ./run_memcpytest.sh 1 0x400000 ./run_dspmaptest.sh 1 0x400000 </syntaxhighlight>
For Quad C6678 platform use
<syntaxhighlight lang="bash"> ./run_dmatest.sh 4 0x400000 ./run_memcpytest.sh 4 0x400000 ./run_dspmaptest.sh 4 0x400000 </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.

Reset DSP[edit]

After the dsp code is downloaded once, the dsp runs the downloaded code. In order to re-download the dsp build or to download a different dsp build, first, the dsp has to be reset. The following procedure can be used to reset all the dsps in the system. <syntaxhighlight lang="bash"> cd demos/scripts ./dspallreset.sh </syntaxhighlight>

The following script can be used to reset only a specified number of dsps. <syntaxhighlight lang="bash"> cd demos/scripts ./dspreset.sh <num_of_dsps> </syntaxhighlight>

Troubleshooting tips[edit]

See : Desktop Linux SDK FAQ

Archived Pages[edit]

Related Links[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.06 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.06 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.06 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.06 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.06 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.06 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.06 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.06 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.06 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