Electronic Design

EiED Online>> The Penguin Rides A Blackfin

Analog Device's Blackfin digital signal controller (DSC) is a great general-purpose, 32-bit microcontroller that also handles digital-signal applications. In addition, it's a popular platform for hosting uClinux. I got to play with uClinux on the Blackfin using Analog Device's open source STAMP board that is available as part of their development kit (Fig. 1). It turns out to be a very nice platform for general Blackfin development but there is still room for improvement.

The STAMP board (Fig. 2)design is by the hardware designers at http://www. blackfin.uclinux.org. The CD that comes with the kit includes a complete bill of materials, documentation and schematics. It is a handy starting point for custom designs. All aspects of the package are open source including the Uboot boot program to the board itself.

Linux 2.6 finally merged the uClinux support into the main Linux kernel tree. This makes moving forward easier. Prior versions of the uClinux kernel are also included. The documentation covers everything, but the more detailed descriptions are for version 2.6. The development platform is typically Linux or Windows. A version of Cygwin is provided with a Windows installation program so the initial setup was quick and easy. It can also install AnyEdit, an open source editor, and TFTPd32, a Trivial FTP server used to download kernel images and applications. Binary images of tools and the kernel are included so you can get started quickly but you may need to rebuild the kernel if you want features like NFS or Samba support to access files over the network.

Rebuilding the Kernel
The kernel build process is not as flashy as with some commercial platforms, but it is simple enough for most developers to contend with. On Windows, it is a combination of a graphical front end, a text-mode front end, and some command line interaction. The documentation does a decent job stepping you through the process. It is possible to initiate the build process from the Eclipse integrated development environment (IDE) as noted in the documentation, but it takes some work to configure and it still uses the same front end without Eclipse support. I added NFS support so I could create applications on the PC and have them immediately available to the Blackfin.

While the process takes awhile, you can crank out a couple iterations in an afternoon if necessary. There is plenty of memory on the Stamp board, so it is usually easier to include everything you need instead of building multiple versions of uClinux.

Downloading the kernel is a matter of setting up a TFTP server and interacting with the Uboot serial interface using a terminal program. I used my favorite Windows app, but any terminal application will do. The downloading is done over the Ethernet link and the settings can be saved in flash. DHCP and BOOTP support is also available, although I found just setting up a fixed IP configuration worked well for me. Downloading and flashing a kernel image takes a few minutes.

Application development can proceed once the kernel is in place. At this point, the process is not much different than developing Linux applications in general. It is simply a matter of accessing the appropriate interfaces on the Blackfin, such as the ADC plug-in module. There is a JTAG port on the board, but I didn't find it necessary to use for most test applications. Though JTAG is definitely handy when working on device drivers.

Debugging via gdb is the usual diagnostic tool. A network interface makes this connection trivial and it is possible to use Eclipse for debugging. Likewise, it is possible to get Eclipse up and running with the GNU toolset. However, the process is not automatic. This is one reason why many prefer to use the command line and tools like AnyEdit. Still, better integration with Eclipse via the setup program would be useful.

More Plug-Ins To Come
The Blackfin uClinux website is the best source for the latest software, including drivers for peripherals. Analog Devices is packaging additional hardware plug-ins with demonstration applications, such as ones for audio and video processing. This will tend to cut down on the low-level customization needed to get hardware working.

Overall, my experience with the Blackfin Stamp package was extremely positive. It has some rough edges-like the mix of kernel configuration interfaces-but it is definitely easier to use than a text editor on the configuration files I normally have to contend with. There is plenty of expansion room on the board with 128 Mbytes of RAM and 4 Mbytes of flash.

I did find some very useful documents while digging around on the CD and online. There was an alpha version of a course built around uClinux and the Stamp that new developers and college professors should check out. It is also a good overview of the package, including detailed coverage of Uboot. The main items that were missing are in the Application Development chapter. However, the title headings indicate some very useful examples, such as Networked Digital Picture Frame and FFT Project. Some of these are likely to be part of the plug-ins that Analog Devices will be supplying and there is already code and documentation on the Blackfin uClinux site addressing some of these applications.

Developers will need to determine the stability of the components they want to use from the website as things are regularly changing. Some areas, such as uClinux support in general, are well established while other areas are only in alpha and beta stages.

Anyone doing Blackfin designs will find this package to be a bargain. The success of the Blackfin uClinux implementation is the result of a cooperative effort between major companies and individuals. It will only get better over time.

Related Links
Analog Devices
www.analog.com

Cygwin
www.cygwin.com

Eclipse
www.eclipse.org

Linux Blackfin
www.blackfin.uclinux.org

uClinux
www.uclinux.org

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish