Welcome to the Winter 2015 offering of CS107e.
All class announcements will be posted to Piazza.
Lectures: Mon & Fri 12:50-2:05 pm, Rm 107, Littlefield Center
Lab: Tue 7:00-9:00 pm, Gates 415, if you have trouble getting in call Phil's office at 650-725-9046 (across the hall)
Lecturers: Dawson Engler, Pat Hanrahan, Phil Levis
CA: Isabel Bush
Office Hours:
- Hanrahan, Mon 2:15 to 3:30 pm, Gates 370
- Levis, Fri 11AM-Noon, Gates 412
- Engler, Fri 2:15 to 3:30 Gates 314 or appt
- Isabel, Wed noon-2pm, Gates B28; Thurs 4-6pm, Huang Basement
In the readings, K&R is The C Programming Language (Kernighan and Ritchie), and EssentialC is a PDF available at http://cslibrary.stanford.edu/101. A digital copy of K&R is available to Stanford students via [Safari Books Online] (http://proquest.safaribooksonline.com.ezproxy.stanford.edu/book/programming/c/9780133086249). Please read the assigned readings before attending lecture and lab.
You should also read the Guides for each week.
Note that the schedule includes a guest lecturer Quinn Dunki on Mon Feb 2nd, and a tour of the Computer History Musuem on President's Day Feb 16th.
Topics | Readings |
---|---|
Week 1 Jan 5 | |
Lecture 1 (Mon): Introduction (slides) | Review electricity, binary and hexadecimal numbers and bitwire operations, and the unix command line. |
No Lab | |
Lecture 2 (Fri): Introduction to ARM (slides) : Blinking an LED (code) | Start with Baking Pi (intro, ok01, ok02) and then read about ARM ASM. |
Week 2 Jan 12 | |
Lecture 3 (Mon): ARM Assembly and Machine Code (slides) | Read sections 4.1-4.5 from the ARM ISA |
Lab 1 : Setup the Raspberry Pi | |
Assignment 1 : Larson scanner | |
Lecture 4 (Fri): Introduction to C (slides), (code) | Brush up on C syntax, data types, operators, control structure, function calls. EssentialC chapters 1, 2, and 4; or K&R 1, 2, 3, 4 and 5.1-5.4. Skip sections involving characters, strings, io, and standard libraries. Read the about the history of C |
Week 3 Jan 19 | |
Martin Luther King Holiday - No Class | |
Lab 2 : Below C Level | |
Assignment 2 : Clock | |
Lecture 6 (Fri): Functions (slides, code) | Read (or read again) about functions in C (Chapter 4 in K&R, Section 4 in Essential C), Read this nice explanation of local data and frame pointers |
Week 4 Jan 26 | |
Lecture 7 (Mon): Serial communication, ASCII and strings (slides, code) | Read about characters and strings, basic IO (getc, putc, puts, printf), and structures (Section 1.5, 1.6, 1.9, 5.5, 6, 7 in K&R; Section 3 in EssentialC). Read about Serial Communication. |
Lab 3 : Programming a UART | |
Assignment 3 : String formatting and printing | |
Lecture 6 (Fri): Linking, loading and starting (slides, code) | Read David Welch's articles on baremetal programming and bss data. |
Week 5 Feb 2 | |
Guest Lecture (Mon): Quinn Dunki, Building Veronica | |
Lab 4 : Understanding linking and loading | |
Assignment 4 : Debugger | |
Lecture 7 (Fri): Graphics and the framebuffer | |
Week 6 Feb 9 | |
Lecture 8 (Mon): GPIO and the keyboards | |
Lab 5: Setting up the framebuffer | |
Assignment 5: Displaying strings | |
Lecture 9 (Fri): Interrupts | |
Week 7 Feb 16 | |
President's Day - Computer History Musueum Tour | |
Lab 6: PS2 keyboard hack | |
Assignment 6: Keyboard to console | |
Lecture 10 (Fri): Interrupts, continued | |
Week 8 Feb 22 | |
Lecture 11 (Mon): C Programming | |
Lab 7: Handling Interrupts | |
Assignment 7: Interrupt console | |
Lecture 12 (Fri): Sound and MIDI | |
Week 9 Mar 2 | |
Lecture 13 (Mon): Networking | |
Lecture 14 (Fri): Memory management: sbrk/malloc | |
Week 10 Mar 9 | |
Lecture 15 (Mon): Caches | |
Lecture 16 (Fri): To Linux and Beyond |