lab-01 - CSE 380 Lab #1 Spring 2009 Part 1 is due at the...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 380 Lab #1 Spring 2009 Part 1 is due at the end of your scheduled lab section the week of January 19, 2009 Part 2 is due at the end of your scheduled lab section the week of January 26, 2009 Part #1 Objective The objective of this lab is to become familiar with the development environment in the lab (CodeWarrior IDE). You will start by creating a project, entering and debugging a small C program, entering and debugging a small ARM assembly language program, and finally integrating the two programs. Procedure Step #1 – Creating a Project Open Metrowerks CodeWarrior Integrated Development Environment by selecting Start Programs ARM Developer Suite 1.0.1 CodeWarrior for ARM Developer Suite . To create a new project, select File New . This will open the popup window shown below. Under the Project tab, click on ARM Executable Image .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Set the path for your working directory by clicking on Set . The location (path) can be set to your network drive (N:\). Enter a name for your project. In this example, we’ll use the name working . When done, click on OK. The project window will now appear, as shown in the figure below. Step 2 – Enter and Run a C Program Select File New Text File . This will open an editor. Your program will be entered in this window. Enter the following C program, as shown below. When done, save the file as lab1.c . Note that the extension c will be used for C programs, and s will be used for assembly programs.
Background image of page 2
Next, you will add your program to the project that you created in step #1. To do this, click in the project window so that it is active. From the pulldown menu at the top of the Metrowerks CodeWarrior window, select Project Add Files . A popup window will appear. Click on the file you just saved ( lab1 ) and click on Add . Another window will appear, as shown below. Click on OK. Your C program should now appear as part of your project. The next step is to compile and debug the program. Click on the run button in the project window. This button will turn green when the cursor is placed over it. Once you’ve clicked on this button, the ARM Extended Debugger (AXD) will open and the file will be compiled, and run (barring any compilation errors). The output is shown in the ARM console at the lower right corner of the screen. In order to see what the C program looks like in ARM assembly, the program can be viewed in the window labeled ARM7_T-Disassembly . Select File Reload Current Image to reload the image. The disassembled code is shown below. The program begins at the label main .
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
The program can be stepped through one instruction at a time by repeatedly hitting the function key F10 or by selecting Execute Step . As the program is stepped through, the blue arrow points to the next instruction to be executed. Another way of running a portion of the program is to use the Run to Cursor option. To illustrate this,
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

lab-01 - CSE 380 Lab #1 Spring 2009 Part 1 is due at the...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online