Table of Contents

Introduction to Embedded Systems

Basic Concepts

This course explores embedded system development on the BF533 STAMP. The STAMP as used in this course has uClinux as its resident operating system (OS). This is a stripped down Linux appropriate for embedded systems. Our particular version is for the Analog Devices ADSP-BF533 Blackfin.

The course is intended for those who are familiar with the C programming language, the Linux OS, and who have interest in learning about embedded systems development. The course is less appropriate for embedded systems gurus; although, the early portion of the course can serve to introduce the STAMP/uClinux target.

The course is organized as a hands on experience and the participants will:

Overview of the Development Environment

The development environment consists of these elements

Let's look at each of these elements, in turn, starting with the target. The target hardware for this course is the STAMP, a processor board with various resources. For our discussion at this point, we just mention a few:

The second element of the development environment is the workstation. It is essentially a linux box which should have

This is, then, a rather typical Linux box. The CD ROM capability is needed to access the files which come on a CD shipped with the STAMP board. This contains the development tools, called tool chains. Note that it will be typical (but not necessary) that the workstation has an Intel derived CPU. In our case the target will be the Analog Devices Blackfin ADSP BF533 Processor, definitely not Intel. Hence, the toolchains comprise a cross compilation tool set. It is of particular interest that the target OS is Linux, as is that of the development workstation, despite the different CPU's. Of course, the target OS is a very stripped down Linux. The virtue of the open source nature of Linux is apparent - it can be modified appropriately for its host. The third and last element of the development environment is the interconnection between the workstation and the target. There are potentially two such connections:

Let's consider the serial connection. The workstation, running a terminal emulator (we later assume minicom), becomes the target's terminal. When power is applied (or the STAMP reset button pressed) the STAMP boots into the 'Bootloader', essentially a system monitor with a set of commands to which it will respond. Among these commands, available before booting into uClinux, are:

At the completion of the boot/initialization of uClinux it presents a login prompt. In summary, the workstation can issue commands to the Bootloader and, once uClinux boots, the workstation becomes the Linux terminal. During or subsequent to the uClinux boot, the Ethernet capability is brought up. The appropriate work area on the workstation can be mounted via nfs, integrating that work area with the uClinux file hierarchy.

Quick Start

Upon getting a system, many of us want to get it up and running immediately, despite not understanding all the relevant details. That is the purpose of this section. Here we intend to configure and deploy the three elements of our development system. Recall that these elements are

We'll discuss these elements throughout this chapter and end up with a development environment that is ready for productive work. Note that there are relevant, useful (somewhat interrelated) web sites supporting this setup:

Connecting the Hardware

1. Connect the serial port to your host computer from the STAMP board.

2. Connect the Ethernet cable to your local network from the STAMP board.

3. Start a terminal emulation program (Minicom or HyperTerminal) on your host computer. From the configuration menu set the serial port connection for:

4. Connect the DC power input and power up the board.

5. After the STAMP board powers up you should see a U-Boot start-up screen on your terminal window. At this stage if you allow the boot timer to count down the board will load the uClinux kernel out of flash and boot the kernel and you will be brought to the command shell.

Troubleshooting: If you don't see any text on the screen make sure that you have properly connected power to the board (the power LED should be on) and make sure a correct straight through serial cable is being used. If the screen text is corrupted, check the serial port connection baud rate settings.

Installing the GNU/Linux Toolchain

1. Install the binutils and GCC tools on your machine (as root):

bash# rpm -ivh bfin-elf-3.4-beta.i386.rpm

2. In user mode export the path for the tools

bash> export PATH=/opt/uClinux/bfin/bin:$PATH

There are multiple versions of the toolchain available on A more recent toolchain is located under the Experimental section, however this toolchain may not be sufficiently tested and bugs could exist.

The toolchain can also be compiled from source by executing the build script that is located in the scripts directory. Extract all of the files to a local directory as well as the build script and modify the script to point to your directory structure. After the script has executed, export the path to point to your new tool chain output directory.

Installing the uCinux Kernel

  1. Copy the kernel source to your work directory
  2. Uncompress the kernel:
bunzip2 uClinux-dist.tar.bz2
tar -xvf uClinux-dist.tar

Now that the kernel is uncompressed in the work directory you are now ready to start building your own uClinux kernel for the Blackfin processor.