UCSCBaskin School of Engineering  
General Information Events, News & Organizations Degrees & Departments Research Classes Admissions & Advising People & Jobs Administration
CMPE 117 - Winter 2004

Embedded Software

Instructor: Luca de Alfaro

  • Location: 12:00-1:45, TTh, Baskin Engineering, Rm. 372.
  • Lab location: Baskin Engineering, Rm. 168.
  • Office Hours: Mondays, 1-2.
  • Newsgroup: ucsc.classes.cmpe117

General Information

What is Embedded Software?

Embedded software is the software that is included in products, rather than running on desktop PCs or workstations. The applications of embedded software range from small, stand-alone systems such as those found in appliances, to the real-time, networked systems responsible for the control and performance of cars, aircraft, and production plants. Over 99% of the CPUs being produced are used in embedded systems, and embedded software determines an increasing share of the functionality, appeal, and complexity of a product, from cellphones, to automotive engine control systems.

What is This Course About?

  • Program Lego® Mindstorm® robots in a variety of languages! Make them roam, explore, build ad-hoc communication links, and perform a variety of tasks. The special project this year consists in setting up an ad-hoc network between the robots, so that the robots can communicate and coordinate their tasks.
  • Learn how to write concurrent, real-time code, and how to ensure it is correctly scheduled.
  • Learn how different real-time operating systems support embedded programming.
  • Experiment with high-level languages for embedded systems, developed to make real-time distributed control easy!
    These languages are based on a completely different set of ideas from the programming languages you are used to.
  • Learn what are the main challenges in developing embedded software for complex systems such as cars, cellphones, and satellites, and learn techniques to overcome them.

Notes on This Year's Version of the Course

Topics

This year, I will introduce as soon as possible the architecture of the Lego Mindstorm robots, so that the students will be able to start working on the project in January. The project consists in developing an ad-hoc network using the infrared communication link of the Mindstorms. We will be able to use debugging tools and packet generators in order to help test the code. The ad-hoc network is a challenging application that will lead us to explore in a practical context many of the issues of embedded programming: scheduling, resource contention, locks, power-aware design, and real-time. It should be fun!

Lab

The course has a lab. Indicatively, I would prefer to hold lab lectures each Tuesday after class, but I will conduct a poll during the first week of classes, to ensure that the time is convenient for most students. Generally, I give one lecture a week in the lab. The first lectures will be dedicated to Lego Mindstorm programming; after that, we will talk about the details of the ad-hoc protocol. In a later part of the course, students will also use Esterel to program the Mindstorms. Students will have access to the lab during most times of the week to work on their projects. Students can work either alone, or in pairs, at the projects.

Prerequisites (and the lack thereof)

Due to the simultaneous change to the prerequisites of CMPS 111, and the scheduling of CMPE 117 in Winter, it could be difficult for many students to have already taken the prerequisite CMPS 111. Because of these circumstances, I am quite willing to make exceptions. If you need a permission code to enroll, let me know.

Course Information

Textbook

Giorgio C. Buttazzo, Hard Real-Time Computing Systems: Predictable Scheduling Algorithms & Applications. Kluwer Academic Publishers, 1997.

Midterms and Final

  • Midterm 1, January 29 (Thursday), in class.
  • Midterm 2, February 26 (Thursday), in class.
  • Final: by request. Otherwise, a software project is due at the end of class.

Reading and Resources

robos

robos is the operating system that we will use for the Lego® Mindstorm® robots. These pages contain both the code, and a wealth of documentation and information about robos (including application code examples).

Esterel

Esterel is a synchronous language that we will use in programming Lego® Mindstorm® robots. Accessible from UCSC only.

Ad hoc network protocol

  • Johnson and Maltz: Dynamic Source Routing in Ad Hoc Wireless Networks
  • Packet structure. This is the new packet structure discussed in class, and kindly documented by Eric Decker, who greatly contributed to it.
  • IETF draft specification
  • The new lnpd_1_1 lnpd tarball, from Eric Decker, new as of Feb 24, 2004, containing the following improvements:
    • (Makefiles): clean up dependancy generation
    • (Makefiles): fix cleaning and realcleaning.
    • (Makefiles): generate TAGS for emacs (ctags currently ignored).
    • (Makefiles): generate rawdump and rcpdump.
    • (README): update to reflect rawdump and rapdump.
    • (misc): clean up warnings from implicit use of functions.
    • (): add rapdump.c rapsupport.c, rapsupport.h, rawdump.c
    • (): add include/lnp/rap.h
    • (): clean up strange chars (unicode?)
    • This is a bugfix release, compared to lnpd_1_0.
  • Pseudocode for RAP buffers.
  • Overview slide for RAP implementation.
  • New rap.txt (02/29/04)
  • New rap.h (02/29/04)

Slides on scheduling

Protocols

The Consensus Problem

Assigned Readings and Homeworks

  • Due Tue Jan 13: Read the legOS Kernel Documentation, written by Stig Neilsson, available from the robos documentation page. You may also want to browse the legOS HOWTO. It would be great if you could read some of this (or at least "read it in diagonal", i.e., scan it quickly) before Thursday's lab.
  • Due Thu Jan 22: The light-seeking robot. This is a lab assignment, that has been discussed in class. You should email me the code as an attachment, and demo the robot in the lab.
  • Due Tue Feb 3: Homework 1, and sample solutions.

Disclaimer

LEGO® and Mindstorm ® are trademarks of the LEGO Group of companies which does not sponsor, authorize or endorse this site.

General info · News · Events · Degree Programs · Research · Classes · Admissions · Advising · People · Jobs · Administration
SOE Webmail · SOE SSH · SOE Wiki · Search · Sitemap · Contact us · Driving directions · Privacy · UCSC
© Baskin School of Engineering, University of California, Santa Cruz
1156 High St., Santa Cruz, CA 95064 · (831) 459-2158 · webmaster@soe.ucsc.edu