This tutorial is unfinished!!!!
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.
- Check out the Phission source code from CVS:
You don't have to use a command line application for CVS. There is a WinCVS application available for Windows, Mac and Linux systems.
$ cvs -d :pserver:firstname.lastname@example.org:/cvsroot/phission login
$ cvs -z3 -d :pserver:email@example.com:/cvsroot/phission checkout phission
- Grab a copy of the libjpeg source code from the International JPEG Group in their files directory.
- Unpackage the jpegsrc.v6b.tar.gz tarball in the projects/libjpeg directory:
The libjpeg source code should reside in the jpeg-6b sub-directory.
$ tar -xvzf jpegsrc.v6b.tar.gz
- Open the project group file projects/VDK/PhissionProjects.dpg
- 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.
- 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.
- Set the libjpeg project as the Active Project by right-clicking on the project tree-list entry.
- Select the Console tab at the bottom of the VDSP++ IDE
- 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
- Open the GenerateHeaders.js file from the scripts folder in the phission project by double clicking on it.
- Right-click in the GenerateHeaders.js editor window and select Load Script.
- The include/ directory in projects/VDK/libjpeg/ should have been created and all relevant header files copied there.
- 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.
- Set the PhissionTests project as the Active Project
- 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.
- If all goes well, thge project should build and load onto the BF537 EZ-Kit and be ready to run
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.
- libjpeg project
- phission project
- PhissionTests project
- LwIP Thread
The PhissionBootThread is started by the VDK as an initial thread running in the system along with the Idle thread and the LwIP thread. This boot thread settings are configured through the Kernel tab.
This tests the blobbing code using images that are in the "TestImageOne/Two.h" header files.
This is the main function code for testing the phOmniVisionSource capture class.
This tests that the reader/writer implementation for the VDK works as expected.
This tests that phThread implementation for the VDK works as expected.
These are the source files that use the Analog Devices System Service Library and Device Driver model to access and configure the OmniVision 7620 camera module. It uses TWI and PPI and is based of one of the OmniVision drivers available in VisualDSP++ 4.5 under drivers/sensors.
These are the sources for the capture class that accesses the OV7620 using the SSL and Device Drivers. Acquisition is done through the PPI port on the Blackfin.
- libjpeg.dlb and libphission.dlb
These are output from the Phission and libjpeg projects that are part of the PhissionProjects project group.
This is a program that tests the phNetSource class. This also serves as an example for using the phNetSource. The phNetSource class is used to connect to the NetDisplay image server. The simplest way of viewing images from the EZ-Kit is using the network once it's configured. Although the AV-Extender offers video output this program is used to connect to the EZ-Kit over the network to view images
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.
Connect the desktop to the gaming adapter with a regular ethernet cable as per the instructions that came with it to configure the device.
- Disabled all the other servers/clients found in the Settings dialog
- Disable TFTP Server
- Disable TFTP Client
- Disable Syslog Server
- Set the network IP settings in the main dialog window for the DHCP Server, assuming the interface of the wireless USB is 192.168.0.1
- IP pool starting address: 192.168.0.2
- Size of pool: 3
- WINS/DNS Server: 192.168.0.1
- Default Router: 192.168.0.1
- Mask: 255.255.255.0
- Click the Save button next to those settings to apply the network fields
For this setup I use the Windows configuration manager for maintaining the wireless adapter.
- Go to the Advanced tab under Mode
- Set ad-hoc mode
- SSID: WLAN_ADHOC (or anything of your choosing)
- Click Apply
- In the Advanced > Encryption section, make sure Open System is selected
- Go to the Home tab under Wireless
- SSID: WLAN_ADHOC (or something the same as above)
- Click on Apply
- In the Home > LAN section, select "Get IP From: " to be Dynamic (DHCP) from the drop down list
- Click on Apply
When you have tftpd32 running, when the gaming router has rebooted it may or may not acquire it's own IP address. If it doesn't do this right away, it should absolutely do it when the EZ-Kit tries to acquire it's own IP address using DHCP. You can watch tftpd32's DHCP Server section for when a new address is given out.
- Set the adapter into ad-hoc mode through the Network Connections.
- Right-click on the USB wireless adapter
- Select the Properties option in the context menu
- Select the Wireless Networks tab
- Open the Advanced dialog by pressing the Advanced button
- Choose the "Computer-to-Computer" option for ad-hoc networks
- Close the Advacned dialog
- Add... a network
- SSID: WLAN_ADHOC (or anything of your choosing that matches the Gaming Adapter's SSID)
- Open System
- WEP Disabled (security settings are left to the user)
- "Connect to network when available"
- Press the OK button to finish adding the network
TODO. This section shows how to use the phNetSourceTest to view images being served from the NetDisplay image server running on the EZ-Kit.
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.
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.
There are many things left to do for the Phission VisualDSP++ BF537 EZ-Kit project.
- Make sure you have the TCP/IP Plugin enabled for the VisualDSP++ environment: Settings > Preferences... > Plugins > TCP/IP Configuration Manager
- Open the TCP/IP Configuration manager under the Settings menu option
- General: Enable TCP, UDP, ICMP, and DHCP
- 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.
- Integrating the OV7620 code into the Phission library code base
- The driver configuration options aren't totally finished, such as setting the contrast, brightness, saturation, YUV or RGB format output, etc
- Fix the few known bugs
- network image server thread disconnect problem
- uncompressed RGB doesn't work problem
- Clean up, document and compare against their OV7x48 driver code (in Blackfin/lib/src/drivers/)
- Writing and completing tutorials
- Using phNetSourceTest to monitor the NetDisplay output from the EZ-Kit
- "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++
- Need pictures!!
- Optimizing - Theres a ton of optimizing I can do to the code
- 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
- Mem-DMA copying - not necessary but still cool and fun to talk about
- Remove floating point operations and replace with fixed point
- Write a display class that uses the Analog encoder chips on the A/V-Extender
Generated on Sat Jun 16 02:45:25 2007 for phission by