文档库 最新最全的文档下载
当前位置:文档库 › LinuxDspTools_GettingStartedGuide_v98

LinuxDspTools_GettingStartedGuide_v98

LinuxDspTools_GettingStartedGuide_v98
LinuxDspTools_GettingStartedGuide_v98

Linux DSP Tools DSP Development for TI OMAP5912

Getting Started Guide

Document Version 0.98

PRELIMINARY

Contents

Chapter 1 Introduction

1.1 OMAP5912 Application Development

1.2 OMAP5912 c55xx DSP Application Development on Linux Hosts

1.3 Linux Hosted build, Printf debug using low impact LOG_printf

Chapter 2 Installing Linux DSP Tools

2.1 Dependency Checklist (supported platforms, required features)

2.2 Additional Requirements

2.3 Installation

2.3.1 Linux DSP Tools

2.3.2 Codegen – compiler, linker for 55xx DSP

2.3.3 DSP/BIOS – real time OS for 55xx DSP

2.3.4 DSP/BIOS Link – inter-processor communications

2.3.5 RTA Tool Kit – Real Time Analysis software development kit

2.3.6 Reference Framework – RF6

2.3.7 Collateral Pack - xDAIS, PSL, IMGLIB, DSPLIB, RTDX from CCS 2.21

2.3.8 Messaging (MSGQ support)

Chapter 3 Setting up for development

3.1 Build DSP/BIOS Link

3.2 Build and Run ‘Hello World’ from DSP

3.3 Build and Run RF6

3.4 Modify RF6 to add LOG_printf to syslog

3.5 Build and Run Loop example

Addenda

Support

Useful Tips

Chapter 1

Introduction

1.1 OMAP5912 Application development

The OMAP5912 System on a Chip (SoC) provides an ARM9 + 55xx DSP connected via shared memory with a boatload of peripherals. The OMAP5912 Starter Kit, OSK5912, provides an OMAP5912 evaluation board with Ethernet, USB and serial interfaces. The ARM development environment supplied with the OSK5912 is GNU embedded Linux using MontaVista PreView edition.. The developer has two choices for DSP development: 1) Purchase Code Composer Studio + JTAG emulator, or 2) Use Linux DSP Tools for OSK5912. The first option, CCS, provides a complete integrated development environment (single step JTAG debugger, codegen, etc..). The second option, Linux DSP Tools, provides Linux hosted tools (compiler, Gnu make, Tconf) to build DSP applications and the foundational target content so that the developer can start from an existing base of robust working software on the DSP. This document addresses installation and setup to get started using the Linux DSP Tools option.

1.2 OMAP5912 c55xx DSP Application Development on Linux Hosts

The Linux DSP Tools distribution bundles together five standalone products: 1) c55xx codegen, 2) DSP/BIOS, 3) DSP/BIOS Link with MSGQ, 4) RF6, and 5) Real Time Analysis Software Developer’s kit (RTA SDK), and supplies a Getting Started Guide to step user’s through install, setup, and the start of application development.

Linux DSP Tools provides the following x86 PC Linux hosted tools for building DSP applications:

C55xx Codegen Compiler, Linker, Assembler, runtime library

DSP/BIOS Tconf Configuration tool for DSP/BIOS real time kernel.

Gnu Make (gmake) Make utility, comes with DSP/BIOS package

Linux DSP Tools provides the following foundational target content for DSP development.

DSP/BIOS Real time kernel. Configurable, scalable, deterministic task scheduling with

API’s for real time analysis.

DSP/BIOS Link Program load, memory read write, shared memory channel driver for inter-

processor communications between OMAP5912 ARM9 and c55xx DSP DSP/BIOS RTA SDK Real time analysis software developers kit. Provides transport and

rendering of LOG_printf and STS data from DSP to ARM side applications.

Reference Frameworks (RF6) RF6 is application starter-ware. Built on DSP/BIOS and Link provides, codec driver, algorithm socket, data streaming between audio codec, DSP and ARM.

Messaging (MSGQ) The Windows PC buildable distribution of Messaging is supplied. This provides the libraries and headers to support using MSGQ, but no support for

building with makefiles is provided in this release.

Target Content from CCS 2.21 Libraries and headers from CCS 2.21 for c5500 targets are supplied for Real Time Data Exchange (RTDX), Power Scaling Library (PSL), DSP Algorithm Interface Standard (xDAIS), Digital Signal Processing Function Library (DSPLIB) and Image Processing Library (IMGLIB).

1.3 Linux Hosted build, Printf debug using low impact LOG_printf

OMAP Applications consist of ARM and DSP executables built on a Linux Host. The ARM side development uses GNU tool chain provided by MontaVista. This guide is written assuming use of MontaVista 3.1 Preview Kit as provided with the OSK5912 package. There are dependencies between the content provided. In particular between DSP/BIOS Link and MontaVista Linux. User’s are able to readily rebuild the MontaVista Embedded Linux kernel (MV Linux) with varying configuration options. The recommended practice is to rebuild DSP/BIOS Link after changing the configuration of MV Linux. Another dependency is with Reference Framework, RF6, which requires pthreads to be enabled in MontaVista, an option provided as default with the OSK5912. The other dependency to note is that DSP side executables must be built with the same options configured for ARM side DSP/BIOS Link, recommendation is to use PROC+CHAN+MSGQ.

To share files built on the on the Linux Host, an NFS mounted ‘share area’ is created. From the perspective of this guide, this are is known as the ‘run’ area since files are copied to this location to be run on the OSK5912 embedded Linux device.

Running an application consists of launching an ARM side executable from a minicom serial or ethernet terminal OSK session. The ARM side executable typically takes as a command line parameter the name of the DSP executable (coff file) and will load and run the DSP executable through DSP/BIOS Link API’s. Examples of this type are provided with the RTA SDK, Reference Frameworks RF6 and DSP/BIOS Link example LoopGpp.

DSP executables are able to provide LOG_printf 4 word tokens to an ARM side utility, rtaTrace, that reads and renders them into formatted strings in the sys log. In the event the DSP executable crashes, a ‘post mortem’ capability is provided that reads the residual LOG_printf data (see RTA SDK docs for details or running kill -3 ). LOG_printf is optimized for the hard real time environment of the DSP, typical impact is around 30 instruction cylcles as compared to more than 30,000 for traditional printf.

The key to developing with LOG_printf is to make small incremental changes starting with a known good base of working software. Reference Framework RF6 is provided as starter-ware to provide this base.

1.4 Notes

This doc is written in a deterministic style, i.e., it documents the exact steps to integrate the various software products making a recommendation about the directory names and structure to enable future upgrades of individual components. Advanced users should be able to read the instructions and make their own

decisions about where to place the software packages.

Chapter 2

Installing Linux DSP Tools

2.1 Dependency Checklist - supported platforms, required features

Required:

1) OSK5912 from Spectrum Digital – Beta kit or newer.

2) x86 PC Linux Development host (Red Hat v7.3 or Red Hat v9) with root access.

Checklist (with notes where appropriate) to complete before continuing:

X86 Linux Development host – RH7.3 or RH9 required for MontaVista Linux install.

Root (or pseudo) access

System services

TELNETD

FTPD

NFSD (verify by running /sbin/service nfs status)

GNU Developer tools (GCC, etc.)

The default set is sufficient for development

Recommend installing ‘Expect’ as this will assist in installation of Linux DSP Tools. An ‘Expect’ script is provided as an alternate to the detailed instructions to automate the installation.

? To install ‘Expect’: Run the Red Hat Package manager (System Settings->Add/Remove Applications). Under Development category, open the Development Tools – check the box

for ‘expect – a tcl extension for simplifying program-script interaction.’

Korn Shell is required for BIOS config (Tconf) – not installed by default on Red Hat Linux (ACTION REQUIRED).

? To locate korn shell for Linux, two options: a) go to https://www.wendangku.net/doc/3e340084.html,, b) Disk2 of Red Hat9

? On disk2 of the Red Hat install disks, cd to /RedHat/RPMS disk 2

? As root, run the command: rpm -Uvh pdksh-5.2.14-16.i386.rpm

HTML browser and PDF viewer to read documentation.

Minicom – serial communications program. Either run as root, or make sure user read /write for the ttys0 device (from com1). Minicom comes in the default Workstation Install of Red Hat 9.

TFTP – trivial file transfer protocol. This is recommended for transferring Linux kernel image to uBoot for flashing the Linux kernel.

OSK5912 from Spectrum Digital

OMAP5912 OSK development board with power supply, serial cable, Ethernet cable

CDROM: MontaVista Linux Professional Edition 3.1 – Preview Kit for OMAP5912 OSK Professional CDROM: Spectrum Digital CD (schematics, app notes from TI, etc.)

OMAP5912 Starter Kit (OSK5912) User’s Guide

Connection between OSK5912 and Linux Host

Linux Host PC COM1 ( or 2) connected to serial port on OSK5912

Ethernet connection between OSK5912 and Linux Host, recommend using a router.

Other connections

Recommended: Mini-jack stereo audio cable to supply audio input to the OSK5912

Recommended: Headphones or speakers

Read and follow the instructions for Sections 1 and 2 of the OMAP5912 Starter Kit User’s Guide (printed copy comes in the OSK5912 box). This will insure the OSK5912 board is working and ARM side MontaVista embedded Linux is installed, setup, built and ready for development.

Section 1 – Quick Start

1.1 Booting the OSK5912

? Strongly recommended step on Linux PC is to run ‘minicom –s’ to setup. Serial port settings 115200, 8, N , 1, No hardware or software flow control. Also, change Modem and

dialing parameters: delete ‘Init String’, ‘Reset String’ and ‘Hangup’ String. Save to default

and exit. (in Terminal window: ‘man minicom’ or select Help->Index->minicom for more

info).

1.2 Running the Audio Demo

? This section walks you through running the RF6 application burnt into the flash file system of the OMAP5912 OSK board – a good sanity check and prep for later running RF6 supplied

with the Linux DSP Tools installation.

Section 2 – Developing with Linux.

2.1 Overview

2.2 Installing MontaVista Preview Kit

2.3 Installing a local copy of the Preview Kit

2.4 Building the Linux Kernel

2.5 Booting the OSK with a target file system

? Step 4 indicates to start Hyperterminal and use Kermit to transfer the uImage file from a Windows PC. For the Linux PC, ‘minicom’ doesn’t work due to an incompatibility with uBoot

and kermit. The alternative for Linux PC is to use TFTP. The Spectrum Digital website

gives instructions for this at https://www.wendangku.net/doc/3e340084.html,/osk5912/factoryconfig.html

2.6 Building and Running a “Hello World” application.

2.2 Additional Requirements

Refer to release notes (doc/release_notes_linuxdsptools.html) for additional requirements.

2.3 Installation

Overview: Install Linux DSP Tools (LDT) by copying the installation package into a temporary location. This installation requires acceptance of a Eula, then provides the sub-package installs for Codegen, DSP/BIOS, DSP/BIOS Link, RF6, and RTA SDK. Run the install and direct the resulting sub-packages to another temporary location as each of these software packages will then be installed or untar’d into the desired location. The instructions below will guide you step by step presuming root access, though the packages can be installed into a ‘user’ area just the same (see table below for recommendations).. Once installed, Chapter 3 will provide instructions on making development areas and setting up ‘starter ware’ to begin DSP app development.

Suggested install locations:

Action Logged in as ‘root’ Logged in as ‘user’ Temporary location to copy LDT install package /tmp /home//tmp Destination directory when running LDT install

/tmp/ldt /home//tmp/ldt package

/opt/ti_dsptools /home//ti_dsptools Destination directory when installing sub-package

installs

Notes on instructions:

Note1: Logged in as root in a text based terminal.

Note 2: /opt chosen as it’s the standard location for ‘Add-on software packages’

Note 3: /tmp chosen for base of install as these will be deleted once installed /opt

2.3.1 Install Linux DSP Tools [Time: 10 min ]

These instructions assume logged in as root in a terminal session. The Linux DSP Tools can be installed as user, substitute the destination directory in a user account area. The times listed for each section are approximate.

- 1) Copy the installation package into a temporary location. (Note: XX is used to de-couple this document from the actual version proved, ex. linuxdsptools_v1_00_00_02.bin).

o cp linuxdsptools_v1_00_00_XX.bin /tmp

- 2) Change permissions (chmod), if not already executable, on the installation file.

o cd /tmp

o chmod +x linuxdsptools_v1_00_00_XX.bin

- 3) Run the install from /tmp and and supply a destination directory, recommend /tmp/ldt. Note: omit the option ‘-console’ for graphical install.

o ./linuxdsptools_v1_00_00_XX.bin –console

- 4) During the install you will be prompted to accept the EULA, after having done this, you will be prompted to supply a destination directory, for the purpose of these step by step instructions, /tmp/ldt is recommended.

o /tmp/ldt

- 5) After the installation finishes, change directory to the destination and check the listing for directories containing sub-package installs for bios, cgtools, collateral_pack, doc, dsplink, msgq, rf, and rtatools.

o cd /tmp/ldt

o ls

- 6) Create a destination directory where the sub-packages will be installed.

o mkdir /opt/ti_dsptools

- 7) Important Note: there is an ‘Expect’ script included in the root of the install (/tmp/ldt) that automates steps 2 thru 7. This requires ‘Expect’ to be installed (or wish to install it) then run this script as this is automation for Steps 2 thru 7. Otherwise go to Step 2. The instructions provided assume root privileges.

o ./subpkg_install_linuxdsptools.exp /opt/ti_dsptools

- Note: If ‘Expect’ script was used, the install is complete. go to Chapter 3

2.3.2 Install 55xx Codegen tools

[Time: 5min]

- 1) Create the destination directory for codegen o mkdir /opt/ti_dsptools/cgtools-c5500-v2.56

- 2) Unzip and untar the 55xx codegen tools into the development directory.

o cd /tmp/ldt/cgtools

o tar zxf c55256-linux.tar.gz –C /opt/ti_dsptools/cgtools-c5500-v2.56

- 3) The C55xx DSP code generation tools are now copied into the directory from which they will be used. There will be a top level README.txt along with bin, include and lib directories. To verify, list the directory.

o ls /opt/ti_dsptools/cgtools-c5500-v2.56

-

Step 2 complete

2.3.3 Install DSP/BIOS [Time: 5min ]

- 1) Run the installshield executable ‘setuplinux.bin’ as a console install (to run GUI install, drop the –console option).

o cd /tmp/ldt/bios

o ./setuplinux –console

-

2) The installer will ask you to accept the end user license agreement (EULA) and proceed through until the ‘Install Location’ is requested. - 3) Specify the destination directory name for ‘Install Location’:

o /opt/ti_dsptools/bios_5_03

- 4) Complete the install of DSP/BIOS 5.03. For more info on bios, at /opt/ti_dsptools/bios_5_03, there is the DSP/BIOS GettingStartedGuide.html, an index to DSP/BIOS manuals, and release_notes.html at the BIOS base directory.

o ls /opt/ti_dsptools/bios_5_03

2.3.4 Install DSP/BIOS Link [Time: 5min ] Install DSP/BIOS Link.

- 1) Unzip the DSP/BIOS Link distribution (this installs both ARM and DSP side).

o cd /tmp/ldt/dsplink

o tar -zxvf dsplink_5912osk_montavista_v112.01.tar.gz -C /opt/ti_dsptools

- 2) Verify install by looking for the directory named dsplink

o ls /opt/ti_dsptools

- 3) Rename to the install destination directory to give it a version.

o mv /opt/ti_dsptools/dsplink /opt/ti_dsptools/dsplink_1_12_01

- For more info on DSP/BIOS link, refer to the User’s Guide, Reference and Release Notes in the doc subdirectory.

o ls /opt/ti_dsptools/dsplink_1_12_01/doc

- Step 4 complete. For more info on DSP/BIOS link

2.3.5 Install RTA Tool Kit [Time: 5min ]

- 1) Change directories to the RTA SDK tools directory. Run the installshield executable ex.

‘dsp_bios_rta_setuplinux_5_00_00_XX.bin’ as a console install.

o cd /tmp/ldt/rtatools

o ./dsp_bios_rta_setuplinux_5_00_00_XX.bin –console

- 2) The install will ask you to accept the end user license agreement (EULA) and proceed through until the ‘Install Location’ is requested.

- During the install, you’ll be asked to specify the directory name, recommend:

o /opt/ti_dsptools/rta_sdk_5_00

- 3) Verify the install by listing the contents of the destination directory. The base should contain a ‘ti’ sub-directory containing the content with the User’s Guide at the top level, spru819DspBiosRtaSdkUsersGuide.pdf and release_notes.html. In addition, there is a file that lists the versions of the Real Time Analysis software developer’s kit subcomponents of the form DSP_BIOS_RTA_SDK_5.00.00.xx_Components

o ls /opt/ti_dsptools/rta_sdk_5_00

- Step 5 Complete

2.3.6 Install Reference Framework RF6 [Time: 5min ]

- 1) RF6 consists of three pieces, an application note (spra796a.pdf), an ARM side package and a DSP side package.

- 2) For future reference copy the doc directory to the development area. Note spra796a.pdf is the Reference Framework 6 Application Note.

o mkdir /opt/ti_dsptools/doc

o cp /tmp/ldt/doc /opt/ti_dsptools/doc

- 3) Install the ARM side of RF6. This will result in a directory named rf_gpp under the /opt/ti_dsptools directory. To be consistent with the other packages and pave the way for update management, this will be renamed with a version identifier.

o cd /tmp/ldt/rf

o tar zxf rf_gpp_v3_11_00_00.tar.gz –C /opt/ti_dsptools

o mv /opt/ti_dsptools/rf_gpp /opt/ti_dsptools/rf_3_11_gpp

- 4) Verify the install by listing the directory /opt/ti_dsptools/rf_3_11_gpp The listing will show directories named apps, bin, include, lib, src and Rules.mak

o ls /opt/ti_dsptools/rf_3_11_gpp

- 5) Install the DSP side of RF6.

o unzip rf_v3_11_00_00.zip –d /opt/ti_dsptools

- 6) The DSP side of RF6 will then be located in /opt/ti_dsptools/referenceframeworks.

- 7) Rename the top level DSP side directory of RF6.

o mv /opt/ti_dsptools/referenceframeworks /opt/ti_dsptools/rf_3_11_dsp

- 8) Verify the contents by listing the directory /opt/ti_dsptools/rf_3_11_dsp. The listing will show directories named apps, include, lib, src with a collection of Windows PC batch files and a top level gnu makefile.

o ls /opt/ti_dsptools/rf_3_11_dsp

-

Step 6 complete.

2.3.7 Install Collateral Pack

[Time: 5min] - 1) Install target content from Code Composer Studio, CCS 2.21. This provides xDAIS, rtdx, power scaling library, dsp lib, and image lib. Copy the bash script which demonstrates setting environment variables. Note: docs were previously copied over when installing Reference Frameworks.

o cd /tmp/ldt/collateral_pack

o unzip c5500.zip –d /opt/ti_dsptools/ccs221_content

o cp linuxdsptools_env.bash /opt/ti_dsptools

-

Step 7 complete

2.3.8 Install MSGQ [Time: 5min]

- 1) Install Messaging support for DSP/BIOS and DSP/BIOS Link. This provides source, libraries and headers from the PC distribution are provided to support message passing. The examples provided with MSGQ are not supported with makefiles for Linux build, we’ll be just using the libraries and headers in this release for the support of DSP/BIOS Link. DSP/BIOS Link requires MSGQ if certain configuration options are selected, specifically PROC + CHNL + MSGQ (more on this in Chapter 3).

o cd /tmp/ldt/msgq

o unzip msgq_v1_01_00_01.zip –d /opt/ti_dsptools/

o mv /opt/ti_dsptools/messaging /opt/ti_dsptools/msgq_1_01

- Step 8 complete

Chapter3

Setting up Linux DSP Tools for development

Overview: This section assumes that you have followed the instructions in the OSK5912 User’s Guide (specifically sections 2.4, 2.5 and 2.6) and have installed and built MontaVista Linux on the host Linux PC and then programmed the kernel into the flash on the OSK5912. Here’s an overview of the steps detailed in the next section to setup for DSP development:

Build DSP/BIOS Link: First step is to build the ARM (gpp) and DSP side of DSP/BIOS Link, the conduit between the ARM and the DSP, so that it is in sync with the version and configuration of MontaVista Linux programmed into the flash on the OSK5912 and is configured correctly with respect to data

executables built for the DSP. For more info on DSP/BIOS Link, see the doc directory off the top of the install, ex. /opt/ti_dsptools/dsplink_1_12_01/doc.

Run ‘Hello World’ on DSP: Next step is to load and run a pre-built ‘hello world’ DSP app provided with the RTA SDK. This will give insight into the ‘printf style’ debug support provided by the RTA SDK and workflow steps necessary to move development software from Linux host to embedded Linux platform, start and run DSP/BIOS Link, then load and run a DSP executable. For more info on the RTA SDK, see the doc index at the top of the install, ex.

/opt/ti_dsptools/rta_sdk_5_00/index_bios_rta_manauls.html.

Modify, build and run RF6. The OSK5912 User’s Guide walks through running RF6, this section describes how to modify, build and run RF6. Specifically, modify the DSP-side of RF6 to send

LOG_printf data to ARM by changing a configuration parameter in a DSP/BIOS Tconf script and

leveraging the RTA SDK library. This results in the LOG_printf data from RF6 being available from the ARM. As a note, RF6 is recommended as starter-ware for developing multi-tasking DSP applications and comes with drivers and infrastructure for streaming stereo CD quality audio data sampled from the audio codec (LINE IN) through DSP/BIOS Link to the ARM and back to DSP and out through audio codec (HEADPHONE). Adding the LOG_printf debugging capability paves the way for app

development. For more info on RF6 see the appnote in the install area:

/opt/ti_dsptools/doc/spra796a.pdf.

Build and run Loop GPP example. Loop GPP is a simpler alternative to RF6 as starter-ware. This example streams data from the ARM to the DSP which then copies it back the ARM.

3.1 Build DSP/BIOS Link [Time: 30 min ]

DSP/BIOS Link provides a multi-channel inter-processor communications driver for communicating between ARM and DSP. DSP/BIOS Link is provided as a source code distribution, in the spirit same spirit as open source Linux. This section describes making a development copy of DSP/BIOS Link, setting configuration parameters and building first the ARM side libraries and modules for compatible configuration with Montavista Linux (ARM side), then the DSP side libraries with the same configuration options.

- 1) First, let’s create a set of environment variables that will be used throughout the remaining steps when configuring makefiles and also provides some useful directory shortcuts. The file linuxdsptools_env.bash is provided for this purpose. This file has been copied to /opt/ti_dsptools from actions in the previous section. Open this file and make note of the contents, some user’s may want to replace $HOME with the absolute path. Add this script to the ‘.rc’ file associated with your ‘user’ shell, (ex. .bashrc) as this will provide the environment variables and PATH necessary for developing with the various components, ie, add the line ‘source /opt/ti_dsptools/linuxdsptools_env.bash’ to the ‘.rc’ file. It’s important to note that these will apply to the shell used for development, so it’s necessary to switch to the ‘user’ account that will be used for development. Observe that some variables are based in $HOME while others are in /opt/ti_dsptools (Note: $HOME applies to the ‘user’ account not to root). The reasoning is components such as DSP/BIOS and 55xx Codegen are used, while other components such as DSP/BIOS Link and RF6 are built (copied to $HOME). The following sections in chapter 3 will guide your through copying each of the components to your user area. The contents of the bash script are shown below and the remainder of this document will presume these variables are set. Root privileges are assumed to begin, then a change to user to edit .rc file.

o cd /opt/ti_dsptools

o linuxdsptools_env.bash insure all environment variables are correct. Final step is to source the linuxdsptools_env.bash script so the variables are available in this

session. To insure correctness, cd to each variable after source the script, for example type

‘cd $DSPLINK’ to verify DSPLINK.

- export DSPLINK=$HOME/dsplink_1_12_01

- export MSGQ=/opt/ti_dsptools/msgq_1_01

- export BIOS=/opt/ti_dsptools/bios_5_03

- export CGTOOLS=/opt/ti_dsptools/cgtools-c5500-v2.56

- export RF_GPP=$HOME/rf_3_11_gpp

- export RF_DSP=$HOME/rf_3_11_dsp

- export RTASDK=/opt/ti_dsptools/rta_sdk_5_00

- export OSK_SHARE=$HOME/montavista/filesys

- export OSK_WORK=$OSK_SHARE/opt

- export PATH=$PATH:$DSPLINK/etc/host/scripts/Linux:

/opt/montavista/previewkit/arm/v4t_le/bin:/opt/montavista/prev

iewkit/host/bin

o

o su

o cd /home/

o .bashrc (assuming bash as shell) add the following line:

- source /opt/ti_dsptools/linuxdsptools_env.bash

o

o source /opt/ti_dsptools/linuxdsptools_env.bash

- 2) Logged in as ‘user’, make a development copy of the dsplink_1_12_01 directory by copying from the install area to the user development area. Next, go to the directory that contains the DSP/BIOS Link config scripts.

o cp -r /opt/ti_dsptools/dsplink_1_12_01 $HOME

o cd $DSPLINK/etc/host/scripts/Linux

- 3) Change the permissions on the file ‘dsplinkcfg’ to execute and run it. This launches a perl script that configures DSP/BIOS Link.

o chmod a+x dsplinkcfg

o ./dsplinkcfg

- 4) The first menu confirms the environment variable DSPLINK is set correctly, if this is not correct return to the step where the gppenv.bash file is edited and make sure the DSPLINK variable is pointing to the location of development copy of DSP/BIOS Link. Note: if DSP/BIOS Link configurations are changed, use ‘gmake –s clean clobber’ before making the config change in $DSPLINK/gpp/src and $DSPLINK/dsp/src directories.

o If DSPLINK is correct, select ‘1’ to continue

o Next, select ‘1’ the OMAP5912 OSK GPP platform.

o Select ‘1’, OMAP as the DSP platform

o Choose option ‘3’ to select MontaVista Linux Pro 3.1 Preview Kit.

o Choose option ‘2’ to select c55xx BIOS v5.00 for Linux

o Choose option ‘1’ to select PROC+CHNL+MSGQ build configuration. DSP/BIOS Link is scalable and this is one of the configuration options that affects size of DSP/BIOS Link. As

a side effect, this also affects the layout of data structures that need to be the same between

ARM and DSP. The DSP examples that are pre-built have been built with the PROC +

CHNL + MSGQ option which is the reason for selection option 1, as you gain experience

configure (optimize) link for the particular needs of your application.

o Select ‘0’ – trace not enabled. Recommend reading DSP/BIOS Link User’s Guide in $DSPLINK/doc to explore this and other features.

o Select ‘0’ – profiling not enabled.

o Finally, select ‘0’ – probe not enabled

o Config is complete – configuration generated into $DSPLINK/config/CURRENTCFG.MK

- 5) Next, edit the $(DSPLINK)/make/Linux/osk5912_mvlpreviewkit3.1.mk file located in $DSPLINK/make/Linux to specify the correct base locations of Montavista components, this file and settings are for Montavista Preview kit, refer to DSP/BIOS Link User’s Guide for details for Pro version of Montavista. Note: development builds should be performed logged in as user, not root.

o cd $DSPLINK/make/Linux -

o osk5912_mvlpreviewkit3.1.mk - set the following variables:

- BASE_BUILDOS := $(HOME)/montavista/kernel/linux

- BASE_CGTOOLS := /opt/montavista/previewkit/arm/v4t_le/bin

- BASE_OSLIB := /opt/montavista/previewkit/arm/v4t_le/lib

- OSLIB_PLATFORM := $(HOME)/montavista/filesys/lib

- STD_LD_FLAGS := -lc $(HOME)/montavista/filesys/lib/libpthread.so.O

- 6) Change directories to the gpp/src directory. Clean and Build the ARM side of DSP/BIOS Link. (This assumes the DSPLINK and PATH environment variable are set as described above). Note the ‘-s’ silent option can be passed to gmake and depending on the version of gmake the output will be easier to read, leave off the –s for verbose output. Note: gmake ver 3.80 is provided by DSP/BIOS in /opt/ti_dsptools/bios_5_03/tconf/bin.

o cd $DSPLINK/gpp/src

o gmake –s clean

o gmake –s

- 7) The release versions of the kernel module (dsplinkk.o) and user library (dsplink.lib) will be created in $DSPLINK /gpp/export/BIN/Linux/OMAP/RELEASE upon successful completion of the build.

o ls $DSPLINK/gpp/export/BIN/Linux/OMAP/RELEASE

- 8) It’s now time to build the DSP side of DSP/BIOS Link now that the ARM side kernel module and library of have been built. As noted above, DSP/BIOS Link has configuration options, which must be the same between ARM and DSP side – notably the selection of PROC + CHNL + MSGQ as this affects a

shared data structure among other things. Since the edit of the c55xx_5.00_linux.mk makefile located in $DSPLINK/make/DspBios is prone to typo’s, here’s a helpful Makefile debug tips: – add the statement: $(warning $CGTOOLS)) to the makefile to help debug if CGTOOLS (for example) is properly resolved. Also, insure that file permissions are set correctly, build errors can occur that are tough to pinpoint if files are inadvertently owned by root (by editing or building with root permissions) in the user area.

o cd $DSPLINK/make/DspBios

o c55xx_5.00_linux.mk

- BASE_BUILDOS := $(BIOS)/ti/bios

- BASE_CGTOOLS := $(CGTOOLS)/bin

- BASE_TCONF := $(BIOS)/tconf

- BASE_PLATFORMS := $(BIOS)

- BASE_OSINC := $(BASE_BUILDOS)/include

- BASE_CGTOOLSINC := $(CGTOOLS)/include

- BASE_MSGQINC := $(MSGQ)/include

- BASE_OSLIB := $(BASE_BUILDOS)/lib

- BASE_CGTOOLSLIB := $(CGTOOLS)/lib

- BASE_RTDXLIB := $(CCS_DIR)/c5500/rtdx/lib

- BASE_CSLLIB := $(CCS_DIR)/c5500/csl/lib

- BASE_PSLLIB := $(CCS_DIR)/c5500/psl/lib

- BASE_MSGQLIB := $(MSGQ)/lib

- Change directories to $DSPLINK/dsp/src, clean and build. A successful build will produce the dsplink.lib library in the directory $DSPLINK/dsp/export/BIN/DspBios/OMAP/RELEASE. Note: there are some remarks generated during the build that can be ignored, see section 12 “Build DSP side sources” in the DSP/BIOS Link User’s Guide in $DSPLINK/doc.

o cd $DSPLINK/dsp/src

o gmake –s clean

o gmake –s

o ls $DSPLINK/dsp/export/BIN/DspBios/OMAP/RELEASE

- Step 3.1 is complete – ARM and DSP sides of DSP/BIOS Link has been built.

相关文档