Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improv ements, and othe r changes to its product s and se rvices a t any time and to dis continue any
product or service without notice. Customers should obtain the latest relevant information before placing orders
and should verify that such information is current and complete. All products are sold subject to TI's terms and
conditions of sale supplied at the time of order acknowledgment.
TI warrants perform ance of it s hardware pro ducts to the specificati ons applic able at the ti me of sale i n accordance
with TI's standard warra nty. T esting and other quality c ontrol techniques are used to the exte nt TI deems necessary
to support this warranty. Except where mandated by government requirements, testing of all parameters of each
product is not necessarily performed.
TI assumes no li ability for appl ications assi stance or cu stomer product d esign. Customers are responsibl e for their
products and applications using TI components. To minimize the risks associated with customer products and
applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work rig ht, or other TI intelle ct ual prop erty righ t relatin g to any c ombin ation, mac hine, or proc ess
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a lic ense from TI to use such produc t s or servic es or a warrant y or endors emen t thereof. Use
of such information may r equ ire a l ice ns e from a thi rd p a r ty un der the p atents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of i nformation in TI data books or data sheet s is perm issible only if re productio n is w ithout al teration
and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteratio n is an u nfa ir an d de ceptive business practice. TI is not responsible or liable for such altere d
documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or servic e voi ds al l e xp res s and any implied warranties for the associated TI product or service and is an
unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs w here y ou c an obtain information on other Texa s In st rum ent s products and application s ol utions:
ProductsApplications
Amplifiersamplifier.ti.comAudiowww.ti.com/audio
Data Convertersdataconverter.ti.comAutomotivewww.ti.com/automotive
DSPdsp.ti.comBroadbandwww.ti.com/broadband
Interfaceinterface.ti.comDigital Controlwww.ti.com/digitalcontrol
Logiclogic.ti.comMilitarywww.ti.com/military
Power Mgmtpower.ti.comOptical Networkingwww.ti.com/opticalnetwork
Microcontrollersmicrocontroller.ti.comSecuritywww.ti.com/security
Low Power Wirelesswww.ti.com/lpwTelephonywww.ti.com/telephony
Video & Imagingwww.ti.com/video
Wirelesswww.ti.com/wireless
Texas Instruments (TI) provides the enclosed product(s) under the following conditions:
This evaluation board/kit is intended for use for ENGINEERING DEVELOPMENT, DEMON-
STRA TION, OR EV ALUATION PURPOSES ONL Y and is not cons idered by TI to be a finished
end-product fit for g eneral consumer use. Perso ns handling the product(s) m ust have electronics
training and observe good engineering practice standards. As such, the goods being provided
are not intended to be complete in terms of re quired desi gn-, market ing-, and/or man ufacturing related protective c onsiderations, including produ ct safety and environmental measures typically
found in end produc t s t hat i nc orpo r ate su ch sem ic on duc tor c omponents or circuit boards. This
evaluation board/kit does not fall within the scope of the European Union directives regarding
electromagnetic compa tibility , restricted substances (RoHS), recyc ling (WEEE), FCC, CE or UL,
and therefore may not meet the technical requirements of these directives or other related
directives.
Should this evaluation board/kit not meet the specifications indicated in the User's Guide, the
board/kit may be re turned within 30 day s from the d ate of deliv ery fo r a ful l refund. T HE FOR EGOING WARRANTY IS THE EXCLUSIVE WARRANTY MADE BY SELLER TO BUYER AND
IS IN LIEU OF ALL OTHER WARRANTIES, EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
PURPOSE.
The user assumes all responsibility and liability for proper and safe handling of the goods.
Further, the user indemnifies TI from all claims arising from the handling or use of the goods.
Due to the open construction of the product, it is the user's responsibility to take any and all
appropriate precautions with regard to electrostatic discharge.
EXCEPT TO THE EXTENT OF THE INDEMNITY SET FORTH ABOVE, NEITHER PARTY
SHALL BE LIABLE TO THE OTHER FOR ANY INDIRECT, SPECIAL, INCIDENT AL , OR CONSEQUENTIAL DAMAGES.
TI currently deals wi th a v ari ety of c ustom ers for pro du ct s , an d the r efo re ou r arra nge ment with
the user is not exclusive.
TI assumes no liability for applications assistance, customer product design, softwareperformance, or infringement of patents or services described herein.
Please read the Use r's Guide and, specifically , the W arnings and Restrictio ns notice in the User's
Guide prior to handling the product. This notice contains important safety information about
temperatures and vo lt ag es . Fo r ad ditional information on TI's en vi ronm en t al an d/or safety programs, please contact the TI application engineer or visit www.ti.com/esh.
No license is granted un der any p aten t right or other intel lectual pro per ty right of TI co verin g or
relating to any machine, process, or combination in which such TI products or services might
be or are used.
This evaluation board/kit is intended for use for ENGINEERING DEVELOPMENT, DEMONSTRA TION, OR EV ALUATION PURPOSES ONL Y and is not considered by TI to be a finished
end-product fit for general consumer use. It generates, uses, and can radiate radio frequency
energy and has not been tested for compliance with the limits of computing devices pursuant
to part 15 of FCC rules, which are designed to provide reasonable protection against radio
frequency interfere nce . Op era tion of this equipment in other environment s may cause interference with radio co mm unications, in which case the use r at his own expense will be required t o
take whatever measures may be required to correct this interference.
About This Guide
The DVEVM (Digital Video Evaluation Module) kit is an evaluation
platform that showcases the DM644x architecture and lets users
evaluate the power and performance of the DM644x as a multimedia
engine.
This guide gives you overview information about the board and the
software provided with the board. It is intended to be used as an
introductory docum ent for the DVEVM. Other do cuments provide more
in-depth information. See the DVEVM release notes for a complete list of
documents that have been included with the product.
Additional Documents and Resources
You can use the following sources to supplement this user’s guide:
❏Spectrum Digital website:
❏Other PDF documents included with the DVEVM kit
❏Section 4.11 lists documentation in the DVSDK software installation.
❏SoC Analyzer Help menu
v
Notational Conventions
Notational Conventions
This document uses the following conventions:
❏Program listings, program examples, and interactive displays are
❏Square brackets ( [ and ] ) identify an option al paramete r. If you use
Trademarks
The Texas Instruments logo and Texas
Instruments are registered trade marks of Texas
Instruments. Trademarks of Texas Instruments
include: TI, DaVinci, the DaVinci logo, XDS, Code
Composer, Code Composer Studio, Probe Point,
Code Explorer, DSP/BIOS, RTDX, Online DSP
Lab, DaVinci, TMS320, TMS320C54x,
TMS320C55x, TMS320C62x, TMS320C64x,
TMS320C67x, TMS320C5000, and
TMS320C6000.
shown in a mono-spaced font. Examples use bold for emphasis,
and interactive displays use bold to distinguish commands that you
enter from items that the system displays (such as prompts,
command output, error messages, etc.).
an optional parameter, you specify the information within the
brackets. Unless t he sq uar e brac k ets a re in a bold typeface, do not
enter the brackets themselves.
MS-DOS, Windows, and Windows NT are trademarks of Microsoft
Corporation.
UNIX is a registered trad emark of The O pen Grou p in the Un ited States
and other countries.
Linux is a registered trademark of Linus Torvalds.
Solaris, SunOS, and Java are trademarks or re gistered trademarks of
Sun Microsystems, Inc.
All other brand, product na mes, and service names are trademark s or
registered trademarks of their respective companies or organizations.
Your new DVEVM (Digital Video Evaluation
Module) kit will allow you to evaluate TI’s new
DaVinci
TM
Technology and the DM644x
architecture.
This technology brings together system- solu tion
components tailored for efficien t and co mpellin g
digital video and audio.
1-2
1.2What’s in this Kit?
Your DVEVM kit contains the following hardware items. Section 2.1,
Setting Up the Hardware tells how to connect these components.
❏EVM Board. This board con tains a DaVinci TMS320DM6446 dua l-
❏Hard Disk Drive. The hard d rive provided with the EVM is a 2.5"
❏CCD Camera. This camera provides NTSC or PAL video imaging for
❏LCD Display. The LCD display provide d with the DVEVM k it has a
❏PC Desktop Microphone. The microphone provides a way to
What’s in this Kit?
core device with an ARM9 and C64+ DSP for development of
applications that use both a general-purpose processor and an
accelerated DSP process or.
Spinpoint drive with 40 GB of storage. The drive speed in 5400 RPM
and it has an 8MB cache. The drive is an Ultra ATA 66/100/133 IDE.
Software has been preloaded on this EVM board’s hard disk drive.
DaVinci applications.
5.6" screen and 320x240 pixels. Cables and a power supply are
provided. The NTSC ver sion ha s a 110 VAC power supp ly. The PAL
version has a 220 VAC power supply.
capture audio for use by DaVinci applications.
❏IR Remote Control. This universal remote control is included to
provide a user interface to the demo applications.
❏Cables. Cables used to connect the EVM board to peripheral
devices and to a host Li nux workstation used for developm ent are
provided in the kit.
The DVEVM kit also comes with the following software. Information about
how to use the software components is provided in Chapter 4.
❏DaVinci Digital Video Evaluation Kit.
❏TI DaVinci Demonstration Version of MontaVista Linux Pro v5.0
Target
❏TI DaVinci Demonstration Version of MontaVista Linux Pro v5.0
Tools
❏A/V Media Clips
❏Spectrum Digital EVM Tools
❏SoC Analyzer
DVEVM Overview1-3
What’s on the Board?
1.3What’s on the Board?
The EVM comes lo aded with peripherals your mult imedia applications
may need to make use of. T he har d drive on the bo ard also comes preloaded with demonstration software. The following block diagram shows
the major hardware components.
1-4
Diagram provided courtesy of Spectrum Digital Inc.
Figure 1–1 EVM Hardware Block Diagram
For more informatio n about the EVM hardware, see the DaVinci EVM
website at http://c6000.spectrumdigital.com/davincievm.
The DaVinci EVM incorporates a battery holder to provide backup power
to the MSP430’s real-time clock when the power is not ap plied to the
board. The battery is not included in the kit. See the Spectrum Digital
DaVinci EVM Technical Reference for suggested battery part numbers.
1.4What’s Next?
What’s Next?
To get started evaluating the DV EV M kit a nd d ev elo pin g ap pli c ations for
the DM644x, b egin by using this G etting Started guide. It will ste p you
through connecting the hardware, testing the software, and beginning to
develop applications.
When you are ready for more information about DaVinci Technology and
the DM644x architecture, see the following:
❏Codec Engine Application Developer's Guide (SPRUE67)
❏Other PDF documents included with the DVEVM kit
❏Section 4.11 lists documentation in the DVSDK software installation.
❏SoC Analyzer Help menu
DVEVM Overview1-5
1-6
EVM Hardware Setup
This chapter tells you how to set up the EVM hardware.
To set up the hardware provided with the EVM, use the steps in the
sections that foll ow. You may skip s ections if you do n ot need to acce ss
a particular peripheral . Fo r ex amp le, if you do no t n eed to use the serial
cable, skip that section.
1) The EVM is sensitive to static discharges. Use
a grounding strap or other dev ice to prevent
damaging the board.
Be sure to connect communication cables
before applying power to any equipment.
2) If you use PAL video, set switch 10 on the S3 (USER) bank of
switches to On. If you use NTSC video, set this switch to Off. See
Figure 1–1 for S3 switch bank location.
3) Connect the yellow vide o cable to the uppe r-right Video Out jac k on
the EVM and the LCD display Video Input as shown below.
2-2
See Section A.1, Changing the Video Input/Output Methods for
information about using S-Video or Component video.
Setting Up the Hardware
4) Connect the red and white audio cables to the EVM Audio Output
and the LCD display R/L Audio Input jacks as shown below:
5) Connect the BNC-to-RCA connector to the coax cable. Then connect
the coax cable to the video camera and the EVM Video Input.
6) Connect the power jack for the video camera. T o be ESD safe, do not
plug in the other end of the camera power cord until the later step that
instructs you to do so.
See Section A.1, Changing the Video Input/Output Methods for
information about using S-Video or Component video.
EVM Hardware Setup2-3
Setting Up the Hardware
7) Connect the microphone to the EVM.
8) Connect the power cable to the EVM power jack on the board. To be
ESD safe, do not plug in the other end of the cable yet.
9) If you will use the Ethernet connection, connect the Ethernet cable to
the Ethernet Port on the EVM and to an Ethernet network port.
Note that the U-Boot bootargs must incl ude "ip=dhcp " to enable the
network connection.
2-4
Setting Up the Hardware
10) If you plan to use the UA RT port for a cons ole window, connect the
RS-232 null modem cable to the EVM UART port and a COM port on
your host Linux workstation. See Section 2.2, Connecting to aConsole Window for more about using a console window.
11) Plug in the LCD display to a power supply.
12) Plug in the NTSC/PAL video camera to a power supply.
13) Connect the power cable to the EVM power jack on the board. T o be
ESD safe, plug in the oth er end of the power cable only after you
have connected the power cord to the board.
14) Power on the LCD display.
15) Power on the EVM board.
16) The initial scr een of the demo s oftware should b e displayed on the
LCD display. Use the IR rem ote to run the software as de scribed i n
Chapter 3.
EVM Hardware Setup2-5
Connecting to a Console Window
2.2Connecting to a Console Window
You can open a console windo w that allows you to watch and interrupt
EVM boot messages by following these steps:
1) Connect a seria l cable betwee n the serial port on the EVM and the
serial port (for example, COM1) on a PC.
2) Run a terminal session (such as Minicom on Linux or HyperTerminal
on Windows) on the wor kstation and configur e it to connect to tha t
serial port with the following characteristics:
■Bits per Second: 115200
■Data Bits: 8
■Parity: None
■Stop Bits: 1
■Flow Control: None
3) When you power on the EVM, you will see boot sequence messages.
You can press a key to interrupt the boot sequence and type
commands in the U-Boot command shell. In this guide, commands to
be typed in the U-Boot shell are indicated by an
EVM # prompt.
2-6
Chapter 3
Running the Demonstration Software
This chapter explains how to ru n the software demos provide d with the
DVEVM kit.
Out of the box, the EVM boots from flash and starts the demos
automatically after a few seconds when you power up the board. It does
not require an NFS mount or a TFTP server to run the standard demos.
Note: The default U-Boot bootargs definition sets "ip=off", which disables
the Ethernet connection.
The out-of-the-box boot parameters are listed in Section A.4.1. The
following are alternate ways you may want to boot the board:
❏TFTP boot with hard drive file system (Section A.4.2)
❏Flash boot with NFS file system (Section A.4.3)
❏TFTP boot with NFS file system (Section A.4.4)
❏PAL video mode vs. NTSC video mode (Section 4.3.7)
To abort the standard boot, p ress any key in the console wi ndow (see
Section 2.2). Also see Section A.4, Alternate Boot Methods if you want to
change the boot configuration.
3.2Starting the Standalone Demos
When you connect the EVM hardware, the pre-loaded examples run
automatically on the display. These examples encode and decode audio,
video, and speech. There are two ways to use the demos:
❏Standalone. This is the default power-on mode. The demos run
automatically with n o c onn ec tio n to a wo rks tation in the defa ult boo t
configuration. This is the mode documented in the rest of this
chapter.
The standalone demo was se t up by the DVSDK, which copies the
file /examples/dvevmdemo to the directory /etc/rc.d/init.d (the central
repository for startup scripts). This file is symbolically linked to
/etc/rc.d/rc3id/S88demo. When the board boots up and enters
runlevel 3, this file is ex ec ute d to start th e de mo we b s erve r a nd th e
demo interface.
❏Command line. Once you have connected the EVM to a workstation
and installed the neces sar y so ftware ( as de sc ribe d i n S ect ion 4.3.1,
Installing the Target Linux Software), you can run the demos from the
board’s Linux command line. For further information on running the
demos from the command lin e, see the demo doc umentation th at is
linked to by the DVSDK release notes.
Note: When you run the demos from th e comma nd line, make s ure
the interface process used by the standalone mode demos is not
3-2
Starting the Standalone Demos
running. Otherwise y ou wil l se e err or messages raised whe n d evi c e
drivers fail to open.
Once the EVM board has booted, the display
should show a pi cture of the remote control.
You use the IR remote to control the demos.
The order of the buttons on the actual remote
may be different from the picture; if your
remote looks different, find the buttons with
the same labels on your remote.
To use the demos in standalone mode, follow
these steps:
1) Check to make sure the batteries are
installed in your IR remote.
2) The initial screen shows a diagram of the
IR remote, which you use to run the
standalone demos. Take a minute to look
at the functions of the various buttons.
3) Since this is a universal remote, you may
need to set it to use the codes necessary
to run the DVEVM demos. To do this,
hold down the "Code Search" button until
the red light on the remote stays lit. Then
press the "DVD" butto n an d enter "0 020"
as the code (for older remotes shipped
with the kit, the code is "020").
4) If you accidentally put the remote in TV or
some other mode , press " DVD" to return
the remote to the correct mode.
5) If the remote does not accept the
DVD+0020 code, do a full reset by
removing the batteries, pressing the
Power button for at lea st a minute, then
reinserting the batteries. Then program
the remote as in Step 3.
Running the Demonstration Software3-3
Running the Standalone Demos
3.3Running the Standalone Demos
1) Press "Play" or "OK" on the remote to move from the remote control
diagram to the main menu screen, which looks like this:
The Encode + Decode demo allows you to record and playback
video. The Encode demo records audio/speech and video in the
formats you select. The Decode demo plays audio/speech and video
files you select. The Third-Party Menu can be used to add additional
demos (see Section A.2, Putting Demo Applications in the Third-Party Menu).
2) Use the up and down arrows to change which demo is selected.
Then, press "OK" or "Play" to move to the selected demo.
3) Within a demo, you start at the settings
screen, where you see the controls
you can use to run the demo at the
bottom of the screen and the current
settings in the upper-right.
For example, the Encode demo allows
you to set the vide o for mat and the b it
rate at which video should be encoded.
Fixed settings are also shown here.
4) Use the up and down arrows to move to a setting you want to change.
3-4
Running the Standalone Demos
5) Use the left and right arrows to cycle through the options until the
setting you want is shown.
6) Press "Play" to begin the Encode+Decode and Decode demos.
Press "Rec" (record) twice to begin the Encode demo.
7) While the demo runs, data about the settings, p rocessor load, and
rates are shown. Static settings are on the right. Dynamic data
reporting is on the left. For example:
8) This information o verlay s the vi deo; as a resul t the vide o you see is
darker than the actual video . To hide the in formation dis play so that
you can better see the video, press the "Info/Select" button on the IR
remote. Y ou can change the transparency of the OSD (overlay) while
running a demo by using the left and right arrows on the remote.
9) Press "Stop" or "Pause" when you want to end or pause a demo. The
first time you press "Stop", you return to th e settings screen. P ress
"Stop" from the settings screen to go back to the main menu.
For information about runn ing the individual demos, see Section 3.3. 2
through Section 3.3.4.
The demos use the Codec Engine to allow applications to run algorithms.
You may noti ce that the DSP CP U load i s initiall y high, ev en if t he DSP
is not running algorithms. The CPU load starts at 100% while the DSP is
booting and then decrea ses wh ile th e DSP wa its f or wor k to be reques ted
by the GPP. Even if DSP is idle, it may take a short amount of time
(several seconds) for the CPU load to settle to zero. This is because the
Codec Engine’s CPU load calculation includes a small amount of history.
3.3.1Shutting Down the Demos
Y ou can quit out of the demos completely while at the main menu screen
by pressing "Power" on the remote.
To restart the demos, you can reboot the board or run t he demos from
the command line as described in Secti on 3.4.
Running the Demonstration Software3-5
Running the Standalone Demos
3.3.2About the Encode + Decode Demo
The Encode + Decode demo allows you to rec ord and playback video .
Video comes from the camera, is encoded, then decoded, and then sent
to the LDC display.
The Encode + Decode d oes only video proc essing; it does not enc ode
and decode audio or s peech. The supported video algorithm i s H.264
Baseline Profile (.264 file extens ion ).
Table 3–1 IR Remote Buttons for Encode + Decode Demo
IR Remote ButtonModeAction Performed
Up/Down---- no action -Play or OKSetupBegin demo
Record-- -- no action -Info/SelectSetupShow / hide block diagram for demo
Info/SelectRunToggle information display
Left/RightRunChange information transparency level
PauseRunPause demo (press Play to resume)
StopSetup / RunReturn to previous screen
The application runs on the ARM using Linux. The video signal is passed
to video encoders and decoders on the DSP by the Codec Engine.
Shared memory is used when passing data.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning theDemos from the Command Line.
3-6
3.3.3About the Encode Demo
Like the Encode + Decode demo, the Encode demo also encodes video.
In addition, it also encodes speech. The speech source is the
microphone.
The encoded data is wr itten to files on the EVM’s hard disk drive. Th e
possible filenames are demo.264, demo.mpeg4, demompeg4.g711, and
demo264.g711. Older versions of these files are overwritten as needed.
Output is not deco ded an d sen t to th e d isplay or spe akers other than t o
show the settings and dynamic data collected about the load and rates.
Running the Standalone Demos
Note that you can use only a speech encoder, not an audio encoder. The
supported video algorithms are MPEG4 (.mpeg4 file extension) and
H.264 (.264 file extension). The supported speech algorithm is G.711
(.g711 extension).
Table 3–2 IR Remote Buttons for Encode Demo
IR Remote ButtonModeAction Performed
Up/DownSetupChange option selection
Left/RightSetupChange setting of selected option
PlaySetupSwitch to decode demo setup
Record (twice)
or OK
Setup / RunBegin encode demo, send unencoded
data to display
Running the Demonstration Software3-7
Running the Standalone Demos
Table 3–2 IR Remote Buttons for Encode Demo
IR Remote ButtonModeAction Performed
Info/SelectSetup Show / hide block diagram for demo
Info/SelectRunToggle information display
Left/RightRunChange information transparency level
PauseRunPause demo (press Record to resume)
StopSetup / RunReturn to previous screen
The application runs on the ARM using Linux. The video and audio
signals are passed to encoders on the DSP by the Codec Engine. Shared
memory is used when passing data.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning theDemos from the Command Line.
3.3.4About the Decode Demo
(There is no display for encode demo
behind the information.)
The Decode demo pla ys audio/speech and video files y ou select. You
can select a source video file and a source audio or speech file. Use the
left and right arrow button s to choose from the dem o files and the files
created by the Enc ode demo, whi ch are stored o n the EVM’s hard disk
drive. The decoded signals are sent to the display and speakers.
3-8
Running the Demos from the Command Line
The supported video algorithms are MPEG4 (.mpeg4 file extension),
H.264 (.264 file extension) and MPEG2 (.m2v file extension).
The supported audio algorithm is AAC (.aac file extension). The
supported speech algorithm is G.711 (.g711 file extension).
Table 3–3 IR Remote Buttons for Decode Demo
IR Remote ButtonModeAction Performed
Up/Down---- no action -Left/RightSetupSelect a different file combination
Play or OKSetupBegin decode demo
Record---- no action -Info/SelectSetup Show / hide block diagram for demo
Info/SelectRunToggle information display
Left/RightRunChange information transparency level
PauseRunPause demo (press Play to resume)
StopSetup / RunReturn to previous screen
The application runs on the ARM using Linux. The video and audio
signals are passed to decoders on the DSP by the Codec Engine. Shared
memory is used when passing data.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning theDemos from the Command Line.
3.3.5About the Third Party Menu
The Third-Party Menu can be used to add additional demos. See Section
A.2, Putting Demo Applications in the Third-Party Menu.
3.4Running the Demos from the Command Line
You can run the demo applications from the Linux shell in a terminal
window connected to the EVM boar d’s serial port. The se are the sam e
demos described in Section 3.2, Starting the Standalone Demos.
1) See Section 2.2, Connecting to a Console Window for instructions
regarding communicating with Linux running on the EVM.
2) Login to the target as root. No password is required.
Running the Demonstration Software3-9
Running the Demos from the Command Line
3) Move to the appr opriate directory on the target using the following
command. (See Section 4.1.1 for the meanings of command prompts
shown in this document.)
Target $ cd /opt/dvsdk/dm6446
4) Before running demo applications from the command line, the CMEM
and accelerator kernel modules must be loaded.
■Use "lsmod" to see if the y are loaded. You should see output
similar to the following:
Target $ lsmod
Module Size Used by
dsplinkk 98220 0
cmemk 20072 0
■If they are not loaded, use the following commands to load these
modules.
Target $ ./loadmodules.sh
5) If a standalone demo is running, kill that process. You can do this by
pressing the Power button on the remote from the main menu . Or,
use the following commands:
Target $ killall -9 interface
6) To see the command-line options for the demos, use one of the
following commands with the -h or --help option:
3-10
Target $ ./encodedecode -h
Target $ ./encode -h
Target $ ./decode -h
7) To stop a demo, press Ctrl+C at the command line or press the Stop
button on the remote.
You can also find the list of command-line options in encode.txt,
decode.txt, and encoded ecode.txt in the res pective demo direc tories of
the DVSDK package on the host.
Note: When you run loadmodules.sh, you may see warnings about
the kernel being tainte d by cmemk and dsplinkk. You can ignore
these warnings. They occur because DSP/B IO S Link does not use
the kernel build system and is not under the same license as the
kernel itself.
3.5Running the Network Demo
As an example of standard TCP/IP networking support, the DVEVM
examples include a smal l HTTP web server. This web server is started
on the GPP-side as part of the Linux startup sequence. It conf igured to
service requests from web browsers on the standard TCP/IP port 80.
After the EVM board has boot ed, connect a PC to the same network to
which the EVM board is connecte d. Enter a URL of the form "http://ipaddress-of-evm" in a web browser (for example, Internet Explorer,
Firefox, or Opera). The IP address of the board is shown in the lower-right
corner of the main menu of the A/V demos.
You should se e a web page with information abou t DaVinci technology
and the DVEVM software.
Running the Network Demo
Use this web page to interact with the board and run the A/V demos
described in Section 3.3, Running the Standalone Demos. Two simple
CGI scripts on the EVM enable you to start the demos (assuming they are
not already running) and see what pro cesses are r unning on th e board.
If you want to see the demo started from the web page, be sure to exit
the demo first (use the Power button from the main menu).
The web server software is an open-source package called THTTPD
(http://www.acme.com/software/thttpd/). It is designed to be small, fas t,
and portable. The source code is included with the DVEVM software. Y ou
can get the latest version directly from the web. The web server and CGI
scripts are installed on the target in the /opt/dvsdk/dm6446/web directory.
Running the Demonstration Software3-11
3-12
Chapter 4
DVEVM Software Setup
This chapter explains how to use the software provided with the DVEVM
kit.
To begin developing applications, you need to install the DVEVM
development environment. This chapter outlines the steps required to
load the DVEVM softwa re onto the de velop men t host. You will need the
distribution disks or the files they contain to get started.
The DaVinci 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 with the DVEVM.
❏Standalone demonstration software. This is provided on the har d
❏Disk 1: MontaVista Linux Pro v5.0 System Tools and Target File
drive on the EVM. The hard-wired examples encode and decode
audio, video, and speech. Another demo shows the board’s network
capabilities. See Section 3.2 and Section 3.5.
System. The version provided with the DVEVM kit is the
demonstration version. It contains the following file:
■mvl_5_0_demo_sys_setuplinux.bin. This installation file
contains the MontaVista Tool development tool chain and the
target file system.
4-2
❏Disk 2: TI DVSDK Software. This DVD includes demo applications,
Codec Engine software, example codec servers, and DVEVM
documentation. It contains the following files:
■this manual in PDF format
■dvsdk_setuplin ux _#_ #_# _#.b in (DV S DK ins taller)
■data.tar.gz (Contains A/V data files for use by the demos)
■restore/overlay.tar.gz (Contains demo files in case they are
needed for recovery. You can generally ignore this file.)
❏Disk 3: SDI Board Support Software. This disk contains ARM-
based test code, CCStudio GEL files, and other EVM support
software.
Texas Instruments, in agreement with MontaVista Software Inc., is
providing a demonstr ati on vers io n of th e Li nux Professional Edition v5. 0
embedded operating s ystem and developm ent tools. T he base DVE VM
kit includes this demon st ratio n versio n. The dem o versi on is a sub set of
what MontaVista provides with the full Professional Edition. Tools such
as DevRocket
TM
and the Professional Edition documentation are not
included, but it is otherwise fully functional and useful for customers
evaluating the DaVinci platform. Also, please note that this release does
not include a MontaVista user lice nse, and no direct custo mer support,
warranty, or indemnification from MontaVista Software Inc. is provided.
You may choose to order the DaVinci Software Production Bundle
(DVSPB), which i ncludes the production release of this demonstration
version of MontaVista Linux. Thi s inclu des a f ull Mo ntaVista license an d
the DevRocket IDE.
4.1.1Command Prompts in This Guide
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.
Software Overview
❏
EVM #
Indicates commands to be ty ped into the U-Boot shell in a c onsole
window connected to the EVM board's serial port. (Section 2.2)
❏
target $
Indicates commands t o be typed into th e Linux shell i n the terminal
window connected to the EVM board's serial port.
DVEVM Software Setup4-3
Software Overview
4.1.2Software Components
The following figure shows the software components used for application
development with the DVEVM kit:
A pp lic ation
I/O
I/O
I/O
Operating System
Adaptation Layer
(OSAL)
User Space
DMAI
VISA API
Codec Engine
VIDIMG
SPHAUD
Linux APIsLinux APIs
Kernel Space
CMEM
Dri ver
File
(ATA)
USB 2.0
Dri ver
MMC/SD
Dri ver
EMAC
Dri ver
SPI
Dri ver
Video
Dri ver
Link
Dri ver
Engine
Server
xDM
xDM
Speech Codec
Speech Co dec
API
API
Audio
Dri ver
UART
Dri ver
V-Node
V-Node
Video-Task
Video-Task
xDM
xDM
API
API
VISA APIVISA API
S-Node
S-Node
Speech-Task
Speech-Task
xDM
xDM
API
API
Video
Video
Codec
Codec
Speech
Speech
Codec
Codec
Framework
Framework
Framework
Components
Components
Components
DMAN3ACPY3
DMAN3ACPY3
DMAN3ACPY3
DMAN3 ACPY3
DSKT2
RMAN
DSKT2
RMAN
DSKT2
RMANDSKT2
RMAN
I-Node
I-Node
Image-Task
Image-Task
xDM
xDM
Imaging
Im a ging
API
API
Codec
Codec
A-Node
A-Node
Audio-Task
Audio-Task
xDM
xDM
Audio
Audio
API
API
Codec
Codec
Codec
Codec
Codec
Engine
Engine
Engine
Remote
Remote
Remote
Server
Server
Server
GP
Wa tc hd g
I/OI/OI/O
Timer
4-4
Timer
I2C
Dri ver
ARM SubsystemDSP Subsystem + Co-Processor
DSP/BIOS™ Link
Transport
DSP/BIOS™
In the previous figu re, your applicatio n runs on the ARM s ubsystem. It
handles I/O and application processing. To process video, image,
speech, and audi o si gna ls it u ses the V ISA A PI s pr ovided by the Codec
Engine. The Codec Engine, in turn, uses services such as DSP/BIOS
Link and protocols s uch a s xDAIS and x DM to c ommun icate with a pr econfigured Codec Eng ine Remote Server on the DSP s ubsystem. The
DSP handles signal processing and the results are available to the ARM
subsystem in shared memory. For more information, see the CodecEngine Application Developer's Guide (SPRUE67).
In addition, Linux running on the ARM makes a large number of APIs
available to your application, including drivers and timers.
4.2Preparing to Install
On a host system, mount the DVEVM demons tration DVD an d copy the
following files to a temporary location with at least 2.3 GB available
space. Since you can delete the installation files after installing the
software, a directory like /tmp is recommended.
❏mvl_5_0_demo_sys_setuplinux.bin (disk 1)
❏mvl_5_0_0_demo_lsp_setuplinux_#_#_#_#.bin (disk 2)
❏dvsdk_setuplin ux _#_ #_# _#.b in (d is k 2)
❏xdctools_setuplinux_#_#_#.bin (disk 2)
❏bios_setuplinux_#_#_#_#.bin (disk 2)
❏TI-C6x-CGT-v#.#.#.#.bin (disk 2)
Updates to these installers may be av ail ab le o n the TI DaVinc i Software
Updates website listed in Section 1.4.
Ensure that an X gra phi ca l d ispla y i s a va il able, and point your DISPLAY
environment variable to this value. For example:
csh:
Preparing to Install
host $ setenv DISPLAY cnabc0314159d1:0
ksh or bash:
host $ export DISPLAY=cnabc0314159d1:0
4.3Installing th e Sof t ware
Installing the software used by the DVEVM involves performing the
following steps:
❏Section 4.3.1, Installing the Target Linux Software
❏Section 4.3.2, Installing the DVSDK Software
❏Section 4.3.3, Installing the A/V Demo Files
❏Section 4.3.4, Installing the SoC Analyzer
❏Section 4.3.5, Exporting a Shared File System for Target Access
❏Section 4.3.6, T esting the Shared File System
❏Section 4.3.7, Configuring the Boot Setup for PAL Video Users
DVEVM Software Setup4-5
Installing the Software
4.3.1Installing the Target Linux Software
This section explains how to install Linux for use on the target board. This
is a demonstration version of MontaVista Linux Pro v5.0.
Note that separate versions of Linux are used by the target and your host
Linux workstation. The follo wing Linux host operating system i s tested
with the DVEVM: Red Hat Enterprise Linux v4 (Server Edition).
To install the Linux software, follow these steps:
1) Log in as root on you r host Li nux work station. Th is wil l allow y ou to
successfully run the graphical installer to install MontaVista Linux.
2) Execute each of the following bin files (where
#_#_#_# is the current
version number) from the temporary location that they were copied in
order to extract the installers for the Linux tools, Linux kernel, and the
file system. If a bin file does not run, make sure these files are
executable (use
chmod +x *.bin).
Instead of the default installation directory, we suggest that you
change the installation directory to /opt/mv_pro_5.0.
3) After you execute thes e .bin files, make sure the foll owing files are
located in /opt/mv_pro_5.0 (or in the /mv_pro_5.0 subdirectory of the
directory you chose in place of the default):
■mvltools5_0_#######.tar.gz
■DaVinciLSP_#_#_#_#.tar.gz
4) Go to the location where you will unpack the tar files. For example:
host $ cd /opt/mv_pro_5.0
5) Unpack the tar files (as root) by using the following commands:
host $ tar zxf mvltools5_0_#######.tar.gz
host $ tar zxf DaVinciLSP_#_#_#_#.tar.gz
This creates the MontaVista directory structure under the
/opt/mv_pro_5.0/montavis ta/ director y.
Note that unpacking these tar files will overwrite any existing files that
were previously installed.
4-6
Note: The LSP shipped with the D VSD K is a mu lti -p latfor m LS P; it
is not configured for a particular platform. As shipped, this LSP
cannot be used to buil d the d emo or e xampl e appl icat ions. It m ust
first be copied to a user area and configured/built for the EVM.
Please see Section 4.5 for instructions.
4.3.2Installing the DVSDK Software
The DVSDK software in cludes Codec Engine components, DSP /BIOS
Link, sample data file s, xDAIS and xD M header files, and a contiguous
memory allocator for Linux (CMEM).
Note: The installers for 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 vers ions of thes e componen ts elsewhere) . This
simplifies the build setup steps.
To install the DVSDK software using the Linux installer, follow these
steps:
1) Log in using a user account. The user account must ha ve execute
permission for the dvsdk_setuplinux_#_#_#_#.bin and
xdctools_setuplinux_#_#_#.bin files.
2) Execute the DVSDK installer that you previously copied from the
DVSDK DVD. For example:
Installing the Software
host $ cd /tmp
host $ ./dvsdk_setuplinux_#_#_#_#.bin
This installs the DVSDK in /home/<useracct>/dvsdk_#_#.
3) Execute the XDC installer that you previously copied from the
DVSDK DVD. For example:
host $ ./xdctools_setuplinux_#_#_#_#.bin
When you are prompted, do not use the default installation lo ca tion .
Instead, install the software in the di rectory created in Step 2. For
example, /home/<useracct>/dvsdk_#_#.
4) Execute the DS P/BIOS ins taller that you p revious ly cop ied fr om th e
DVSDK DVD. For example:
host $ ./bios_setuplinux_5_#_#_#.bin
When you are prompted, do not use the default installation lo ca tion .
Instead, install the software in the di rectory created in Step 2. For
example, /home/<useracct>/dvsdk_#_#.
5) Execute the Code Generation Tools installer that you previously
copied from the DVSDK DVD. For example:
host $ ./TI-C6x-CGT-v#.#.#.#.bin
DVEVM Software Setup4-7
Installing the Software
When the installer prompts for an installation location, do not use the
default location. Instead, use the entire path to the dvsdk_#_#
codegen directory. You will need to manually create the folder
cg6x_6_#_#, where # represents part of the version number. For
example:
/home/<useracct>/dvsdk_#_#/cg6x_6_0_16.
Remember to set the environment variable as directed by the
installer. For example:
6) You can now d elete th e .bin files that y ou loaded i nto the tem pora ry
directory.
Note: You can uninstall these components by using the rm -rf
command on its directory. You should ignore the uninstall files
created by the installer.
4.3.3Installing the A/V Demo Files
Disk 2 contains the A/V files used by the demos. After following the
instructions in the previous section, follow these instructions to install the
A/V files:
1) Go to the DVSDK directory that you set up previously. For example:
host $ cd /home/<useracct>/dvsdk_#_#
2) Mount disk 2 and copy the data. tar.gz file to your DVEVM directo ry.
For example:
host $ cp <mount location>/data.tar.gz .
3) Extract the A/V data files. For example:
host $ tar xfz data.tar.gz
4-8
4.3.4Installing the SoC Analyzer
SoC Analyzer is a graphical tool that runs on a Windows developmen t
host and uses data collected from Lin ux, DSP/ BIOS, and Code c En gine
to provide system-level execution and performance analysis for
debugging and profiling DVEVM software execution. Follow these
instructions to install SoC Analyzer:
1) Insert the TI DVSD K software disk into the Windows de velopment
host PC.
2) Browse to the SoCAnalyzer/WinXP folder.
3) Double-click on the SoCAnalyzer_#.#.#.#.exe file to start the
installer.
4) Follow the installer’s prompts to install the software.
4.3.5Exporting a Shared File System for Target Access
Although the board’s hard drive contains a file system, during
development it is more conv enient to have the target board N FS moun t
a file system on a host Linux workstation. Once you have tested the
application, you ca n store it on the board’s hard driv e for a standalone
demonstration.
Installing the Software
Note: Using video files from an NFS file system may result in a low
frame rate when encoding/decoding videos.
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 Sy stem) s erv er. The exported file s yst e m wi ll co ntain
the target file system and your executables.
To export the file system fr om your NFS server, perform th e following
steps. You only need to perform these steps once.
1) Log in with a user account on the host Linux workstation.
2) Perform the following commands to prepare a location for the
MontaVista file system. For example:
host $ cd /home/<useracct>
host $ mkdir -p workdir/filesys
host $ cd workdir/filesys
3) Switch us er to "root" on the host Linux workstation.
host $ su root
DVEVM Software Setup4-9
Installing the Software
4) Perform the follo wing commands to crea te a copy of the target file
system with permissions set for writing to the shared area as
<useracct>. Substitute your user name for <useracct>. If you
installed in a location other than /opt/ mv_pro_5.0, use you r location
in the cp command.
5) Edit the /etc/exports file on the host Linux workstation (not the
exports file on the target filesystem). Add the following line for
exporting the filesys area, substituting your user name for
<useracct>. Use the full path from root; ~ may not work for exports
on all file systems.
Note: Use exportfs -rav to re-export all directories. Use
/etc/init.d/nfs status to verify that the NFS status is running.
7) Verify that the server firewall is turned off:
host $ /etc/init.d/iptables status
If the firewall is running, disable it:
host $ /etc/init.d/iptables stop
4-10
4.3.6Testing the Shared File System
To test your NFS setup, follow these steps:
1) Get the IP add ress of y our hos t Lin ux wor kstatio ns as fo llows . Look
for the IP address associated with the eth0 Ethernet port.
host $ /sbin/ifconfig
2) Open a terminal e mul ati on win dow to c onne ct to the E VM bo ar d vi a
RS-232 using the instructions in Section 2.2. 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.)
3) Power on the EVM board, and abort the automatic boot sequence by
pressing a key in the console window (Section 2.2).
4) Set the following environment variables in the console window:
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.
Installing the Software
<directory to mount> must match what you specified in Step
The
5 of Section 4.3.5. For example, /home/<useracct>/workdir/filesys.
Hints: You may want to use the prin tenv command to prin t 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.
5) Save the environment so that you don't have to retype these
commands every time you cycle power on the EVM board:
EVM # saveenv
6) Boot the board using NFS:
EVM # boot
7) You can now log in as "root" with no password required.
DVEVM Software Setup4-11
Installing the Software
See Section A.4, A lternate Boot Methods fo r information about bootin g
with TFTP or NFS and using flash or the EVM’s hard drive.
4.3.7Configuring the Boot Setup for PAL Video Users
You can configure the EVM to select either the NTSC or PAL video
standard during the d efau lt boo t sequ enc e. To select PAL, set swi tc h 1 0
on the S3 (USER) user bank of switches to On. For NTSC, set this switch
to Off. The switch causes the U-Boo t envir onmen t variabl e "vid eostd" to
be set to "pal" or "ntsc".
Using the "videostd" variable in the "bootargs" environment variable
passed to the Linux kernel caus es the corre sponding v ideo standard to
be used by the display (VPBE) driver. For example:
When the "boot" command is run in U-Boot, the value of "videostd" is
substituted based on the setting of the switch.
See Section A.1, Changing the Video Input/Output Methods for
information about switching to S-Video and Component video.
4.3.8Notes on Using Evaluation/Production Codecs
As part of the DVSDK installation, you received a number of codecs:
❏H.264 Base Profile Decoder
❏H.264 Base Profile Encoder
❏MPEG4 Restricted Simple Profi le Decode r
❏MPEG4 Simple Profile Encoder
❏MPEG2 Decoder
❏AAC Decoder
❏MP3 Decoder
❏G.711 Decoder (not a TI codec)
❏G.711 Encoder (not a TI codec)
4-12
Setting Up the Build/Development Environment
These codecs are provided under a "for demonstration-only" license
agreement. If you wish to use these codecs in a production development
environment, you can go to the DVEVM Updates web site at
http://www.ti.com/dvevmupdates to download the latest production
versions, along with the appropriate license agreement.
4.4Setting Up the Build/Development Environment
To set up the GPP-side development and build environment, follow these
steps:
1) Log in to your user account (and not as root) on the NFS host
system.
2) Set your PA TH so that the MontaVista tool chain host tools and cross
compiler (arm_v5t_l e-gcc) can be found. For exampl e, in a default
installation of the MontaVista LSP, you should add a definition like
the following to your shell resource file (for example, ~/.bashrc):
If you installed in a location other than /opt/mv_p ro_5.0 , use your
own location in the PATH.
3) Remember to use the following command after modifying your
.bashrc file:
host $ source ~/.bashrc
4.4.1Writing a Simple Program and Running it on the EVM
Make sure you have per formed the steps in Section 4.3.5, Exporting a
Shared File System for Target Access and Section 4.4, Se tting Up the
Build/Development Environment.
Perform the following steps on the NFS host system as user (not as root):
2) host $ cd /home/<useracct>/workdir/filesys/opt/hello
3) Create a file called hello.c with the following contents:
#include <stdio.h>
int main() {
printf("Buongiorno DaVinci!\n");
return 0;
}
DVEVM Software Setup4-13
Building a New Linux Kernel
4) host $ arm_v5t_le-gcc hello.c -o hello
Perform the followi ng st eps on the target bo ard. You may use either the
target's console window (Section 2.2) or a telnet session.
1) target $ cd /opt/hello
2) Run ./hello. The output should be:
Buongiorno DaVinci!
4.5Building a New Linux Kernel
If you modify the target’s Linux kernel sources, you will need to rebuild it
and then boot it up by either replacing the kernel that comes installed on
the EVM board’s flash or by having the U-Boot utility use TF TP to boot
the kernel over a network connection.
Make sure you have completed Section 4.4, Setting Up the
Build/Development Environment and Section 4.4.1, Writing a Simple
Program and Running it on the EVM before attempting to build a new
kernel.
To rebuild the Linux Kernel, follow these steps:
1) Log in to your user account (not as root).
2) Set the
PLATFORM variable in the Rules.make file as described in
Section 4.6.
3) Use commands like the following to make a local working copy of the
MontaVista Linux Support Package (LSP) in your home directory.
This copy contains the embedded Linux 2.6.18 kernel plus the
DaVinci drivers. If you installed in a location other than
/opt/mv_pro_5.0, use your location in the cp command.
host $ cd /home/<useracct>
host $ mkdir -p workdir/lsp
host $ cd workdir/lsp
host $ cp -R /opt/mv_pro_5.0/montavista/pro/devkit/lsp/ti-davinci .
4) Use the following commands to configure the kernel using the
DaVinci defaults. Note that CROSS_COMP ILE sp ecifies a prefix for
the executables that is used during compilation:
host $ cd ti-davinci/linux-2.6.18_pro500
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- davinci_dm644x_defconfig
4-14
Building a New Linux Ke rnel
5) To modify the kernel opti ons, you will need to use a configuration
command such as "mak e m enu co nfi g" or "make xconfig". To enable
the MontaVista default kernel options, use the following command:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- checksetconfig
6) If you want to enable Linux Trace for the SoC Analyzer, follow these
substeps. Otherwise, skip to Step 7.
a) Use this command to go to the configuration menu for the ARM:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- menuconfig
b) Navigate to Devi ce Drivers-> Filesyste ms->Pseud o Filesystem s.
c)Set Relayfs file system support to "built-in".
d) Return to the main menu and navigate to General Setup.
e) Enable Linux Trace Toolkit Support as "built-in".
f)Select Exit to save your changes and exit the configuration
screen.
7) Compile the kernel using the following command:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
8) If the kernel is configured with any loadable modules (that is,
selecting <M> for a module in menuconfig), use the following
commands to rebuild and install these modules:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- modules
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le-
9) Use the following command to copy the uImage to a place where UBoot can use TFTP to download it to the EVM. These commands
assume you are using the default TFTP boot area, which is /tftpboot.
If you use another TFTP root location, please change /tftpboot to
your own TFTP roo t locati on. (Perform these com mands as root or
use a
chown uImage command to get ownership of the file.)
■Modify the following envir onment variables as needed to match
the locations of these components on your Linux host. We
recommend that these components be installed in the
/home/<useracct>/dvsdk_#_# directory, but you may have
installed them elsewhere.
4) While in the same directory that contains Rules.make, use the
following command s to b uil d t he DV S DK d emo ap pli c ati ons and put
the resulting binaries on the target file system specified by
EXEC_DIR.
host $ make clean
host $ make
host $ make install
8_pro500
4-16
5) You can tes t the rebuilt DVEVM software by booting your NFS file
system and running the demos from the command line as described
in Section 3.4.
4.7Booting the New Linux Kernel
After building the new kernel, in order to use it to boot the DaVinci board,
you must transfer it to the board via TFTP. It is assumed you have
completed the steps in Section 4.5, Building a New Linux Kernel and the
boot file, uImage has been copied to /tftpboot (or some other site-specific
TFTP accessible location).
1) Power on the EVM board, and abort the automatic boot sequence by
pressing a key in the console window (Section 2.2).
2) Set the following environment variables. (This assumes you are
starting from a defaul t, clean U-Boot env ironment. S ee Sect ion 3.1 ,
Default Boot Configuration for information on the U-Boot default
environment.)
Note that the setenv bootargs command should be typed on a
single line.
Booting the New Linux Kernel
3) Boot the board:
EVM # boot
This configuration boots a new Linux kernel via TFTP with a hard drive
based file system. To boot via TFTP using an NFS file system, see
Section A.4.4.
For instructions on how to verif y that your host workstation is runni ng a
TFTP server, and for instructions on what to do if it isn’t, see Section A.3.
For more details on booting, see Section A.4.
DVEVM Software Setup4-17
Testing the Build Environment
4.8Testing the Build Environment
To test your DVSDK software installation, you can build one of the Codec
Engine servers. This server is a DSP-side application. Building it tests the
installation of DSP-side development components.
To build the video_copy server, follow these steps:
1) Go to /home/<useracct>/dvsdk_#_#/codec_engine_#_#/examples
and open the build_instructions.html file.
2) Follow the step-by-step instructions for building examples. When you
are editing the xdcpaths.mak file, note that the DVS DK installation
does not include the ce tools directory, so you will need to set the
USE_CETOOLS_IF_EXISTS variable to 0, and modify additional
variables to point to the locations of xDAIS, DSP/BIOS Link, CMEM,
and Framework Components.
3) Go to the video_copy server directory.
(/home/<useracct>/dvsdk_#_#/codec_engine_#_#/examples/
servers/video_copy) to inspect the built server.
4.9Using the Digital Video Test Bench (DVTB)
The Digital Video T est Bench (DVTB) is a Linux utility that was developed
to execute end-to-end data flows using the DVSDK for any platform.
DVTB uses the Codec Engine VISA APIs and Linux driver peripheral
APIs to encode and decode video, image, audio and speech streams.
Using DVTB, you can configure codecs and/or peripherals before starting
a data flow. This enables you to try different use case scenarios and
evaluate the system.
The DVSDK installation places DVTB in the
/home/<useracct>/dv sdk_#_#/ dvtb_#_#_ # directo ry, where #_#_# is the
DVTB version number).
To install DVTB to the target file system, per form the followin g steps on
the host machine where the DVSDK has been installed:
1) Make sure the Rules.make file defines PLATFORM correctly as
described in Section 4.6.
2) Perform the following commands:
host $ cd /home/<useracct>/dvsdk_#_#/dvtb_#_#_#
host $ make clean CONFIGPKG=dm6446
host $ make CONFIGPKG=dm6446
4-18
Using the Digital Video Test Bench (DVTB)
3) Copy the binaries " dv tb- d" and "dvtb-r" to /opt/dvsdk/dm 6 446 on the
device’s target filesystem and run it there. It must be in the sam e
directory as the DSP executables.
For further details on the DVTB, see the following documents:
Built upon T exas Instruments' eXpressDSP data visualization technology
(DVT), the SoC Analyzer simplifies debugging, analysis, and optimization
of DVEVM applica tions. It collects execution, inte raction, and resource
utilization logs from Linux, DSP/BIOS, Codec Engine, and driver s and
presents system-level analysis and graphical visualization such as:
Install the SoC Analyzer as described in Section 4.3.4.
Documentat ion for DSP-Side Develo pment
To run the SoC Analyzer, double-click the SoC Analyzer icon on the
Windows Desktop or select it from the Windows Start menu under Texas
Instruments.
The SoC Analyzer c ome s w ith onl in e he lp , whi c h can be accessed from
the SoC Analyzer Help menu (choose Help->Help Contents). Select the
DM644x SoC Analyzer User Guide.
Follow the "Getting Started" chapter of the DM644x SoC Analyzer UserGuide, which includes steps on how to run the tool with d emonstration
logs shipped with the product. This "Getting Started" chapter also
contains the steps you should perform to enable your applications to
collect logs for the SoC Analyzer. The DV EVM Demo Application has
such logging enabl ed by default. The uIm age must be rebuilt to enable
logging.
4.11Documentation for DSP-Side Development
After you have ins talled the DVSDK software, yo u can begin to create
and modify DSP-side applications for your DM644x.
The following table lists places to look for doc umentation on usi ng each
component of the DVSDK . Documents in PDF, HTML, and text format
are included in the installations with each produ ct.
There is a significant q uality d ifference betwe en the differen t inputs and
outputs. However, the cables in the DVEVM kit support only com posite
video. You will need to get S-Video or Component video cables from
another source.
A.1.1Using S-Video Input
To switch to higher-quality S-Video input, follow these steps:
1) Connect your S-Video conne ctor to the S-Video inp ut port, which is
directly to the left of the currently-used composite video input port.
2) Select S-Video input on the command line when you execute the
encode or encodedecode demo using the '-x' flag.
S-Video
IN
A-2
A.1.2Using S-Video Output
To switch to higher-quality S-Video output, follow these steps:
1) Unplug the com pos it e video c onn ec tor. Then, connect your S-Video
connector to the S-Video output port, which is to the right of the
currently-used compo si te vid eo outp ut por t.
The DVEVM kit does n ot include an S-Video cab le. In add ition, yo u
will need a video display with an S-Video input.
Changing the Video Input/Output Methods
S-Video
OUT
2) On the kernel command lin e, you can configure the EVM to select
both NTSC vs. PAL and the S-Video output format (see Section
4.3.7, Configuring the Boot Setup for PAL Video Users). For
example, if you want both NTSC and S-Video output, use the
following:
To switch to highest-quality component video output, follow these steps:
1) Connect your comp onent video connectors to the connectors in a
square on the far left of the board. Instead of connecting one
connector as wit h composite video, conn ect the YPrPb connecto rs
as shown here.
The DVEVM kit does not include a 3-connector cable used for
component (YPrPb) v id eo. Th e cabl e y ou us e ma y hav e red , gr een ,
and blue connectors, but you should be aware that the Y, Pr, and Pb
signals used by component video do not correspond to RGB signals.
In addition, you will need a video display with component video
inputs.
PrPb
Y
2) On the kernel c ommand line, you can configure the EVM to s elect
both NTSC vs. PAL and the component video output format (see
Section 4.3.7, Configuring the Boot Setup for PAL Video Users). For
example, if you want both NTSC and comp onent video outp ut, use
the following:
Putting Demo Applications in the Thir d-Part y Men u
A.2Putting Demo Applications in the Third-Party Menu
You can add y our own demos to the Third-Party Menu by followin g the
steps in this section. Only four demos can be shown at once in the userinterface. If you add more than four demos , the first four in alphabetic al
order are shown.
1) Create the following files for your demo:
■logo.jpg. This is the logo of the third party company which will be
showed next to the demo description. The picture needs to be in
JPEG format and of size 50x50.
■readme.txt. This i s a text file. T he first 40 characters of t he file
should briefly des cribe the demo. The demo int erface displays
up to 40 characters, but stops if it encounters a new line
character. For example, the file might contain "Video Phone
demo" or "Network Audio demo".
■app.sh. This is an exec utable that launches your demo. It can
either be the demo executable itself or a shell script that
executes the executable. (If this is a shell script, make sure its
executable bit is set for all). A script could look something like:
#!/bin/sh
exec ./mydemoname
■other files. If app.sh is a shel l scr ip t, your dem o e xe cu table wi ll
have some other nam e. You may also need to incl ude data fil es
or other files used by the executable.
Note: The demo application mu st use relative paths to access any
files it needs at runtime. This because the archive is extra cted to
another location from which the demo is executed.
2) Create a gzipped tar file (ends with .tar.gz) that archives all the files
in the previous list. For example, if your files are logo.jpg, readme.txt,
and app.sh, you could use the following command:
tar cvzf ti_videophone.tar.gz logo.jpg readme.txt app.sh
Name the tar file using <company>_<demoname>.tar.gz (with no
spaces in the file name ) as the convention. For example, a video
phone demo created by Texas Instruments would be named
ti_videophone.tar.gz. The name must be unique since all demos ar e
installed in the same directory.
The three required files must be in the top-level directory of the
archive. Other files ma y be in subdirectories, so long as the demo
Addition al Procedur esA-5
Putting Demo Applications in the Third-Party Menu
uses relative references to ac cess the m. For ex ample , the follow ing
directory structure might be used in the archive:
To check the format of the file you create, execute the following
command in Linux. The result should say "gzip compressed data".
file <filename>.tar.gz
3) Put your archive in the "thirdpartydemos" subd irectory of the target
installation directory. This is where the DVSDK software was
installed on the target file system. The default target installation
directory is /opt/dvsdk/dm6446, so the default location for demo
archives is /opt/dvsdk /dm6446/thirdpartydemos. Do not extract th e
contents of the archive in this location. Extraction is performed
behind-the-scenes each time the demo is run.
A-6
A.3Setting Up a TFTP Server
You can check to see if a TFTP server is set up with the following
command:
host $ rpm -q tftp-server
If it is not set up, you can follow these steps:
1) If you have not yet installed MontaVista Linux Demo Edition (see
Section 4.3.1), you can down lo ad a TFTP serv er for you r Linux hos t
from many locations on the Internet. Search for "tftp-server".
3) Confirm that TFTP is installed with this command:
host $ /sbin/chkconfig --list | grep tftp
If you want to turn on the TFTP server, use this command:
/sbin/chkconfig tftp on
The default root location for servicing TFTP files is /tftpboot.
Addition al Procedur esA-7
Alternate Boot Methods
A.4Alternate Boot Methods
The default configu ration for the EVM is to boot from fla sh with the file
system on the EVM’s ha rd drive. The following ar e alternate ways you
may want to boot the board:
❏TFTP boot with hard drive file system (Section A.4.2)
❏Flash boot with NFS file system (Section A.4.3)
❏TFTP boot with NFS file system (Section A.4.4)
Section 4.3.7 discusses booting in PAL mode vs. NTSC mode.
The subsections that follow show the environment variable settings used
to enable each boot method.
Note: Using video files from an NFS file system may result in a low
frame rate when encoding/decoding videos.
To boot in one of these modes, follow these steps:
1) Power on the EVM board, and abort the automatic boot sequence by
pressing a key in the console window (Section 2.2).
2) Set the environm ent v aria ble s i ndi ca ted in the foll owi ng s ubsec ti ons
for the boot mode you want to use. (Note that the
command should be typed on a single line.)
3) If you want to use these settings as the default in the future, save the
environment:
EVM # saveenv
4) Boot the board using the settings you have made:
EVM # boot
A.4.1Booting from Flash Using the EVM’s Hard Drive File System
This is the default, out-of-the-box boot confi gur ati on .
setenv bootargs
A-8
To boot in this mode, set th e following parameters after you abort the
automatic boot sequence:
If you want to rebuild the DSP /BIOS Link package, follow these steps
(assuming you are using the bash shell):
1) Edit the davinci_mvlpro5.0.mk file, which is in the
/home/<useracct>/dvsdk_#_#/dsplink_#/packages/dsplink/ma ke/Linux/
directory, to make sure the BASE_BUILDOS and BASE_CGTOOLS
variables correctly point to the correct locations. For example:
2) Define the DSPLINK environment variable to be the absolute path to
the "dsplink" directory . (Use export for bash shell, and setenv for tcsh
shell.) For example:
5) The rebuilt ker nel module is called dsplinkk.ko. It is l ocated in the
$DSPLINK/gpp/export/BIN/Linux/Davinci/DM6446/RELEASE/
directory.
Addition al Procedur esA-11
Restoring and Updating the EVM Hard Disk Drive
A.6Restoring and Updating the EVM Hard Disk Drive
This section describes how to restore and update all the files on the EVM
hard disk drive (H DD), including the Linux file sys tem and the demos.
Using these restore proced ures, you can return your board to a known
state if anything happens to the data on the EVM board’s HDD.
This section assumes that you have configured a host Linux workstation
with the software necessary to perform an NFS root mount with the EVM
as described in Section 4.3.5 and Section 4.3.6.
For further information about upg radi ng and flashi ng, s ee the TI DaVinci
Technology Developers Wiki at http://wiki.davincidsp.com.
In this section, U-Boot is always located at the start of flash memory
(address 0x0200000 0) on the target. Si mila rly, uImage, the Linux kernel
program, is booted from the target flash memory address of 0x02050000.
Note: If you have flashed a n ew kernel to the NOR fla sh at an addre ss
other than 0x2050000, then the flash memory address will be different.
A.6.1System Setup
You should make sure the following system setup steps have been
performed before you attempt to restore or update the hard disk drive:
1) Inspect jumper J4, which is labeled "CS2 SELECT". Make sure
FLASH is selected.
2) Connect the Ethernet port of the host workstation to a router.
Configure the host Ethernet port to obtain IP address dynamically via
a DHCP server running inside the router.
3) Connect the Ethernet p ort of the target EVM to anothe r port on the
same router. This establishes a network connection with your host
workstation.
4) Connect an RS-232 c able from the UART0 port of the target EVM
board to the host workstation.
5) On the host workstatio n, open a ter minal sess ion to the target EVM
board with the following characteristics:
■Bits per Second: 115200
■Data Bits: 8
■Parity: None
■Stop Bits: 1
■Flow Control: None
A-12
For example, you ca n cr eate a terminal sessi on wit h HyperTerminal
or TeraTerm on MS Windows, and Minicom or C-Kermit on Linux.
6) Start an NFS server on the host workstation. This document
assumes the host path /home/user/workdir/filesys contains a file
system that the target EVM can use for root mounting.
A.6.2Configure EVM for NFS Root Mount
Follow these steps to configure your EVM for an NFS root mount:
1)Configure the Boot Switches (S3) to 1011111110. This is the bank of
switches in the middle of the EVM.
2) Power on the EVM and hit any key to enter U-Boot.
3) Configure bootcmd as follows to boot the Linux kernel via flash.
EVM # setenv bootcmd bootm 0x2050000
Note: If you have flashed a new kernel to the NOR flash at an
address other than 0x2050000, modify this command accordingly.
4) Configure bootargs as follows to root mount the file system from
NFS:
The nfsroot option in this command uses the host workstation IP
address. Make sure to replace the <host ip addr> with the actual
address of your host Linux workstation.
5) Optional: Print the U-Boot parameters
EVM # printenv
6) Save the U-Boot parameters
EVM # saveenv
7) Boot EVM from NFS on the host Linux workstation
EVM # boot
8) Log into MontaVista Linux as "root".
Addition al Procedur esA-13
Restoring and Updating the EVM Hard Disk Drive
A.6.3Restore the EVM Hard Disk Drive
The EVM hard disk drive (HDD) can be restored from a target EVM HDD
partition or from the host Linux workstation file system. Either method will
achieve the same result.
Restoring the EVM HDD takes 10 to 15 minutes. The restore script must
uncompress 600 MB of com pressed data and load it to the /dev/hda1
partition.
After the hard drive restore process has completed, make sure to restart
the EVM and configure U-Boot to root mount via the local HDD. The steps
for this type of boot are provid ed in Section A.4.1, Booting from Fl ashUsing the EVM’s Hard Drive File System.
A.6.4Restoring From Target EVM HDD Partition
Follow these steps to restor e the HDD from the restore partition on th e
HDD itself:
1) Make a directory for mounting the HDD restore partition:
EVM # mkdir /mnt/restore
2) Mount the HDD restore partition:
EVM # mount -t ext3 /dev/hda2 /mnt/restore
3) Set the Linux da te variable to today 's date. If the da te is too far off,
the target file system installation generates a bunch of warnings.
EVM # date MMDDHHMMCCYY
For example, for 9:00 am on April 18th, 2006, enter 041809002006.
4) Change directory to /mnt/restore:
EVM # cd /mnt/restore
5) Add execute permissions for the script:
EVM # chmod +x restore-hdd
6) Run the restore script:
EVM # ./restore-hdd
A-14
Restoring and Updating the EVM Hard Disk Drive
7) The script will ask for confirmation: "This will destroy all data on
/dev/hda1 - are you sure?" Type yes.
8) After the HDD restore is complete, shutdown the EVM:
EVM # halt
9) When the "Power dow n" mess age is print ed in the termi nal win dow,
it is safe to power down the EVM.
10) Restart the EVM and con figure U-Boot to root moun t via the local
HDD. Follow the steps in Section A.4.1, Booting from Flash Usi ng theEVM’s Hard Drive File System.
A.6.5Restoring From Host Linux Workstation File System
This section assumes that you have installed the DVEVM software to the
host Linux /workdir/fil esys/restore dire ctory. After an NFS mount, this is
equivalent to /restore for the target EVM.
Follow these steps to restore the HDD from the host Linux workstation
restore directory:
1) On your host workstation, copy the restore directory from the TI
DVSDK disk to /home/<useracct>/workdir/filesys/restore. After NFS
mounting this file system, this will appear as the /restore directory on
the EVM.
2) Login to the EVM as root.
Addition al Procedur esA-15
Restoring and Updating the EVM Hard Disk Drive
3) Go to the /restore directory.
EVM # cd /restore
4) Set the Linux da te variable to today 's date. If the da te is too far off,
the target file system in stallation generates warnings for each file it
installs.
EVM # date MMDDHHMMCCYY
For example, for 9:00 am on April 18th, 2006, enter 041809002006.
5) Add execute permissions on the prep-hdd script.
EVM # chmod +x prep-hdd
6) Run the prep-hdd script in the /restore directory.
EVM # ./prep-hdd /restore
7) The script will ask for confirmation: "Are you sure you want to
partition and format /dev/hda1?" Type yes.
8) After the HDD restore is complete, shutdown the EVM:
EVM # halt
9) When the "Power dow n" mess age is print ed in the termi nal win dow,
it is safe to power down the EVM.
10) Restart the EVM and con figure U-Boot to root moun t via the local
HDD. Follow the steps in Section A.4.1, Booting from Flash Using theEVM’s Hard Drive File System.
If you instead manually restore the overlay.tar.gz file from disk 1 on an
NFS file system, the demos will likely p roduce a cryp tic error. Although
such manual res tores are not documented or recomme nded, you can
correct the problem by turning off the s-bit as follows:
full version 4-3
MPEG2 video 3-9
MPEG4 video 3-7, 3-9
multimedia peripherals 1-4
N
NFS server 4-9
boot configuration A-10
testing 4-11
video performance 4-9
NTSC video 2-2, 4-12
O
OSD show and hide 3-5
OSD toggle 3-5
overlay.tar.gz file A-16
P
PAL video 2-2, 4-12
PATH environment variable 4-13
Pause button 3-5
performance 4-9
peripherals 1-4, 2-2
Play button 3-5
ports 2-4
power 2-5
Power button 3-5
power cable 2-4, 2-5
Index--2
Index
prompts 4-3
Q
quit demo 3-5
R
rebuilding
DVEVM software 4-16
Linux kernel 4-14
Record button 3-5
Red Hat Enterprise Linux 4-6
remote control 1-3, 3-3
resetting code 3-3
restore HD D A-12
Rules.make file 4-16
running application s 3-4
S
s-bit A-16
serial cable 2-6
serial connection 2-5
SoC Analyzer 4-2, 4-9
software 4-2