DM365 Leopard SDK Old 2011Q2 Getting Started Guide

This guide includes instructions and tips users should follow to get their DM365 Leopard Board to work with the RR Evaluation SDK.
For this guide different commands need to be executed on the host machine and the target. Commands to be run on the Ubuntu host have a yellow background. Commands to be run on the Ubuntu target have an aqua background.

Installation

Getting the RR LeopardBoard DM365 EVAL SDK 2011Q2

If you want to get the LeopardBoard DM365 EVAL SDK 2011Q2 you need to go to our download center page and select the LeopardBoard DM365 Evaluation SDK. You will be asked for your email address and some information. Once you have submitted the required information you will receive an email with the following information:

A link to download the LeopardBoard DM365 SDK 2011Q2 Installer file for GNU/Linux based operative systems.

A username and password to download the installer.

A link to the installation instructions.

CodeSourcery Toolchain Installation

New DM365 SDK 2011Q2 uses the Codesourcery toolchain for cross compilation. You need to download and install the toolchain before you can build the SDK.

DVSDK 4 Installation

In addition to the toolchain, it is necessary to install the TI's Digital Video Software Development Kit (DVSDK) package before installing the SDK. The DM365 SDK 2011Q2 uses the new DVSDK 4. The download and installation instructions are detailed below:

Once you have executed it you can follow the next steps for its installation.

1. Click Yes in the start up window.

Figure 2. Installer's start up window.

2. Click Next in the main window.

Figure 3. Installer's main window.

3. Accept the license terms in order to use the EVAL SDK and click Next to continue.

Figure 4. Installer's License Agreement window.

4. Choose the destination directory to where the EVAL SDK will be installed. Note: The installation directory must be a folder that doesn't exist since the installer will create it in the process.

Figure 5. Installer's destination directory window.

5. Once you have selected the installation directory a confirmation window will be displayed. Click Next to start the installation or Back to change any data. Note: Be sure to have an Internet connection before click Next since the installer needs to download some packages

Figure 6. Installer's confirmation window.

6. Wait while the EVAL SDK is installed in your computer.

Figure 7. Installer's installation progress window.

7. Once the EVAL SDK has been successfully installed the next window will be displayed. Click Finish to close the installer and start using the EVAL SDK.

Figure 8. Installer's installation complete window.

I put all my development directories in the work directory in my home folder. You can have more than one development directory installed, just remember to have the DEVDIR shell variable set properly.

Build SDK

Several packages are needed in order to compile the SDK. The SDK build process will let you know what packages are needed. While compiling you will be prompted to install them using sudo apt-get <packages>.

Configure the features you want to have in your board using:

make config

Set the PATH to include the toolchain and aslo set the DEVDIR shell variable

$(make env) # this is the same as using grave accents to execute the output from the command - `make env`

Compile the SDK:

make

Install bootloader, kernel, and target file system on LeopardBoard 365

Verify bootloader is active

First a minicom (or any other terminal emulator used) session must be opened in order to stop
the booting process at the bootloader prompt:

minicom

Reboot the board and stop the autoboot when

Hit any key to stop autoboot: ...

is displayed. Then close your minicom session.

Save bootloader to target hardware

The next step is to install the bootloader on the target. Typically you only install the SDK bootloader once.

Update target hardware with new images

Similar to the bootloader installation, to install the devdir on the target the booting process should be stopped at the bootloader prompt.

Updating your SDK

Since the SDK is in a SVN respository RidgeRun can periodically make updates to the contents. To have an up-to-date SDK the following command
must be executed on the SDK root directory

make update

If, for any reason, modifications to any files that are included in a patch were made, the make update process won't be able to finish successfully.
In order to override this the following command must be executed

make update FORCE_UP=1

Note that all changes previously made to these files will be lost.

Also, a debug functionality is implemented where all the executed commands will be displayed on the standard error (usually the same as standard output).
To activate it use

make update DEBUG_UP=1

Of course, a combination of both options can be used

make update FORCE_UP=1 DEBUG_UP=1

A brief help menu explaining these features can be displayed using

make help

For SDK 2011Q2 and later versions it has been added a new target called make show_updates which will shows a list of all available updates with its detailed description.

SDK Hints

SD boot recover

If you brick your board, this can be recovered from an SD card. In order to make a bootable SD card you first need to have a successfully compiled SDK.

SD card preparation

1. Insert the SD card to the host port

2. Find out the device mounting point (e.g. /dev/sdd)

3. On your devdir root directory type:

make sd_boot_recover device=/dev/sdX

where sdX is your device mounting point.

Install Boot recovery files on SD card

1. Remove SD card from host and reinsert the SD card into host. This will cause your host to mount the VFAT file system on the SD card.

2. Type

make install sd_boot_recover

Boot from SD to recover NAND image

1. Set switch 2 of DIPSW1 to ON, 1 and 3 to OFF. This is SD card boot mode.

When you use the SDK to set your video output and resolution, the SDK build process creates $DEVDIR/images/cmdline with different kernel command line parameter settings. The table below shows the various video output settings for three of the common settings

Video Output

DVI

Component

Composite

sysfs file

Resolution

720P-60

720P-60

NTSC

davinci_enc_mngr.ch0_output

DVI

COMPOSITE

COMPONENT

/sys/class/davinci_display/ch0/output

davinci_enc_mngr.ch0_mode

720P-60

720P-60

NTSC

/sys/class/davinci_display/ch0/mode

davinci_display.cont2_bufsize

6291456

6291456

3145728

vpfe_capture.cont_bufoffset

6291456

6291456

3145728

vpfe_capture.cont_bufsize

6291456

6291456

6291456

Activation of video capture modules

While configuring the SDK go to Kernel configuration->Device drivers->Multimedia support->Video capture adapters and activate the devices you desire.

Before running a capture pipeline you must be sure you have chained the video previewer, that could be done in two ways:

Currently the v4l2src element has a build in property called chain-ipipe which by default is set to true.

If you are not using v4l2src or you have disabled its chain-ipipe property you can chain it by using the ipiped application.

Video initialization

When you boot your board the RidgeRun logo will be displayed, in order to display video the following commands must be executed:

fbset -disable

Output volume modification

To increase/decrease the volume for audio playback (or other audio options) type

alsamixer

and modify as desired.

Using ipiped and AEW library

Ipiped is a D-Bus server for controlling and configuring the camera sensor, the dm365 video processor and the aew library. It usually works together with the auto white balance and auto exposure (aew) library in order to give a better control of the quality of the image captured.

You can find a Demo version of the AEW library in our EVAL SDK for DM365 2011Q2. This version is fully functional but has some demo features:

The library will darken you current image periodically.

After a while the AEW algorithm will stop working and you will get the capture with the last values configured by it, so you will need to restart your AEW algorithm in order to test it again.

A file named: test8003.mpeg will be created, no video will be displayed in the composite output.

Using GStreamer with the LeopardBoard DM365 EVAL SDK 2011Q2

You can combine the SDK and the LeopardBoard DM365 with the GStreamer's API in order to get powerful multimedia applications in an easy and faster way. Some examples of use of GStreamer to implement basic multimedia pipelines can be found at LeopardBoard 365 GStreamer Pipelines - SDK 2011Q2.

You need to install the toolchain, follow the instructions Install here.

Unable to find the dvsdk

Error:

echo "Unable to find the file $DVSDK_DIR/Rules.make. Aborting" ; exit 1 ; \
fi \
fi
You need to install dvsdk_3_10_00_19 provided by Texas Instruments
You can abort now and install the dvsdk_3_10_00_19 binary package on the default path
at /home/work/dvsdk/dvsdk_3_10_00_19, so it will be automatically detected next time you try to build.
Otherwise you can enter the location where you installed the package below.
Please provide the path to dvsdk_3_10_00_19 installation location or press ctrl-c to abort