No renderer 'pdf' found for mode 'pdf'
world leader in high performance signal processing
Trace: » introduction_to_embedded_systems

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:

  • learn how to set up and configure the system
  • learn what resources are available
  • learn to use a selection of the available resources

Overview of the Development Environment

The development environment consists of these elements

  • the target hardware and its resident software
  • the development workstation
  • the interconnection between these two machines

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:

  • an Ethernet controller (with RJ45 Ethernet jack (female))
  • a serial port (with DB9 serial connector (female))
  • a resident OS, uClinux
  • a power jack and on board voltage regulator (7V-20V DC input)

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

  • an available serial port
  • terminal emulator software (minicom is included in most Linux distributions)
  • an Ethernet card
  • a CD ROM reader

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:

  • the RS232 serial connection
  • the 10 Mbps Ethernet connection

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:

  • a command to upload a new uClinux image from the workstation to the target's RAM
  • a command to write the RAM image into FLASH ROM
  • a command to boot the uClinux image in the FLASH ROM
  • an alternative command to boot an image in RAM

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

  • the Linux workstation
  • the STAMP target
  • the interconnection of those machines -RS232 serial, Ethernet

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:

  • 57600 baud
  • 8 data bits
  • parity none
  • 1 stop bit
  • h/w flow control off

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 blackfin.uclinux.org. 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.

Complete Table of Contents/Topics