ELEC424/COMP424/ELEC553: Mobile & Embedded Systems


Lab 1 - Programming in a Linux Environment

By the end of this lab you will learn how to:

  • Set up a virtual machine for Linux user-space development.
  • Compile and debug simple C programs.

Development Environment Setup

If you already have a Linux computer, great! You can go straight to the lab parts.

Otherwise, download and install the latest version of Virtual Box. It runs for both Windows and Mac OS X hosts. Create a virtual machine with the lastest Ubuntu Desktop Linux inside Virtual Box. Some tips for Settings:

  • Give your virtual machine enough processors and abundant memory.
  • For easy file transfer, allow your virtual machine to share a folder with the host machine.
  • Allow copy-paste sharing between the virtual machine and the host.

An outdated guide from TI but still very useful. It is for Windows host but that for Mac OS X and Linux hosts is similar. When you run into a problem, remember Google is your best friend.

Three Parts

Part 1: Hacking with GDB

Part 2: Fixing memory leaks

Part 3: Making it fail again

Submitting your lab report and source code

All lab report and soure code should be submitted in a single .zip file via OwlSpace. The report should be structured with three sections, each dedicated to a part of the lab.