Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Phission in VisualDSP++ 4.5 (Blackfin Handyboard)

This tutorial is unfinished!!!!

Table of Contents

Building Phission in VisualDSP++ 4.5

This explains how to build the VisualDSP++ 4.5 project files that are included in the Phission source distribution. The project files were developed for the BF537 EZ-Kit with an OmniVision 7620 camera module. Changes to support other systems should not be very difficult. The target system for this port is the Blackfin Handyboard set to be released in 2007.

  1. Check out the Phission source code from CVS:
    
            $ cvs -d :pserver:anonymous@phission.cvs.sourceforge.net:/cvsroot/phission login 
            $ cvs -z3 -d :pserver:anonymous@phission.cvs.sourceforge.net:/cvsroot/phission checkout phission
            
    You don't have to use a command line application for CVS. There is a WinCVS application available for Windows, Mac and Linux systems.
  2. Grab a copy of the libjpeg source code from the International JPEG Group in their files directory.
  3. Unpackage the jpegsrc.v6b.tar.gz tarball in the projects/libjpeg directory:
    
            $ tar -xvzf jpegsrc.v6b.tar.gz
            
    The libjpeg source code should reside in the jpeg-6b sub-directory.
  4. Open the project group file projects/VDK/PhissionProjects.dpg
  5. If presented with a "Can't find file" dialog, just press Cancel if it is one of the .dlb files. Otherwise, make a not of the file and email me so I can see what went wrong.
  6. IMPORTANT!! Generate the include/ directories with the GenerateHeaders.js script. This step is very important since the Phission library depends on the libjpeg header files and any project that uses Phission in VDSP++ relies on the Phission header files.
    1. Set the libjpeg project as the Active Project by right-clicking on the project tree-list entry.
    2. Select the Console tab at the bottom of the VDSP++ IDE
    3. Right-click in the Console area and set the Language as JScript. If this setting isn't selected then the following message will likely appear: Error: Script lang is not set to JScript
    4. Open the GenerateHeaders.js file from the scripts folder in the phission project by double clicking on it.
    5. Right-click in the GenerateHeaders.js editor window and select Load Script.
    6. The include/ directory in projects/VDK/libjpeg/ should have been created and all relevant header files copied there.
    7. Repeat these steps for the phission project entry starting with setting the phission project as the Active Project and executing Load Script on GenerateHeaders.js. It <u>isn't</u> necessary to do this for projects that use the libraries, only for the libraries themselves.
  7. Set the PhissionTests project as the Active Project
  8. Build Project by pressing F7 or right-clicking on the project entry in the list and selecting Build Project. This should build the libjpeg project first and then the phission project next. The .dlb library files will be installed in their respective locations within those projects. Depending on the Configuration chosen for the PhissionTests project (Release or Debug), the libjpeg and phission projects will also be built in the same Configuration.

  1. If all goes well, thge project should build and load onto the BF537 EZ-Kit and be ready to run

Software System Outline

Setting up the Network with a Wireless Game Adapter for the EZ-Kit

The purpose of Phission is to be a vision processing sub-system on mobile robots. The EZ-Kit can be used on a mobile robot but the ultimate platform is the new Blackfin Handyboard. The Blackfin Handyboard system doesn't look like it will support a native LCD/Analog graphics display. However, a 10/100Mbps ethernet provides very fast network support. The network can be used to monitor the video output ( or any output ) and a wireless gaming adapter is absolutely necessary.

The network setup used can vary depending on personal preference. I've used both a wireless ad-hoc and infrastructure network for accessing the EZ-Kit through a wireless gaming adapter. The ad-hoc mode offers the best portability because the wireless gaming adapter doesn't have to be reset for each access point in the various development environments. Ad-hoc allows the settings to remain static whether development is done at home, the lab or on-site at a competition.

I chose the DLINK Air Plus XtremeG (DWL-G820) for it's small size and 5V/0.5A power input. It should be noted that the DWL-G820 gets pretty hot. However, 0.5A isn't that much as compared to many of the other options out there. The common 7850 voltage regulator outputs 5V with up to 1 amp of current and could be used to power the wireless adapter. There are regulators that output 12V, which is common for many other wireless gaming adaptors. It came down mostly to the very small size of the DWL-G820.

The USB wireless adapter I use was just a simple no nonsense wireless 802.11g adapter from Hawking Technologies: HWU54G: Mini Wireless-G USB Adapter They also offer a high gain USB adapter (HWU54DM), which I will likely buy for use with a mobile robot that uses the EZ-Kit. As it is now, the EZ-Kit is right next to the development desktop and distance isn't an issue.

To simplify the network setup, DHCP is a prefered option. This way network IPs don't need to be explicitly maintained. However, a wireless access point is usually needed for serving out IP addresses unless you configure your own DHCP server. Since the Windows is the platform being used for VisualDSP++ development, a free DHCP server is provided by Tftp32d. There might be other DHCP servers available but tftpd32 was quick to find, appears very well developed and doesn't require any installation as it is a standalone application. It uses the Windows Registry to save settings for the network. It also binds to a particular network interface. This makes it easy to restrict the DHCP responses to the USB wireless adapter (HWU54G) ad-hoc network.

tftpd32 Settings

Gaming Adapter Network Settings

Connect the desktop to the gaming adapter with a regular ethernet cable as per the instructions that came with it to configure the device.
  1. Go to the Advanced tab under Mode
  2. Go to the Home tab under Wireless

USB Wireless Network Settings

For this setup I use the Windows configuration manager for maintaining the wireless adapter.

EZ-Kit Network Settings

  1. Make sure you have the TCP/IP Plugin enabled for the VisualDSP++ environment: Settings > Preferences... > Plugins > TCP/IP Configuration Manager
  2. Open the TCP/IP Configuration manager under the Settings menu option
    1. General: Enable TCP, UDP, ICMP, and DHCP
    2. Network0
      • Use DHCP
      • MAC Address: 0005F7123456
        You could also use 0005F7654321 or anything with the 0005F7 prefix. It is the prefix associated with Analog Devices MAC address allocation and makes sense to use for one's own personal ad-hoc network. You could use any variation of 12 hex digits but it may not be accepted by all Wireless Access Points when you're using an infrastructure wireless setup.

Using phNetSourceTest to view images

TODO. This section shows how to use the phNetSourceTest to view images being served from the NetDisplay image server running on the EZ-Kit.

Using Phission in VisualDSP++ (for your own project)

TODO. This section details how to use Phission in a new project. Starting from the PhissionProjects project group this takes you through the steps necessary to add a new project to the group that uses Phission.

Converting a project from Linux/Windows to VDSP++

TODO. This section takes you through the steps to convert a project written for Linux or Cygwin/Windows to a VisualDSP++ project to run on the Blackfin EZ-Kit.

Todo list

There are many things left to do for the Phission VisualDSP++ BF537 EZ-Kit project.

  1. Integrating the OV7620 code into the Phission library code base
    1. The driver configuration options aren't totally finished, such as setting the contrast, brightness, saturation, YUV or RGB format output, etc
    2. Fix the few known bugs
      • network image server thread disconnect problem
      • uncompressed RGB doesn't work problem
    3. Clean up, document and compare against their OV7x48 driver code (in Blackfin/lib/src/drivers/)
  2. Writing and completing tutorials
    1. Using phNetSourceTest to monitor the NetDisplay output from the EZ-Kit
    2. "Using Phission in VisualDSP++"
      • might need to buy some of the DLINK Game adapters for the other EZ-Kits because it makes things so much easier than having a wire.
      • Demonstrating how to histogram and track blobs
      • Creating a new project that uses Phission in VisualDSP++
    3. Need pictures!!
  3. Optimizing - Theres a ton of optimizing I can do to the code
    1. Add both YUV422 and RGB422 color space format and conversions functions so the conversions can be done in the pipeline or in the phOmniVisionSource class
    2. Mem-DMA copying - not necessary but still cool and fun to talk about
    3. Remove floating point operations and replace with fixed point
  4. Write a display class that uses the Analog encoder chips on the A/V-Extender




Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:45:25 2007 for phission by  doxygen 1.4.4