Building DSPLink Applications

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Overview

There are several ways to build your own DSPLink applications. The intent of this page is to cover some of the basics so that you can quickly start developing your own applications.

Method 1: Modifying a sample application

DSPLink ships with several applications to demonstrate its capabilities. Each example consists of a program for both the GPP and DSP. These can be found at the following location:

For this method we will be taking an example, making a copy (remaining inside the dsplink directory structure), and then modifying it. It is recommended to read the chapter, "Understanding the MAKE System" which is part of the DSPLink User Guide (dsplink/doc/UserGuide.pdf).

Copying an example

Let's say we want to use the "loop" example as a starting point. First, we can make copies of the "loop" directories. Let's call our new directory "loop_new". After the copy we now have the following directories:

Editing the DIRS file

The DSPLink build system utilizes a DIRS file to tell the make system what other directories it should go build. Let's take the following example:

> cd $DSPLINK/gpp/src/samples
> make

When we invoke make from the samples directory it will go into all the subdirectories specified by the DIRS file and invoke make there too.

If you want your newly created directory to be built along with all the other samples you could make an edit like this:

Before

DIRS  :=

ifeq ($(USE_CHNL), 1)
    DIRS += loop
        ifeq ($(USE_MSGQ), 1)
        DIRS += scale
        endif # ifeq ($(USE_MSGQ), 1)
endif # ifeq ($(USE_CHNL), 1)

After

DIRS  :=

ifeq ($(USE_CHNL), 1)
    DIRS += loop loop_new
        ifeq ($(USE_MSGQ), 1)
        DIRS += scale
        endif # ifeq ($(USE_MSGQ), 1)
endif # ifeq ($(USE_CHNL), 1)

Editing the COMPONENT file

The COMPONENT file is located in the OS-specific subdirectory (e.g. loop_new/Linux or loop_new/DspBios). There are several updates that need to be made to reflect our new directory:

Editing the SOURCES file

The SOURCES file is used by DSPLink's make system to specify your source files that need to be compiled. For example if you create myfile.c then you could modify the SOURCES file like so:

Before

SOURCES := loop.c

After

SOURCES := loop.c myfile.c

Method 2: Building a "stand alone" DSPLink application

Note: The following is mostly just some quick thoughts. It needs a lot more work! Feel free to contribute examples, etc.

Motivation

The easiest way to get started is "method 1" where you can expand upon an already working application. However, that's not always desirable. For example, one might already have a significant code base running only on the GPP side (perhaps ported from an earlier single-core project) and later decide to add some DSP functionality. In this case it is easier to start with the existing application and add to it.

Where are all the files buried?

Libraries

The libraries and drivers are located in the following locations:

dsplink/gpp/export/BIN/<OS>/<PLATFORM>/<VARIANT>/<DEBUG|RELEASE>
dsplink/dsp/export/BIN/<OS>/<PLATFORM>/<VARIANT>/<DEBUG|RELEASE>

For example, if you're building for a Linux target OS running on OMAP3530 you would find the "release" build at

dsplink/gpp/export/BIN/Linux/OMAP/3530/RELEASE
dsplink/dsp/export/BIN/Linux/OMAP/3530/RELEASE

You would need to add those paths to the linker search path for the ARM and DSP builds. You would then link in the libraries contained inside (dsplink.lib, component libraries)

Compiler Configuration

There are text files generated in the same directories as the libraries. These text files should be used to get a list of all the preprocessor search paths, preprocessor DEFINES, etc.

Method 3: Building a DSPLink application using a CCS project file

Motivation

Many application writers already have a significant code base running only on the GPP side (perhaps ported from an earlier single-core project) and later decide to add some DSP functionality. Also many application writers are more comfortable using a CCS project rather than a command line make based build system.

Steps to create a CCS project for building a DSPLink sample application

This discussion is relevant for BIOS 5.xx and CCS 3.xx

Project -> New
   Give a Project name: DSPLinksamplebuild
   Give a location
   Executable - .out
   Give a target: TMS320C64XX

Configure DSPlink using the dsplinkcfg script. This will generate a file CURRENTCFG.MK in the default location $DSPLINK/config/BUILD/CURRENTCFG.MK This file has defines

# TI_DSPLINK_DSP0_INC_PATH - This gives the include paths to be set in Build options of the project
# TI_DSPLINK_DSP0_DEFINES - This gives the compiler pre-processor defines to be set in Build options of the project
# TI_DSPLINK_DSP_COMMON_DEFINES - This gives additional compiler pre-processor defines to be set in Buildoptions of the project

Build DSPLink Build $DSPLINK/dsp/src in VERBOSE mode (make VERBOSE=1) Choose an example which mirrors the application needs. For e.g. if you are using RingIO IPC you can choose the RingIO sample. Choose debug or release build depending on your application needs. The pre-processor defines and compiler flags are different between the two. Build $DSPLINK/dsp/src/samples/ring_io

The build step will generate some textual files in the folder $dsplink/dsp/export/BIN/DspBios/<platform>/<gem>/<DEBUG|RELEASE>

# RING_IO_defines.txt - This gives the compiler preprocessor defines to be set in Build options of the project
# RING_IO_flags.txt - This gives the compiler flag to be set in Build options of the project
# RING_IO_includes.txt- This gives the include paths to be set in Build options of the project

Sample CCS project for building a DSPLink sample application

Attached is a sample CCS project file File:DSPLinkSampleBuild.zip for the RingIO sample in release build for DSPLink version 1.61. In order to use this

prog.module("GBL").PROCID          = 0;
Source="dsp\BUILD\DM6446GEM_0\RING_IO\BIOS_DEB\ring_iocfg.s62"
Source="dsp\BUILD\DM6446GEM_0\RING_IO\BIOS_DEB\ring_iocfg_c.c"
Source="dsp\src\samples\ring_io\DspBios\5.XX\DM6446GEM\ring_io.tcf"
…
…
…
Source="dsp\BUILD\DM6446GEM_0\RING_IO\BIOS_DEB\ring_iocfg.cmd"
…
…
…
["dsp\BUILD\DM6446GEM_0\RING_IO\BIOS_DEB\ring_iocfg.cmd" Settings: "Debug"]
Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox