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 products to the specific ations appl icable at the ti me of sale i n accordance
with TI's standard warra nty. T esting and other qualit y control techniques are used to the extent 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 inte llect ual prop erty righ t relatin g to any c ombin ation, m achin e, 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 en dorsemen t thereof. Use
of such information may requ ire a l ice ns e from a thi rd party under the patents or ot her in tel lec tu al pro perty of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of i nformation in T I data books or data sheet s is permissible only i f reproductio n is without 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 r esp ons ib le o r lia bl e for s uc h al tere 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 r es s a nd an y i mp li ed wa rran tie s 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 p r odu ct s an d a ppl ic ation solutions:
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 compl ete in terms of re quired desi gn-, marke ting-, and/or m anufacturing 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 iconductor components or circu it b oard s. T his
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 for a full re fund. 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 ust omers for pro ducts, and therefore our arrangeme nt w it h
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 and/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 finishe d
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 thi s eq uipment in other environments may c aus e in terfe r ence with radio co mm un ic atio ns , in which case the user at his own ex pe nse will be required to
take whatever measures may be required to correct this interference.
About This Guide
The DVEVM (Digital Video Eval uat ion Module) is an eval ua tio n pl atf or m
that showcases the DaVinci architecture and lets users evaluate the
power and performance of DaVinci 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 documentation section of the
release notes for a complete lis t of documents th at have been included
with the product.
Notational Conventions
This document uses the following conventions:
❏Program listings, program examples, and interactive displays are
Preface
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.).
❏Square brackets ( [ and ] ) identify an option al parameter. If you use
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 no t
enter the brackets themselves.
v
Trademarks
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.
MS-DOS, Windows, and Windows NT are trademarks of Microsoft
Corporation.
UNIX is a registered trad emark of The Open 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 reg istered trademarks of
Sun Microsyst ems, Inc.
All other brand, product na mes, and service names are trademarks or
registered trademarks of their respective companies or organizations.
Your TMS230DM357 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 TMS320DM357 Digital
❏Universal Power Supply. Both U.S. and European power are
❏Cables. Serial and Ethernet cables are included to allow for host
❏IR Remote Control (Phillips). This universal remote control is
The DVEVM kit also comes with the following software disks. Information
about how to use the software components is provided in Chapter 4.
❏DaVinci Digital Software Developer’s Kit, including TI DaVinci
❏Spectrum Digital EVM Tools
Media System-on-Chip.
supported.
development.
included to provide a user interface to the demo applications.
Demonstration Version of MontaVista Linux Pro v5.0. (2 DVDs)
1-2
1.2What’s on the Board?
The EVM comes lo aded with peripherals your multime dia applications
may need to make use of. The fol lo win g bl ock di agr am sho ws th e maj or
hardware components.
TI JTAG
SD/
MMC
DC6
DDR
DDR
ARM JTAG
S1
NAND
Serial Media
DDR
Video Ports
DC1 (EMIF)
Boot
TMS320
DM357
EMIF
CPLD
PGM
Storage
NAND
CPLD
S3
What’s on the Board?
IR
MSP430
JTAG
BAT
I2C
I2C
EEPROM
Config
I2C
GPIO
I2C
GPIO
DC7
3V
User LEDs
I2C
GPIO
MSP430
3.3V Board S u pply Voltage
1.8V I/O Voltage
1.2V CPU Core Voltage
EMAC
PWR
SW
DC5 (VIDEO OUT)
OUT
COMP
DC4 (VIDEO IN)
USB
TVP
5146
IN
SVHS
IN
VIDEO
DC3DC2
AIC33
IN
AUDIO
OUT
AUDIO
HP OUT
S/PDIF
Drivers
Optical
S/PDIF
ENET
PHY
10/100
ENET
Analog
S/PDIF
UART
Diagram provided courtesy of Spectrum Digital Inc.
Figure 1–1 DM357 Hardware Block Diagram
For more information about the hardware, see the Spectrum Digital
website at http://support.spectrumdigital.com/boards/evmdm357.
The DaVinci EVM incorporates a battery holder to provide backup power
to the MSP430’s real-ti me 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.
+5V
DVEVM Overview1-3
What’s Next?
1.3What’s Next?
To get started evaluating the DV EV M kit a nd d ev elo pin g ap pli c ations for
the DM357, begin by usi ng this Getting Started guide. It will step you
through connecting the hardware, testing the software, and beginning to
develop applications.
When you are ready for more information about DaVinci T echnology and
the DM357 architecture, see the following:
❏TI DaVinci Software Updates: http://www.ti.com/dvevmupdates
❏TI Linux Community for DaVinci Processors:
http://linux.davincidsp.com
❏Codec Engine Application Developer's Guide (SPRUE67)
❏TI DaVinci Technology Developers Wiki: http://wiki.davincidsp.com
❏Other PDF documents on the DVDs included with the DVEVM kit
1-4
EVM Hardware Setup
This chapter tells you how to set up the EVM hardware.
To set up the hardware prov ided wit h the DVEVM k it, us e the steps that
follow. You may skip steps if you do not need to access a particular
peripheral. For examp le, if you do not ne ed to use the s erial cabl e, skip
that step.
For reference, the num bers in the following photo of the DM357 EV M
target board correspond to the steps in the procedure.
8
8
3
3
1
1
2
2
567
4
4
Important: The EVM board is sensitive to static
discharges. Use a g rounding strap or other devi ce to
prevent damaging the board. Be sure to connect
communication cables before applying power to any
equipment.
567
2-2
Setting Up the Hardware
1) On the S3 mini-dip switch, verify that positions 1 through 4 are
configured to boot from on-board NAND as in the following figu re,
where the black rectangle is the switch location.
1
2
3
4
5
6
7
8
9
10
Also on the S3 mini-dip switch, verify that position 10 selects the
correct video format— NTSC or PAL. The followi ng diagram shows
the switch in the NTSC setting.
2) Connect an audio speaker to Stereo Line Out (P5) and an audio
source to Stereo Line In (P3).
Audio In (P3)Audio Out (P5)
EVM Hardware Setup2-3
Setting Up the Hardware
3) Connect your video display to the composite video-out RCA
connector (J8).
Composite
Video Out (J8)
4) Connect a video source (such as a camera o r DVD player) to the
composite video-in RCA connector (J12). Then power on your video
input and output devices.
2-4
Composite
Video In (J12)
Setting Up the Hardware
5) (Optional) If you pla n to use the UART port for a console window,
connect the prov ided RS-232 null m odem cable to the EVM UART
port (P6) and to a COM port on your host Linux workstation.
10/100
Ethernet (P2)
UART (P6)Power (J14)
6) (Optional) If you will be using an Ethernet connection, connect the
provided Ethernet cabl e to the E the rn et p ort (P 2) on the E V M bo ar d
and to an Ethernet network port.
Note: If you do not connect the board’s Ethernet controller to a
computer running a DHCP server, booting the board may take
several additional minutes.
7) Connect the provi ded power cable t o the DVEVM power jack (J14)
on the board. To be ESD safe, plug in the other end of the cable only
after you have connected the power cord to the board.
8) Power on the EVM board by flippi ng the powe r switc h (SW1).
EVM Hardware Setup2-5
Connecting to a Console Window
9) Y ou should see the initial screen of the demo software on your video
display. Use the IR remote to run the software as described in
Chapter 3.
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 configure i t to connect to that
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 NAND flash 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 2.1)
To abort the standard boo t, press 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.
Note: It is best to power down the board cleanly in order to reboot,
rather than using the reset button or power switch. We recommend
that you use the shutdown command to shu t down the operating
system and unmount the file system b efore removing po wer from
the board. This will help p revent cor ruption of the flash-bas ed root
file system.
3.2Starting the Standal one Demos
When you connect the EVM hardware, the pre-loaded examples run
automatically on your video 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 ectio n to a workstation 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 s tart the de mo we b s erve r a nd th e
demo interface.
3-2
Starting the Standalone Demos
❏Command line. Once you have connected the EVM to a workstation
and installed the neces s ary so ftwar e (as de sc ribe d i n S ec ti on 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 li ne, see the demo docume ntation that is
linked to by the DVSDK release notes.
Note: When you run the demos from th e command l ine, make sur e
the interface process used by the standalone mode demos is not
running. Otherwise y ou wil l see er r or me ss ag es r aised whe n d evi c e
drivers fail to open.
Running the Demonstration Software3-3
Starting the Standalone Demos
Once the EVM board has b ooted, your video
display should show a picture of the r emote
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 ki t 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.
3-4
4) If you accidentally put the remote in TV or
some other mode , press "D VD" 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.
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:
Running the Standalone Demos
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.
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 sett ings screen, whe re you see th e
controls you can use to run the demo at the bottom of the screen and
the current settings in the upper-right.
4) Use the up and down arrows to move to a setting you want to change.
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.
Running the Demonstration Software3-5
Running the Standalone Demos
8) This information o verlay s the vi deo; as a resul t the vide o you s ee is
darker than the actual video . To hide the infor mation displ ay 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.
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.
Note: It is best to power down the board clea nly in or der to r eboot
rather than using the reset button or power switch. We recommend
that you use the shutdown command to shu t down the operating
system and unmount the file system b efore removing po wer from
the board. This will help p revent cor ruption of the flash-bas ed root
file system.
3-6
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.
3.3.2About the Encode + Decode Demo
The Encode + Decode demo allows you to rec ord and playback video .
Video input comes from a source, it is encoded, then decoded, and sent
to your video 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 is H.264
(.264 file extension).
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
Running the Standalone Demos
The video signal is passed to video encoders and decoders by the Codec
Engine.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning theDemos from the Command Line.
3.3.3About the Encode Demo
Like the Encode + Decode demo, the Encode demo also encodes video.
In addition, it also encodes audio or speech. The audio/speech source is
the microphone.
The encoded data is written to files on the EVM’s NAND flash. The
possible filenames are demo.264, demo.mpeg4, demo264.g711, and
demompeg4.g711. Older versions of these files are overwritten as
needed.
The encode demo has a five minute ti me limit to prevent the demo fro m
filling up the NAND file system.
Output is not de coded and sent to your video display or sp eakers ot her
than to show the settings and dynamic data collected about the load and
rates.
Running the Demonstration Software3-7
Running the Standalone Demos
Note that you can use only a speech encoder, not an audio encoder. The
supported video algorithms are H.264 (.264 extension) and MPEG4
(.mpeg4 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
Record (twice)
or OK
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
Setup / RunBegin encode demo, send unencoded
data to display
(There is no display for encode demo
behind the information.)
The application runs on the ARM using Linux. The video and audio
signals are passed to encoders by the Codec Engine.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning theDemos from the Command Line.
3-8
3.3.4About the Decode Demo
Note: You must run the Encode demo before you can run the
Decode demo unless you hav e placed appropria tely-named audi o
and video files on the EVM’s NAND flash storage device. If you see
a message that says "File Not Found", please run the Encode
demo.
The Decode demo pla ys audio/speech and video fil es you 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 Encode demo, which are stored on the EVM’s NAND
flash. The decoded signals are sent to your video display and speakers.
The supported video algorithms are H.264 (.264 extension) and MPEG4
(.mpeg4 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
Running the Standalone Demos
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 by the Codec Engine.
To use this demo from the c ommand l ine, see Sec tion 3.4, Run ning the
Demos from the Command Line.
Running the Demonstration Software3-9
Running the Demos from the Command Line
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.
Before running demo applications from the command line, the CMEM
and accelerator k ernel modules must be loaded. Use "lsm od" to see if
they are loaded. If not, use the following commands to load these
modules:
Target $ cd /opt/dvsdk/dm357
Target $ ./loadmodules.sh
To see the command-line options for the demos, use one of the following
commands with the -h or --help option:
Target $ ./encodedecode -h
Target $ ./encode -h
Target $ ./decode -h
You can also find the list of command-line options in encode.txt,
decode.txt, and encoded ecode.txt in the respe ctive demo direc tories of
the DVSDK package on the host.
3-10
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
as part of the Linux startup sequence . It configured to service reque sts
from web browsers on the standard TCP/IP port 80.
After the EVM board has boot ed, connect a PC to the same network t o
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 see a we b 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 proce sses are runn ing on the boa rd.
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, fast,
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/dm357/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.
4.9 Using the Digital Video Test Bench (DVTB) . . . . . . . . . . . . . . . . . . 4–17
4-1
Software Overview
4.1Software Overview
To begin developing applications, you need to install the DVEVM
development environment. This section outlines the steps required to
load the DVEVM softwa re onto the de velop ment hos t. 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 integrated
accelerators. T hese codecs are bui lt into configur able 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 ARM-side DVEVM software.
❏Standalone demonstration software. This is provided on the
❏Disk 1: MontaVista Linux Pro v5.0 System Tools and Target File
EVM’s NAND flash. The hard-wir ed examples encode and decode
audio, video, and speech. Another demo shows the board’s network
capabilities. See Section 3.2, Starting the Standalone Demos and
Section 3.5, Running the Network Demo.
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:
■data.tar.gz (Contains A/V data files for use by the demos)
■restore/dm357_flash_image_#_#_#_#.tar (Contains files for
NAND flash recovery. Contact TI Technical Worldwide Support if
you need details.)
■restore/overlay.tar.gz (Contains demo files in case they are
needed for recovery. You can ignore this file.)
■bios_setuplinux_#_#_#.bin (You can ignore this DSP/BIOS
installer because the DM357 EVM contains no DSP.)
❏Disk 3:SDI Board Support Software. It contains EVM board
utilities.
Texas Instruments, in agreement with MontaVista Software Inc., is
providing a demonstr ati on vers io n of th e Li nux Pr of es sional Edition v5.0
embedded operating s ystem and developm ent tools. T he base DVEVM
kit includes a dem onstration version. The demo vers ion is a subset of
what MontaVista provides with the full Professional Edition. Tools such
TM
as DevRocket
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 licens e and
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 in 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 in the DVEVM kit:
I/O
I/O
I/O
Framework
Components
DMAN3
User Space
Kernel Space
CMEM
Driver
GPIO
Driver
GP
I/OI/OI/O
Timer
USB 2.0
Driver
MMC/SD
Driver
Wtchdg
Timer
ARM System + MPEG4/H.264/JPEG Co-Processor (HMJCP)
Application
VISA API
Codec Engine
VIDIMG
SPHAUD
Linux APIsLinux APIs
EMAC
Driver
SPI
Driver
I2C
Driver
Video
Driver
UART
Driver
Engine
Audio
Driver
xDM
API
xDM
API
Video
Codec
Speech
Codec
xDM
API
xDM
API
Imaging
Codec
Audio
Codec
4-4
In the previous figure, everything runs on the ARM. The application
handles I/O and application processing. To process video, image,
speech, and audio signals, it uses the VISA APIs provided by the Codec
Engine. The Codec Engine , in turn, uses xDM-based c odecs. For more
information, see the Codec Engine 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 1.2 GB available
space. Since you can delete the installation files after installing the
software, a directory like /tmp is recommended.
Updates to these installers may be available on the TI DaVinci S oftw ar e
Updates website listed in Section 1.3.
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:
host $ setenv DISPLAY cnabc0314159d1:0
ksh or bash:
Preparing to Install
host $ export DISPLAY=cnabc0314159d1:0
DVEVM Software Setup4-5
Installing the Software
4.3Installing the Software
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, Exporting a Shared File System for Target Access
❏Section 4.3.5, T esting the Shared File System
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 is te sted
with the DVEVM:
❏Red Hat Enterprise Linux v4 (Server Edition)
To install the Linux software, follow these steps:
1) Log in as
root on your host Linux workstatio n. This will a llow you t o
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 folder to /opt/mv_pro_5.0 directory.
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
4-6
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/ directory.
Note that unpacking these tar files will overwrite any existing files that
were previously installed.
Note: The LSP shippe d with the DVSDK is a multi-platform LSP
and is not configured for a particular platform. As shipped, this LSP
cannot be used to build th e demo or e xample a pplic ation s. 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 softwa re in cl ude s Codec Engine com pon ents, s am ple da ta
files, xDAIS and xDM header files, and a contiguous memory allocator for
Linux (CMEM).
Installing the Software
To install the DVSDK software using the Linux installer, follow these
steps:
1) Log in using a
user account. The user accou nt must have execute
permission for the dvsdk_dm357_setuplinux_#_#_#_#.bin and
xdctools_setuplinux_#_#_#.bin files.
2) Execute the DVSDK installer that you previously copied from the
DVSDK DVD. For example:
host $ cd /tmp
host $ ./dvsdk_dm357_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 $ cd /tmp
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) You can now d elete th e .bin files that y ou loaded i nto the te mpora ry
directory.
DVEVM Software Setup4-7
Installing the Software
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
The fourth disk 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 demos dire ctory in the DVSDK directory th at you set up
previously. For example:
host $ cd /home/<useracct>/dvsdk_#_#/dvsdk_demos_#_#_#
2) Mount disk 2 and copy the data.tar.gz file to your DVSDK directory.
For example:
host $ cp /mnt/cdrom/data.tar.gz .
3) Extract the A/V data files. For example:
host $ tar zxf data.tar.gz
4.3.4Exporting a Shared File System for Target Access
Although the board’s NAND flash contains a file system, during
development it is more conv enient to have the targe t board N FS moun t
a file system on a host Linux workstation. Once you have tested 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 Sy stem) s erv er. The exported file s yste m will co ntain
the targ et 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
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
user account on the host Linux workstation.
4-8
Installing the Software
3) Switch us er to "root" on the host Linux workst ation.
host $ su root
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 locati on other than /opt/ mv_pro_ 5.0, use your lo cation
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 expo rts
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
DVEVM Software Setup4-9
Installing the Software
4.3.5Testing 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 ard v i 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.
4-10
The
<directory to mount> must match what you specified in Step
5 of Section 4.3.4. 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.
See Section A.4, A lternate Boot Methods fo r information about bootin g
with TFTP, NFS, or the board’s NAND flash.
4.3.6Notes on Using Evaluation/Production Codecs
As part of the DM357 DVSDK installation, you received a number of
codecs:
❏Sequential JPEG Deco der
❏Sequential JPEG Encode r
❏MPEG4 Restricted Simple Profi le Decode r
❏MPEG4 Simple Profile Encoder
❏H.264 Base Profile Decoder
❏H.264 Base Profile Encoder
❏G.711 Decoder (not a TI codec)
❏G.711 Encoder (not a TI codec)
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.
Installing the Software
DVEVM Software Setup4-11
Setting Up the Build/Development Environme nt
4.4Setting Up the Build/Development Environment
To set up the development and build environment, follow these steps:
1) Log in to your
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 perf ormed the steps in Section 4.3.4, Exporting a
Shared File System for Target Access and Section 4.4, Se tting Up the
Build/Development Environment.
user account (and not as root) on the NFS host
4-12
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;
}
4) host $ arm_v5t_le-gcc hello.c -o hello
Perform the followi ng st eps on the targe t boar d. You may use either the
target's console window (Section 2.2) or a telnet session.
target $ cd /opt/hello
1)
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).
Building a New Linux Kernel
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_dm357_defconfig
5) To modify the kernel opti ons, you will need to use a configuration
command such as "mak e m enuconfig" or "make xconf ig" . To enable
the MontaVista default kernel options, use the following command:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- checksetconfig
6) Compile the kernel using the following command:
host $ make ARCH=arm CROSS_COMPILE=arm_v5t_le- uImage
DVEVM Software Setup4-13
Rebuilding the DVEVM Software for the Target
7) 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-
8) Use the following command to copy uImage to a place where U-Boot
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 root location. (Perform these commands as root or use a
■Modify the following envi ronment variable as needed to match
the location of XDCtools on your Linux host. We recommend that
XDCtools be installed in the /home/<useracct>/dvsdk_#_#
directory, but you may have installed it elsewhere.
XDC_INSTALL_DIR=/home
4) While in the same directory that contains Rules.make, use the
following commands to build the DVSDK demo ap pli c ati ons an d pu t
the resulting binaries on the target file system specified by
EXEC_DIR.
host $ make clean
host $ make
host $ make install
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.7Building with DSPLink
The DSPLink build system now requi res a GNU ma ke ve rsi on of 3.81 or
greater. Currently, versions of G NU make tha t qua lify are versi ons 3.81 ,
3.81beta1, 3.90, and 3.92. Red Hat Linux 3 and 4 usually have G NU
make 3.80 pre-installed, which will not build DSPLink.
To work around this, e ither install and bu ild a version o f make 3.81+ or
use the make 3.81beta1 distributed with XDCtools. The 3.81beta1
version of make is located in XDC_TOOLS_DIR/gmake.
/<useracct>/dvsdk_#_#/xdctools_#_#
See the DSPLink documentation for further information about building.
DVEVM Software Setup4-15
Booting the New Linux Kernel
4.8Booting 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 Section 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.
4-16
3) Boot the board:
EVM # boot
This configuration boots a new Linux kern el via TFTP with a NAND flash
based file system. To boot 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.
Using the Digital Video Test Bench (DVTB)
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=dm357
host $ make CONFIGPKG=dm357
3) Copy the binaries "dvtb-d" and "dvtb-r" t o /opt/dvsdk/dm357 o n the
device’s target filesystem and run it there. It must be in the same
directory as the DSP executables.
For further details on the DVTB, see the following documents:
U-Boot reads the S3 mi ni-di p switc h, pos ition 10 setting on bo ot-up and
stores the results in th e videostd environ ment variab le. As long as your
U-Boot bootcmd sets the video output using the videostd variable (as the
example bootcmds in Secti on A.4, Alternate B oot Metho ds do) , yo u can
switch between NTSC and PAL by simply changing the S3 switch setting
as shown in Section 2.1, Setting Up the Hardware.
To automatically update the bootargs based on the S3 switch setting,
please use the following options:
If you do not want to use the videostd var iable in your bootc md, use th e
following options within y our bootargs setting. The difference between
the NTSC and PAL settings is shown in bold.
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 th e Third-Party M enu 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 ch aracters 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 sh ell 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 shell script, your dem o e xecu table wi ll
have some other nam e. You may also need to incl ude data files
or other files used by the executable.
Note: The demo application mu st use relative paths to ac ce ss any
files it needs at runtime. This because the archive is extracte d 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 are
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 l ong as the demo
Addition al Procedur esA-3
Putting Demo Applications in the Third-Party Menu
uses relative references to acces s them. 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" s ubdirectory of the target
installation directory. This is where the DVEVM software was
installed on the target file system. The default target installation
directory is /opt/dvev m, so the d efault location for demo a rchives is
/opt/dvevm/thirdpartydemos. Do not extract the contents of the
archive in this loc ation. Extraction is performed behin d-the-scenes
each time the demo is run.
A-4
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-5
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 board’s NAND flash. The following are alternate ways you
may want to boot the board:
❏TFTP boot with NAND flash 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)
The subsections that follow show the environment variable settings used
to enable each boot method.
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).
Set the environment var ia ble s i ndi ca ted in the foll owi ng subs ec ti ons
for the boot mode you want to use. (Note that the
command should be typed on a single line.)
2) If you want to use these settings as the default in the future, save the
environment:
setenv bootargs
EVM # saveenv
3) Boot the board using the settings you have made:
EVM # boot
A.4.1Booting from Flash Using Board’s NAND Flash File System
This is the default, out-of-the-box boot confi gurati on .
To boot in this mode, set th e following parameters after you abort the
The DM357 EVM board contains 2 GB of NAND flas h memory. During
the boot process 64 MB of NAND is used. After booting, 2 GB are used
for the file system.
When the EVM board is reset, the ROM bootloader (RBL) executes,
initializing the board and then loading a small program called UBL (User
Bootloader) from NAND flash memory into internal memory for
execution. UBL in turn loads the U-Boot bootloader program from NAND
flash memory. The U-Boot bootloader is responsible for loading and
starting the Linux kernel.
Therefore, there are two bootloader images that need to be stored in the
EVM's NAND flash memory: UBL and U-Boot. This section describes
how to flash UBL and U-Boot in case these images are corrupted or need
to be updated.
If the U-Boot image is i ntact in the EV M flas h memo ry, you can use it to
update itself. If working U-Boot (or UBL) images are not present in flash,
you will need to restore these images using Code Composer Studio
(CCStudio) and an emulator. The subsections that follow explain both of
these procedures.
Updating/Restori ng the Bootloaders
You can find UBL, U-Boot, and t he NAND pr ogram mer pre- bu ilt bina ries
in your DVSDK installation. The location for these is typically the
/home/<useracct>/dvsdk_#_#/PSP_#_#_#_#/bin/dm357 directory.
Alternatively, the source code for the Bootloader components can be
found in the /home/<use ra cct> /dv sd k_#_# /PS P_ #_# _#_ #/bo ar d_u til ities
directory.
For further information about upg radi ng and flashi ng, s ee the TI D aVinci
Technology Developers Wiki at http://wiki.davincidsp.com.
A.5.1Updating U-Boot Using U-Boot
If the U-Boot image is i ntact in the EV M flas h memo ry, you can use it to
update itself by following these steps:
1) After aborting the automatic boot sequence, assign an IP address to
the EVM board using one of these methods:
■If you are on a standalone network or using a network cross
cable to your workstation , you can ass ign a static IP addr ess to
the EVM as follows:
EVM # setenv ipaddr <static IP address>
Addition al Procedur esA-9
Updating/Restoring the Bootloaders
EVM # dhcp
EVM # setenv ipaddr <IP address returned by dhcp>
2) Set the TFTP server IP address:
EVM # setenv serverip <TFTP server IP address>
3) Save these settings to the flash memory:
EVM # saveenv
4) Load U-Boot. To load U-Boot, t he U-Boot ima ge must be c opied to
EVM # tftp 0x80700000 <u-boot file name>
■To assign a dynamic address, use the following:
the TFTP directory (usually /tftpbo ot), and the tftp command must
specify both the image name and the destination address. In this
case, the destination is in DDR memory starting at address
0x80700000, chosen arbitrarily in the DDR space.
NAND Device
Boot device U6
(SAMSUNG K9F1208R0B-JIB0)
Storage Device U67
(MICRON MT29F16G08FAAWC:A)
5) Erase the U-Boot location at the "U-Boot Load Address" shown in the
previous table for your NAND device with a size that is larger than the
"Bytes transferred" value from Step 4.
EVM # nand erase <U-Boot Load Address> 0x20000
6) Flash the new U-Boot from 0x80700000 to the U-Boot Load Address
shown in the previous table for the corresponding NAND device.
7) Power cycle the board or type "reset" to reboot. Verify that the
recently flashed U-Boot is working by inspecting the build date on the
serial terminal console output.
Total
Size
512 MB64 MB x 80x18000
2 GBnot accessible from
Sector
Size
U-Boot Load
Address
U-Boot
A-10
Updating/Restori ng the Bootloaders
A.5.2Updating UBL and U-Boot Bootloaders Using an Emulator and CCStudio
If working U-Boot (or UBL) images are not present in flash, you will need
to restore these images using Code Composer Studio (CCStudio) and an
emulator. Follow these steps:
1) Find the NAND programmer utilities. The NAND Programmer binary
(NANDWriter.out) is in
/home/<useracct>/dvsdk_#_##/PSP_#_#_#_#/bin/dm357.
Alternatively, the source for the NAND program mer utilities can be
extracted from your DVSDK installation at
/home/<useracct>/dvsdk_#_##/PSP_#_#_#_#/board_utilities.
Extract them onto a PC workstation that has CCStudio 3.3 (or higher)
and an XDS560 or XDS510 emulator installed.
2) Configure CCStudio to connect to the DM357 EVM board using
CCStudio Setup and the DM357 GEL files. The .ccs and .gel files are
not included in the PSP package. You can download them from
http://support.spectrumdigital.com/boards/evmdm357.
3) Connect an emulator to the EVM board's JTAG connector and power
up the EVM board.
4) Open CCStudio and connect to the device (Alt+C).
5) Load the program NANDWriter.out and run it (F5).
6) Enter the full UBL path and file name for ubl_DM357_nand.bin in the
dialog box.
7) Enter the full U-Boot path and file name for
u-boot-1.2.0-dm357-na nd.b in in the dialog box.
8) At the next two prompts, enter 0x82080000.
9) Wait until NAND programming is complete.
10) Cycle power on the E VM board and press any key on the EVM's
monitor window to get the U-Boot prompt.
Addition al Procedur esA-11
Restoring the NAND Flash
A.6Restoring the NAND Flash
You can resto re th e c on tents of t he DVS DK NAND flash memory on th e
EVM board via NFS (Section A.6.2) or via RAM Disk and an SD card
(Section A.6.3). These conte nts include the Linux ke rnel and filesyste m
and the demo appl ication software . However, you must first update the
kernel on the NAND flash as described in Section A.6.1.
The DVSDK NAND image is include d on the DVSDK (disk #2) restore
directory (or the http:// www.ti.com/dvevmupdates e xtranet) and is calle d
"dm357_flash_image_#_#_#_#.tar", where #_#_#_# is the version.
A.6.1Updating the Kernel
The Linux kernel (uImage) can be loaded to the NAND flash via TFTP.
This step is required befor e you restore the NAND flash, whether you
plan to do that via NFS (Section A. 6.2 ) or via RAM Dis k and an SD car d
(Section A.6.3).
To load the kernel, the file name of the kernel image that is in the server's
tftp directory (usually /tftpboot) an d the destination address need to be
specified. Execute the following commands to download the kernel
image and write to the NAND partition.
1) Copy the uImage-dm357 file to /tftpboot/uImage to rename the file as
required by the following steps.
2) Assign an IP address to the EVM board using one of these methods:
■If you are on a standalone network or using a network cross
cable to your workstation , you can ass ign a static IP addr ess to
the EVM as follows:
EVM # setenv ipaddr <static IP address>
EVM # setenv serverip <tftp server IP address>
EVM # tftp 0x80700000 uImage
■To assign a dynamic address, use the following commands:
EVM # setenv bootfile uImage
EVM # setenv serverip <tftp server IP address>
EVM # dhcp
3) Download the kernel image and write to the NAND flash as follows:
Once you have loaded the kernel binary to the corresponding NAND
partition as described in Section A.6.1, you can use NFS to populate the
YAFFS2 image (dm357_flash_image_#_#_#_#.tar) to the NAND
partition. The YAFFS2 image should reside on the NFS Server root
directory. Follow these steps:
1) Copy the dm357_flash_image_#_#_#_#.tar file from the DVSDK disk
to the NFS mounted root directory. For example,
/home/<useracct>/workdir/filesys.
2) Set the bootcmd environment variable to boot to kernel and mount to
NFS. (Alternatively use the 'dhcp' command for the EVM IP
Address.)
Note: These variables need not be save d, because N FS is just a
temporary filesystem.
3) Execute the 'boot' command to boot the Linux kernel.
4) Login to the E VM as root and execute the following set of U-Boot
commands to mount t he NAND partition and popul ate the YAFFS2
image:
EVM # mkdir /mnt/nand
EVM # flash_eraseall /dev/mtd0
EVM # mount -t yaffs2 /dev/mtdblock0 /mnt/nand/
EVM # cd /mnt/nand
EVM # tar xf /dm357_flash_image_#_#_#_#.tar
EVM # cd
EVM # umount /mnt/nand
EVM # reboot
5) When the EVM comes up after rebooting from the previous steps,
press Esc to get back to U-Boot prompt. Y ou can now restore the outof-the-box U-Boot environment variables as described in Section
A.4.1.
Addition al Procedur esA-13
Restoring the NAND Flash
A.6.3Restoring the NAND Flash Using RAM Disk and a 2 GB SD Card
This procedure assumes the TFTP setup in Section A.3 has been
performed.
Once you have loaded the kernel binary to the corresponding NAND
partition as described in Section A.6.1, you can load the Ramdisk image
(ramdisk.gz) to the DDR memory via TFTP. The YAFFS2 image resides
on the 2 GB SD car d. An MMC/ SD card read er shoul d be used to copy
the YAFFS2 image on the 2 GB SD card. Follow these steps:
1) Find the RAM disk image at
/home/<useracct>/ dv sd k_ #_#/PSP_#_#/bin and cop y it to the host’s
/tftpboot directory.
2) After aborting the b oot sequenc e, download the RAM disk image to
the RAM as follows:
EVM # tftp 0x82000000 ramdisk.gz
3) Set the following environment variables to boot to Kernel and mount
to the RAM disk.
Note: These variables need not be saved to the NAND flash, as the
RAM disk is just a temporary filesystem.
A-14
4) Plug the 2GB SD Card into the MMC/SD slot on the DM357 EVM.
Note: If the card is not plug ged in when the kernel boots the kernel
will lock-up when the card is hot-plugged later.
5) Execute the following command to boot to Kernel:
EVM # boot
6) Login to the EVM using the root username. Note that "root" does not
have a password.
Restoring the NAND Flash
7) Execute the follo wing co mmands to mo unt the MMC/SD and NAND
partitions and populate the YAFFS2 image:
EVM # mkdir /mnt/mmc
EVM # mkdir /mnt/nand
EVM # mount -t vfat /dev/mmcblk0 /mnt/mmc/
EVM # flash_eraseall /dev/mtd0
EVM # mount -t yaffs2 /dev/mtdblock0 /mnt/nand/
EVM # cd /mnt/nand
EVM # tar xf /mnt/mmc/dm357_flash_image_#_#_#_#.tar
EVM # cd
EVM # umount /mnt/nand
EVM # reboot
The first mount command assum es you have a VFAT partition. The
tar command will take about a minute to run.
The filename of the dm35 7_flash_ima ge_#_#_ #_#.tar image wil l be
in DOS 8.3 format if you are using a vfat filesystem. That is,
dm357_fl.tar.
8) When the EVM comes up after rebooting from the previous steps,
press Esc to get back to U-Boot prompt. Y ou can now restore the outof-the-box U-Boot environment variables as described in Section
A.4.1.
DVEVM software 4-7
hardware 2-2
Linux software 4-6
IR remote 1-2, 3-4
resetting code 3-4
K
kit contents 1-2
L
Linux 4-4
installing 4-6
kernel 4-13
versions supported 4-6
Linux Support Package 4-13
M
make utility, version 4-15
MontaVista Linux
demo version 4-3
full version 4-3
MPEG4 video 3-8, 3-9
multimedia peripherals 1-3
N
NAND flash A-9
boot configuration A-6, A-7
restoring A-12
NAND programmer utilities A-11
NFS server 4-8
boot configuration A-7, A-8
testing 4-10
NTSC video 2-3
O
OSD show and hide 3-6
OSD toggle 3-6
P
PAL video 2-3
PATH environment variable 4-12
Pause button 3-6
peripherals 1-3, 2-2
Play button 3-5
ports 2-5
Power button 3-6
power cable 2-5
power jack 2-5
power suppl y 1-2
power switch 2-5
prompts 4-3
Q
quit demo 3-6
R
RCA connectors 2-4
rebuilding
DVEVM software 4-14
Linux kernel 4-13
Record button 3-5
Red Hat Enterprise Linux4-6
remote control 1-2, 3-4