About the course


Fall 2024

  • Lectures: Mon and Fri 10:30am - 12pm, Y2E2 111
  • Labs: Tue and Wed 6:30-8:30pm
  • Course staff: Aanya Tashfeen, Aditri Patil, Ben Ruland, Didi Kamalova, Frances Raphael, Ishita Gupta, Julie Zelenski, Kenny Osele

CS107 is the third course in the systems core sequence. The CS106A and B courses provide students with a solid foundation in programming methodology and abstractions, and CS107 follows on to develop the skills needed to build computer systems.

CS107e: Computer Systems from the Ground Up is a variant of CS107 that teaches the fundamental concepts of computer systems through bare metal programming on a single board computer (SBC). Bare metal programming means you will not run an operating system and will make minimal use of libraries. This course also serves as an introduction to embedded systems. The course starts with the microprocessor and moves up to the C programming language, without skipping anything in between. The goal is to build a solid understanding of all aspects of how modern computers execute programs and how program development tools work.

The major learning goals for the course are:

  1. To understand how computers represent information, execute programs, and control peripherals.
  2. To master command-line programming tools and the C programming language.

Topics covered include:

  • the RISC-V architecture
  • assembly language and machine-level code
  • the C programming language
  • compilation, linking and loading
  • debugging
  • memory organization and management
  • controlling peripherals: GPIO, graphics, sound, and keyboards

Students receive a Mango Pi and kit of components. All assignments will run on the Pi. Assignments build upon each other by adding more and more functionality to a core library. They culminate in a simple personal computer shell using a keyboard and display. For the capstone, students do a project of their choosing where they build a complete hardware-software system.

This class is organized by weeks. Each week has lectures on Fri and Mon, a 2-hour lab session midweek, and a programming assignment which is due the following week. Lecture and lab attendance is mandatory. The final project is completed over the last two weeks of the quarter. There are no exams.

For information about the differences between CS107 and CS107e, check out this FAQ.

History

CS107e is a relative newcomer to the Stanford curriculum. The mainstream CS107 has served as our long-standing introduction to computer systems, CS107e gave a fresh perspective on how to teach this material. The "ground up" curriculum is the brainchild of Pat Hanrahan and the course owes its very existence to Pat's inspiration and travail. The multi-talented Isabel Bush was the Lead TA in the first offerings of the course and helped shape the course and curriculum. Phil Levis, Dawson Engler, Julie Zelenski, and Chris Gregg have contributed to the cause as instructors and we've have enjoyed superb student collaborators: Anna, Ashwin, Eric, Jane, Jennifer, Lenny, Liana, Maria Paula, Michelle, Mihir, Ngoc, Omar, Peter, Sean, Sergio, Shannon and Will. The tireless efforts of the TAs to support student learning have earned boundless praise from our students. We owe a shout-out to David Welch, the person most responsible for figuring out how to write bare metal programs on the Raspberry Pi. If it weren't for the pioneering work of David, we would not be offering this course!

After a wonderful 8-year run on our beloved Raspberry Pi, the end of life of the A+ model necessitated a change in direction. As of 2024, we have moved on to Risc-V ; our chosen SBC is now the spunky pink Mango Pi MQ-Pro built on the AllWinner D1 SOC. Big shoutout to Anna, Liana, Aanya, Ben, Calvin, Didi, Frances, Ishita, Kenny, and Yifan for their amazing contributions in the big transition!