EE 472 Make tutorial

Introduction to the Lab Environment

University of Washington - Department of Electrical Engineering

Blake Hannaford, Brad Emerson, Greg Lee, Jered Aasheim, Tom Cornelius, James K. Peckol, Shwetak Patel

Introduction:

This tutorial has two main purposes. The first is to introduce the Make platform. The second is to introduce the Eclipse integrated C / Assembler development environment. You will learn how create a C project in Eclipse and load it to the Make.

The version of the processor on the Make Controller is the Atmel AT91SAM7X256. Some other features include:

  • Memory
  • 32 KB SRAM
  • 256 KB Flash memory
  • Memory Controller s
  • SDRAM
  • SRAM
  • Error Corrected Code Controller
  • Interrupt Controller and programmable number of external interrupt inputs
  • I/O Communication
  • Three Parallel Input / Output (PIO) Controllers
  • 2 USART serial ports
  • SPI and CAN interfaces
  • USB port
  • Ethernet interface
  • JTAG Boundary Scan interface
  • Debug Support
  • Internal Peripherals
  • 3 16-bit timers
  • 4 Channel PWM Controller
  • 8 Channels 10-bit A/D
  • Real-time Timer
  • 8 Digital outputs – 4 with high current drive
  • 8 Digital inputs

In this class, we will use many of these hardware features as we design and develop the various laboratory projects; the details regarding each of the components will be given as needed.

To program the Make Controller target platform, a host PC is required. Using the Eclipse C Development Environment, code can be developed on a standard PC and then downloaded into the target platform over a USB serial connection.

Working with the Development Environment and Target Platform

We’re now ready to work with the Eclipse IDE and the Make (ARM 7) Application Board.

First Steps

Our first step is to install the tools that we’ll need and some sample software onto the machine on which we are working. You can go directly to the Make website then Firmware 1.5.1 source codeor you can get the source from the class webpage (lab1 link).

Once you have the package downloaded, unzip it and extract all of the files to your machine. You are strongly encouraged to create a ee472 folder in hour H: drive and copy firmware-v1.5.1 to there. My folder is at H:\ee472_ta_spr2009\firmware-v1.5.1

Configuring the Project

We now begin by opening Eclipse and setting our current workspace. You can open the “Workspace Launcher” window from File|Switch Workspace|Other if it didn’t popup automatically. Using the H: drive is highly recommended. I like the path shown in Figure 4.

Note: The directory names along the workspacepathname cannot contain any spaces

Select

  • OK

The first splash screen appears.

Select

  • Workbench


Select

  • File → New → C Project

Select

  • Makefile project
  • WinARM Yagarto

Give your project a name

We’ll use: test

Note: The project name cannot contain any spaces – this is why there are no spaces in the name that we have chosen. See we learned earlier when we had a directory and file name with spaces in them. It didn’t work. The compiler couldn’t find anything. This is where the frustration in software development comes in.


Select

  • Finish


Your environment should now appear as in figure 8, but you should only see “test” under Project Explorer

Next, the application needs the source code and tools to build our application. Normally, we would write these ourselves. However, for this application, we are working with existing code. Thus, we must import them into our project. You will need the files in test_files.zip. Download it and unzipped to your computer.

Select

  • test

Using the right mouse button to open the selector menu

Select

  • Import


On the menu that pops up

Select

  • General → File System


Select

  • Next

In the window that pops up, browse to the directory where you stored the foldertest_files

Select the file test_files and select

  • Open

Select the checkbox next to test_files. This will, in turn, select all of the files in the right hand window.

Select

  • Finish

Open the directory structure under the heading test and your display should look something like that in figure 12.


Select main.c and double click to open the file in the display window.


Go to the Project menu and select Build All or simply type ctrl + B. Like we did on the PC, this will compile your program. There should be no errors and your display should look like…

You have just built your first ARM 7 application – Wahoo – that should go on your resume . Now, we need to download and run it….and impress the snot out of ourselves and also look good on your resume.

Downloading to the Target

You will need Mchelper to load your build to the Make board. First you need to connect the Make board to your computer.

Make certain that your Make board is connected to your PC through one of the USB ports.

  • Turn power ON to the board. If the computer tell you to install the drivers for the controller, do it.
  • Reset the board – that’s the red button on the system.
  • Cycle power on the board – don’t even think it. I didn’t make up these rules. I’m just following them.

Now you can open McHelper from EE programs|MakingThings, and it should look something like this...in fact, it had better look exactly like this.

The McHelper display should now appear something like:


Browse to ……\firmware-v1.5.1\projects\test\output directory.

Select

  • tiny.bin
  • Highlight Samba Board
  • Select upload

Your display on McHelper should look like…


…as the file tiny.bin is being downloaded to your ARM 7.

It should start executing automatically.

Now hook up the TX pin to an oscilloscope. You should see a square wave.

What is the period of the wave?

See what happen when you connect this wave signal to the pins of the Accessories board.

Accessories board pins:

1-Green LED

2-Yellow LED

3-Red LED

4-speaker (some speaker on these boards are pretty weak)

5-pulse output from motor circuit

6-PWM input to motor (let me know if your motor doesn’t turn)

7 and 8- not used

Your just successfully completed your first ARM 7 project.

1