Software Overview

To begin developing applications, you need to install the DVEVM development environment. This section outlines the steps required to load the DVEVM software onto the development host. You will need to download the files from the Download page to get started.

The OMAP35x software approach provides interoperable, optimized, production-ready video and audio codecs that leverage DSP and integrated accelerators. These codecs are built into configurable frameworks, and are presented via published APIs within popular operating systems (such as Linux) for rapid software implementation.

The following software is provided in the Download page.

Decode demonstration software. This is provided on the EVM’s NAND flash. The hard-wired examples decode audio and video.

Prebuilt Kernel image for OMAP3525 and OMAP3530 default configuration (uImage-omap35x-evm.bin - Note that this is not a binary installer but needs to be renamed to uImage-omap35x-evm to use it for booting on OMAP3x EVM)

PSP Product Installer(AM35x-OMAP35x-PSP-SDK-setuplinux-##.##.##.##.bin) - This installation file contains the linux source and binaries for OMAP35x platform and the necessary tools required for development on Linux for OMAP35x platform. This also contains the target file system

Command prompts in this guide

Commands are preceded by prompts that indicate the environment where the command is to be typed. For example:

host $

Indicates command to be typed into the shell window of the host Linux workstation.

EVM #

Indicates commands to be typed into the U-Boot shell in a console window connected to the EVM board’s serial port. (see Setup Terminal Program) .

target $

Indicates commands to be typed into the Linux shell in the terminal window connected to the EVM board's serial port.

NOTE: The document lists down various commands that needs to be executed on the target or on
the u-boot prompt for various operations required through out the document. Kindly note that a
direct copy and paste of these commands might result in insertion of lines for a single command.
Hence it would not work on the u-boot prompt or the target. Kindly ensure that you copy the long
commands into notepad, remove the line spaces between them and add a space wherever you
have removed the line spaces, before recopying and pasting it on the command prompts.

Preparing to install

On a host system, copy the following .bin files from the Download page to a temporary location with at least 1 GB free space. Since you can delete the installation files after installing the software, a directory like /tmp is recommended.

AM35x-OMAP35x-PSP-SDK-setuplinux-##.##.##.##.tgz

dvsdk_#_##_##_##_Setup.bin

xdctools_setuplinux_#_##_##.bin

bios_setuplinux_#_##_##.bin

TI-C6x-CGT-v#.#.##.#.bin

cs1omap3530_setupLinux_#_##_##-##.bin

overlay_dvsdk_#_##_##_##.tar.gz

nfs_dvsdk_#_##_##_##.tar.gz

rootfs_dvsdk_#_##_##_##.jffs2

data_dvsdk_#_##_##_##.tar.gz

Updates to these installers may be available on the TI DaVinci Software Updates website listed in the overview topic.

Ensure all the .bin files are set with executable permissions.

host $ chmod +x *.bin

Installing the software

Installing the software used by the DVEVM involves performing the following steps:

Installing the Target Linux Software

This section explains how to install Linux for use on the target board.

Note that separate versions of Linux are used by the target and your host Linux workstation. The following Linux host operating systems are supported for use with the OMAP35x DVEVM.

Red Hat Enterprise Linux, Workstation V4, x86 32 bit

To install the Linux software, follow these steps:

Execute AM35x-OMAP35x-PSP-SDK-setuplinux-##.##.##.##.bin file (where ##.##.##.## is the current version number) from the temporary location that they were copied to extract the installers for the Linux tools, Linux kernel, and the file system.

The installer will start as a GUI application. Follow the instructions in the dialog boxes. You’ll be asked to agree to the End User License Agreement.

You will be prompted to provide the installation directory. If installed from a normal user account the default install path will be “/home/<useracct>/AM35x-OMAP35x-PSP-SDK-##.##.##.##”. If installed with root permissions the default install path will be “/opt/AM35x-OMAP35x-PSP-SDK-##.##.##.##”. In future, all references in the document will assume that the user has installed the OMAP35x SDK using his user account and hence will refer to the OMAP35x SDK installation path as /home/<useracct>/AM35x-OMAP35x-PSP-SDK-##.##.##.##

Note: The Linux Support Package (LSP) shipped with the OMAP35x DVEVM is a multi-platform LSP and is not configured for a particular platform. As shipped, this LSP cannot be used to build the demo or example applications. It must first be copied to a user area and configured/built for the OMAP35x EVM. Please see the Rebuilding the Linux Kernel section for instructions.

Installing the DVSDK Software

The TI DVSDK software includes demos, example software, Codec Engine components, DSP/BIOS Link, xDAIS and xDM header files, Local Power Manager Module, Framework Components and a contiguous memory allocator for Linux (CMEM). The DVSDK also contains the Digital Video Test Bench that enables testing the codecs and LSP with various configurations that are not possible with the Out of the Box demos.

Note: The installers for XDC, DSP/BIOS and Code Generation Tools (codegen) have a different default installation location. However, we strongly recommend that you change the default installation locations to place the components together (if you have not already installed the Linux versions of these components elsewhere). This simplifies the build setup steps.

To install the DVSDK software using the DVSDK Linux installer, follow these steps:

Log in using a user account. In the following steps, we refer to the home directory as "~".

Execute the DVSDK installer that you previously downloaded from the DVSDK download page. For example:

host $ ./dvsdk_#_##_##_##_Setup.bin

The installer will start as a GUI application. Follow the instructions in the dialog boxes. You’ll be asked to agree to the End User License Agreement.
When you are prompted for an installation location, use the default installation location, that points to /home/<useracct>/dvsdk/dvsdk_#_##_##_##. This location will be used as the DVSDK installation folder through out this document.

Execute the XDC installer that you previously downloaded from the DVSDK download page. For example:

host $ ./xdctools_setuplinux_#_##_##.bin

When you are prompted for an installation location, do not use the default installation location. Instead, install the software in the directory created in the previous step. For example, /home/<useracct>/dvsdk/dvsdk_#_##_##_##

NOTE: When prompted select Typical for the type of Setup.

Execute the DSP/BIOS installer that you previously downloaded from the DVSDK download page. For example:

host $ ./bios_setuplinux_#_##_##.bin

When you are prompted for an installation location, do not use the default location. Instead, install the software in the directory created in step 2. For example, /home/<useracct>/dvsdk/dvsdk_#_##_##_##

Execute the Codec Server installer that you have previously downloaded from the DVSDK download page. For example:

host $ ./cs1omap3530_setupLinux_#_##_##-##.bin

When you are prompted for an installation location, install it in the location as specified or under the directory as created in step 2. For example, /home/<useracct>/dvsdk/dvsdk_#_##_##_##

Execute the Code Generation Tools installer that you previously downloaded from the DVSDK download page. For example:

host $ ./TI-C6x-CGT-v#.#.##.#.bin

When you are prompted for an installation location, install it in the location as specified or under the directory as created in step 2. If you are installing it under the DVSDK installation folder created in step 2, create a new folder under the dvsdk installation folder and then proceed to install. For example, /home/<useracct>/dvsdk/dvsdk_#_##_##_##/cg6x_#_#_##, where #_#_## is the version number.

Remember to set the environment variable as directed by the installer. For example:
csh: (in the .cshrc file)

Installing the A/V demo files

The TI DVSDK software installer, by itself does not contain the media files used by the demos. You can download the data files from DVSDK download page. Please use the steps mentioned below for extracting the media files into the desired location.

The Download page contains the Audio/Video files used by the demo. After following the instructions in the previous section, follow these instructions to install the A/V files:

Go to the DVSDK directory that you set up previously. For example

host $ cd ~/dvsdk/dvsdk_#_##_##_##/clips

Copy the A/V data which you have downloaded from Download page to your DVSDK clips directory.For example:

host $ cp data_dvsdk_#_##_##_##.tar.gz .

Extract the A/V data files. For example:

host $ tar -xvzf data_dvsdk_#_##_##_##.tar.gz

Now you can delete the tar file from the clips folder.

Installing the toolchain

This guide assumes use of the LITE version of the CodeSourcery toolchain. See CodeSourcery documentation if you are using the evaluation version that comes with this EVM or for other cases.

Toolchain version to be used for DVSDK v3.01

The toolchain used is ARM GNU/Linux EABI 2009q1. It can be downloaded from here

Exporting a Shared File System for Target Access

Although the board’s NAND flash contains a file system, during development it is more convenient to have the target board NFS mount a file system on a host Linux workstation. Once you test the application, you can store it on the board’s flash for a standalone demonstration.

Before the board can mount a target file system, you must export that target file system on the host Linux workstation. The file system uses an NFS (Network File System) server. The exported file system will contain the target file system and your executables.

To export the file system from your NFS server, perform the following steps. You only need to perform these steps once.

Log in with a user account on the host Linux workstation. (In the following steps, we refer to the home user directory as "~".)

Perform the following commands to prepare a location for the OMAP35x EVM target file system.

host $ cd ~
host $ mkdir -p workdir/filesys
host $ cd workdir/filesys

Switch user to "root" on the host Linux workstation.

host $ su
password:

There will be a prompt for entering the password as shown above. Type the root password, for getting the root permissions

If you have already prepared a directory tree to use for the NFS root file-system (see Section Rebuilding the NFS Image) you can proceed to the next step. Otherwise, copy the prepared version(nfs_dvsdk_#_##_##_##.tar.gz) from the OMAP3530 DVSDK from the Download page to a new directory created in step 2. Perform the following commands.
Note:Un-tar the file with root permissions

Make sure you exit from having the root permissions after completing all the above steps

host $ exit

Testing the shared file system

To test your NFS setup, follow these steps:

Get the IP address of your host Linux workstations as follows. Look for the IP address associated with the eth0 Ethernet port.

host $ /sbin/ifconfig

Open a terminal emulation window to connect to the EVM board via RS-232 using the instructions in the Setup Terminal Program topic. If you have a Windows workstation, you can use HyperTerminal. If you have a Linux workstation, you might use Minicom. (You may need to turn on line wrap.)

Power on the EVM board, and abort the automatic boot sequence by pressing a key in the console window. This gets you into the U-Boot prompt where you can configure how U-Boot will boot the Linux kernel.

Note that the setenv bootargs command should be typed on a single line. Also note that you should avoid using the numeric keypad to enter numbers, as it can sometimes insert extra invisible characters. These environment variables must be typed in perfectly including capitals, if anything is typoed you will likely run into boot errors.

Hints: If the kernel version stored in the NAND flash on the EVM is out of date you may wish to flash the latest kernel image (using the uImage file in the /home/<useracct>/AM35x-OMAP35x-PSP-SDK-##.##.##.##/images/kernel directory) or boot using TFTP

Hints: You may want to use the printenv command to print a list of your environment variables. You can also save these setenv commands in a .txt file from which you can paste them in the future.

Save the environment so that you don't have to retype these commands every time you cycle power on the EVM board:

EVM # saveenv

Boot the board using NFS:

EVM # boot

You can now log in as "root" with no password required.
See the Alternate boot methods section for information about booting with TFTP, NFS, or the board's NAND flash.

Notes on using production codecs

As part of the OMAP35x DVSDK installation, you received a number of codecs:

Advance Audio Codec (AAC) Decoder. This decoder supports both AAC-HE and AAC-LC configurations. It is compliant with IAUDDEC1 interface

G.711 Speech Decoder. This decoder is compliant with ISPHDEC1 interface

G.711 Speech Encoder. This encoder is compliant with ISPHENC1 interface

NOTE: Though the standalone codec server contain JPEG decode, the DVSDK decode demos do not support playback of JPEG streams. In order to evaluate these decoders, use Digital Video Test Bench (DVTB) which is included in the OMAP3530 DVSDK. The media files for MPEG2 MP and JPEG format streams are not available as part of the DVSDK installation, but they are available as part of data_dvsdk_#_##_##_##.tar.gz that can be downloaded from the OMAP software update site http://www.ti.com/omapsoftwareupdates

Setting up the build/development environment

To set up the development and build environment, follow these steps:

Log in to your user account (and not as root) on the NFS host system.

Add the /host/<useracct>/toolchain/<toolchain_version>/bin directory to your path. This is typically done by adding an additional line to your shell resource file (~/.bashrc). For the path given above, the line to add to your .bashrc file is:

PATH=“/home/<useracct>/toolchain/<toolchain_version>/bin:$PATH”

This adds the CodeSourcery tools to your path and allows you to execute the tools using arm-none-linux-gnueabi-gcc (or other tools in the tool chain) from any directory.

Remember to use the following command after modifying your .bashrc file. The source command essentially executes the .bashrc script so that the path you just added to it is added to your environment variables:

host $ source .bashrc

You can test that the toolchain is installed correctly by starting a new shell and using the following command:

host $ arm-none-linux-gnueabi-gcc –v

When you execute this command, you will get an output like the one shown below.

The resulting U-Boot image named u-boot.bin will be in the current directory, ready to be loaded on the target.

Rebuilding the Linux Kernel

Rebuilding the kernel is described in more detail in the User’s Guide available at
AM35x-OMAP35x-PSP-SDK-##.##.##.##/docs/omap3530/UserGuide-##.##.##.##.pdf

Note that building the kernel requires using mkimage, a host side utility built by the u-boot makefile. If you have not already done so please build u-boot using the instructions in the Rebuilding U-Boot section. You will need to build U-boot and place mkimage in your Path. A command like below can be used. If you are using a bash shell, kindly add the following in the .bashrc file in your user account.

export PATH=/<path_to_uboot>/tools:$PATH

Copy the Linux kernel source archive from AM35x-OMAP35x-PSP-SDK-##.##.##.##/src directory into your working directory.

The resulting kernel image uImage will be placed under arch/arm/boot and is ready to be loaded on the target.

Once the modules are built they must be installed on the target file system in order to be used. The following command will install the modules to the target file system and create the modules dependency file.

For example if you have been following the Getting Started Guide you should have created a target file system at /home/<useracct>/workdir/filesys. In the above command you should replace <target filesys dir> with /home/<useracct>/workdir/filesys.

Rebuilding the DVSDK software for the target

To place demo files in the /opt/dvsdk directory, you need to rebuild the DVSDK software. To do this, follow these steps:

Check the following directory definitions. If you installed components in the default locations, the directory definitions may already be correct, but you should verify them in any case.

Set PLATFORM to match your EVM board as follows (Note that this variable is case sensitive):

PLATFORM=omap3530

Set DVSDK_INSTALL_DIR to the top-level DVSDK installation directory as follows, note that by default ${HOME} refers to your /home/<useracct> directory:

DVSDK_INSTALL_DIR=/home/<useracct>/dvsdk/dvsdk_#_##_##_##

Modify the following variable as needed to match the location of XDCtools on your Linux host. We recommend that XDCtools be installed in the /home/<useracct>/dvsdk/dvsdk_#_##_##_## directory, but you may have installed it elsewhere.

Note PSP_INSTALL_DIR donot need to be updated.They will be pointing to DVSDK installation directory.

Check the path of all component installation directories to match the location where you want to point to. The default locations specified will choose the component versions as installed as part of the DVSDK installation

The top level DVSDK Makefile re-builds the kernel modules required by the DVSDK demonstration software (CMEM and LPM) and hence it is very important to at least perform the following commands (in case you have not performed the steps in Rebuilding the Linux Kernel), after extracting the Linux kernel source code in your work directory, whose path is provided in the top level DVSDK Rules.make. Refer section Rebuilding the Linux Kernel for more details on “Rebuilding the Linux Kernel”.

While in the same directory that contains Rules.make, use the following commands to build the DVSDK demo applications and put the resulting binaries on the target file system specified by EXEC_DIR.

host $ make clean
host $ make all
host $ make install

Note : The make all command builds only the DVSDK demos, its dependent components and DVTB

Additional commands for cleaning and building all the components are as mentioned below.

Note : The PSP examples under AM35x-OMAP35x-PSP-SDK-##.##.##.##/src/examples have to be extracted before using below commands

host $ make clobber
host $ make everything

For information on individually building the components please use the folowing command

Note:Certain components have dependency on other components.So please make sure you have executed the make all command before proceeding for individual component build.

host $ make help

NOTE: The dependencies for indivdual component builds are not addressed in the top level DVSDK Makefile. If you perform 'make clobber' or 'make clean' and then try building indivdual components like 'make dmai', the build will fail. Alternatively, if you perform 'make clobber' and then perform 'make everything', the build will go through. In addition to that, if you try cleaning the individual component and then build the same again, the build will go through. For example, after performing 'make everything', performing 'make dmai_clean' followed by 'make dmai' will work.

Rebuilding the DSP side server executables

The DSP side codec libraries are available under /home/<useracct>/dvsdk/dvsdk_#_##_##_##/cs1omap3530_#_##_## directory or if you have installed it in a different location specified by CODEC_INSTALL_DIR

The top level Makefile and the config.bld files are provided under the top level directory mentioned above. The codec binaries, header files as well as documents are RTSC packaged and available under /home/<useracct>/dvsdk/dvsdk_#_##_##_##/cs1omap3530_#_##_##/packages/ti/sdo/codecs folder.

Ensure that the path settings for the DSP side code generation tools are set properly in the config.bld file

The above command produces the x-load.bin file, but in order for the X-Loader to be loaded by the OMAP35x ROM bootloader, it needs to be signed with the signGP program from the AM35x-OMAP35x-PSP-SDK-##.##.##.##/host-tools/linux directory.

The resulting binary is called dnld_startup_omap3_evm.bin. This file is used with DownloadUtility.exe for UART peripheral boot.

Rebuilding the NFS Image

Kindly refer to the GSG:_AM35x_EVM_Software_Setup#Rebuilding_the_NFS_Image (part of AM35x Getting Started Guide),for rebuilding NFS for AM35x SDK. This will contain different set of demos and sample applications.
The OMAP3535/OMAP3530 DVSDK installer has the script to (re)build the NFS image that includes the OMAP3525/OMAP3530 DVSDK demos under ~/dvsdk/dvsdk_#_##_##_##/targetfs folder.

For any clarification about the procedure please perform the below command

host $ make –f targetfs_make help

Executing above command requires the users to have sudo access. The linux host would prompt for the user password and the user needs to enter his password for the make to continue.
The user can make sure he has sudo access by including the following line in /etc/sudoers file.

<useracct> ALL=(ALL) ALL

Executing above commands will create the new NFS file system with the DVSDK demo executables and all the media files required by the demonstrations.
You will see nfs_dvsdk_#_##_##_##.tar.gz created under the current folder (/home/<useracct>/dvsdk/dvsdk_#_##_##_##/targetfs).

The full ramdisk image cannot be built to include the OMAP3530 DVSDK demos as the ramdisk size requirement exceeds 40MB after the image is un-tarred and the bootargs given in step 5 in Section Running the Re-flash Procedure will not work

Rebuilding the Minimal Ramdisk Image

Refer to the GSG:_AM35x_EVM_Software_Setup (part of AM35x Getting Started Guide),for rebuilding minimal ramdisk image for AM35x SDK. The minimal ramdisk image does not contain any demos or examples.

The OMAP3525/OMAP3530 DVSDK installer has the pre-built JFFS2 root file system image that includes the OMAP3525/OMAP3530 DVSDK demos under ~/dvsdk/dvsdk_#_##_##_##/targetfs folder.

Check if the linux distribution on the host PC contains the mkfs.jffs2 utility. If not, download the binary from ftp://sources.redhat.com/pub/jffs2/mkfs.jffs2. Place this binary under /sbin directory in the Linux host development PC and ensure to include /sbin to the PATH environment variable in the .bashrc file.

For any clarification about the procedure please perform the below command

host $ make –f targetfs_make help

Executing above commands requires the users to have sudo access. The linux host would prompt for the user password and the user needs to enter his password for the make to continue.

The user can make sure he has sudo access by including the following line in /etc/sudoers file.

<useracct> ALL=(ALL) ALL

Executing above commands will create the new NFS and JFFS2 root file system with the DVSDK demo executables and all the media files required by the demonstrations.
You will see nfs_dvsdk_#_##_##_##.tar.gz and rootfs_dvsdk_#_##_##_##.jffs2 files created under the current folder (/home/<useracct>/dvsdk/dvsdk_#_##_##_##/targetfs).