CSE 466 Lab 5: Introduction to FriendlyARM and Qtopia Linux

Introduction

Now that you've worked with a simple 8-bit microcontroller, we'll be exploring more powerful embedded devices. For the rest of the quarter, we'll be using the FriendlyARM board, which uses a 400 MHz Samsung S3C2440 ARM920 Microprocessor. This lab will introduce you to the FriendlyARM platform, and in using Linux as an embedded operating system.

Objectives

In this lab, you will learn:

Suggested Reading and Resources

WARNING: There is some important and really useful information in this section. Don't skip over it!

Part 1: Getting acquainted with the platform

NOTE: As they were initially constructed, the FriendlyARM screen covers most of the connections and buttons you will be playing with. Before you do anything, you should unscrew the bolts on the bottom of the board, and mount the screen on the other side. Please ask a TA for help if you're not sure exactly what to do to remount the screen.

Before starting, you should make sure that you have the FriendlyARM platform, a stylus, a USB cable, an SD card, and an SD card reader. Qtopia linux should already be installed. Spend some time opening applications, pressing buttons, and watching the LCDs. There's also a really annoying buzzer application which I won't help you find, but if you do, you can probably drive out everyone in the lab.

NOTE: To change the language to english, click on the 'bubbles' icon at the top of the screen, then the 'flag' icon

To get programs onto the FriendlyARM, we are compiling C programs using an arm version of gcc. The way we'll do this is to compile our C program, load it into an SD card, then put the SD card into the FriendlyARM and run the program from there.

You'll probably be doing a good amount of shell manipulation on the FriendlyARM platform. If you connect a keyboard or mouse to the platform, it should automatically connect.

First we need to setup the arm cross compiler. To do this, log into attu, and add this command to your .bashrc:

    export PATH=/cse/courses/cse466/Instr/arm_gcc/4.3.2/bin/:$PATH

If you are using a different shell, Google, or the man page for your shell, can probably tell you how to add things to your profile. You can also always specify the full path to the compiler every time you invoke it, if you really want to do all of that extra typing.

Download the hello world code to your attu account, and run 'make'. Take the resulting hello application, move it to your SD card, and put it on the FriendlyARM. Open the terminal and run the 'hello' application, making sure it prints out hello. It might be a good idea to pay attention to what the makefile is doing, since you're gonna have to create your own from now on (it's really not complicated).

Next, try running the LED code, using the same steps as above. This program shows an example of how to open drivers and how to communicate with these drivers. Make sure you understand what this code does and play around with different input arguments to see the effects on the LED buttons.

NOTE: If you'd prefer not to type on the tiny FriendlyARM screen, you can either directly plug in a usb keyboard/mouse, or telnet into the unit. To do this, find the networking tool on the friendlyARM, connect an ethernet cable between it and your computer, and run ifconfig to set up the proper ip address and netmask on your computer. Then just use the command "telnet x.x.x.x", where x.x.x.x represents the ip of the friendlyARM (as set in the networking tool).

Part 2: Sound on the FriendlyARM

Suggested Reading and Resources