Skip to content

Commit 064af7e

Browse files
zelenskiCS107E BOT
authored andcommitted
Info session slides
commit d4b9bae236e1a5b9dff28482f539208c17c39739 Author: Julie Zelenski <[email protected]> Date: Thu Dec 5 20:46:45 2024 -0800 Info session slides
1 parent d5af4e0 commit 064af7e

File tree

19 files changed

+536878
-2
lines changed

19 files changed

+536878
-2
lines changed

_data/unreleased.csv

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
permalink,title,released
22
"/lectures/FloatingPoint_Sound/","Floating Point and Sound",false
3-
"/lectures/InfoSession/","Course Info Session",false
43
"/lectures/OOP/","Object-oriented programming",false
5-
"/lectures/Wrap/","Wrap or There and Back Again",false

lectures/InfoSession/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
released: true
3+
permalink: /lectures/InfoSession/
4+
title: Course Info Session
5+
readings: |
6+
Readings:
7+
+ The [course FAQ](https://cs107e.stanford.edu) has answers to common questions from prospective students.
8+
+ [Slides](slides.pdf) from info session
9+
---
10+
11+
12+
CS107e has limited enrollment due to constraints on lab space. We choose the course cohort before the start of the quarter to aid students with their planning.
13+
14+
The student questionnaire will open after the info session and it will close on December 20th. Prospective students must fill out the questionnaire to be considered. We will notify you about enrollment decisions by end of year.
15+
16+
{{ page.readings }}

lectures/InfoSession/slides.pdf

36.7 MB
Binary file not shown.

lectures/Wrap/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
released: true
3+
permalink: /lectures/Wrap/
4+
title: Wrap or There and Back Again
5+
readings: |
6+
- Look back to where we started and celebrate a great quarter of learning, making, and engineering together!
7+
- What comes next?
8+
- Bring your questions and share your feedback on the course.
9+
---
10+
11+
12+
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Programs built by this makefile
2+
RUN_PROGRAM = rocket.bin
3+
TEST_PROGRAM =
4+
5+
MY_MODULE_SOURCES = i2s.c audio.c dma.c
6+
# MY_MODULE_SOURCES = printf.c
7+
8+
# MY_MODULE_SOURCES is a list of those library modules (such as gpio.c)
9+
# for which you intend to use your own code. The reference implementation
10+
# from our libraries will be used for any module you do not name in this list.
11+
# Editing this list allows you to control whether the program being
12+
# built is using your code or the reference implementation for each module
13+
# on a per-module basis. Great for testing!
14+
#
15+
# NOTE: when you name a module in this list, it must provide definitions
16+
# for all of the symbols in the entire module. For example, if you list
17+
# gpio.c as one of your modules, your gpio.c must define gpio_set_function,
18+
# gpio_get_function, ... and so on for all functions declared in the gpio.h
19+
# header file. If your module forgets to implement any of the needed
20+
# functions, the linker will bring in gpio.o from reference libmango to
21+
# resolve the missing definition. But you can't have both gpio modules!
22+
# The linker will report multiple definition errors for every function
23+
# that occurs in both your gpio.c and the reference gpio.o. No bueno!
24+
#
25+
# You shouldn't need to modify anything below this line.
26+
########################################################
27+
28+
PROGRAMS = $(RUN_PROGRAM) $(TEST_PROGRAM)
29+
30+
all: $(PROGRAMS)
31+
32+
# Flags for compile and link
33+
ARCH = -march=rv64im -mabi=lp64
34+
ASFLAGS = $(ARCH)
35+
CFLAGS = $(ARCH) -g -Og -I$$CS107E/include $$warn $$freestanding
36+
LDFLAGS = -nostdlib -L$$CS107E/lib -T memmap.ld
37+
LDLIBS = -lmango -lmango_gcc
38+
39+
# Common objects for the programs built by this makefile
40+
SOURCES = $(MY_MODULE_SOURCES)
41+
OBJECTS = $(addsuffix .o, $(basename $(SOURCES)))
42+
43+
# Rules and recipes for all build steps
44+
45+
# Extract raw binary from elf executable
46+
%.bin: %.elf
47+
riscv64-unknown-elf-objcopy $< -O binary $@
48+
49+
# Link program executable from program.o and all common objects
50+
%.elf: $(OBJECTS) %.o
51+
riscv64-unknown-elf-gcc $(LDFLAGS) $^ $(LDLIBS) -o $@
52+
53+
# Compile C source to object file
54+
%.o: %.c *.h
55+
riscv64-unknown-elf-gcc $(CFLAGS) -c $< -o $@
56+
57+
# Assemble asm source to object file
58+
%.o: %.s
59+
riscv64-unknown-elf-as $(ASFLAGS) $< -o $@
60+
61+
# Disassemble object file to asm listing
62+
%.list: %.o
63+
riscv64-unknown-elf-objdump $(OBJDUMP_FLAGS) $<
64+
65+
# Build and run the application binary
66+
run: $(RUN_PROGRAM)
67+
mango-run $<
68+
69+
# Build and run the test binary
70+
test: $(TEST_PROGRAM)
71+
mango-run $<
72+
73+
# run the test program under gdb
74+
debug: $(TEST_PROGRAM:.bin=.elf)
75+
riscv64-unknown-elf-gdb $(GDB_FLAGS) $<
76+
77+
# Remove all build products
78+
clean:
79+
rm -f *.o *.bin *.elf *.list
80+
81+
# this rule will provide better error message when
82+
# a source file cannot be found (missing, misnamed)
83+
$(SOURCES) $(PROGRAMS:.bin=.c):
84+
$(error cannot find source file `$@` needed for build)
85+
86+
# Access .c and .s source files within shared mylib directory using vpath
87+
# https://www.cmcrossroads.com/article/basics-vpath-and-vpath
88+
vpath %.c ../mylib
89+
vpath %.s ../mylib
90+
91+
.PHONY: all clean run test
92+
.PRECIOUS: %.elf %.o
93+
94+
# disable built-in rules (they are not used)
95+
.SUFFIXES:
96+
97+
export warn = -Wall -Wpointer-arith -Wwrite-strings -Werror \
98+
-Wno-error=unused-function -Wno-error=unused-variable \
99+
-fno-diagnostics-show-option
100+
export freestanding = -ffreestanding -nostdinc \
101+
-isystem $(shell riscv64-unknown-elf-gcc -print-file-name=include)
102+
OBJDUMP_FLAGS = -d --no-show-raw-insn --no-addresses --disassembler-color=terminal --visualize-jumps
103+
GDB_FLAGS = -q --command=$$CS107E/other/gdbsim.commands

0 commit comments

Comments
 (0)