Notes
Lectures are being recorded; see side-bar for link.
- #1 - Welcome or in colour
- #2 - Care and feeding instructions or in colour
- #3 - Development Environment or in colour
- In class example program and makefile
- Suggested tutorial for the command line
- Videos on setting up a VM:
Installing VMWare Player and Debian VM
Configuring a VMWare Player's virtual machine
Building Software & C
- Academic Honesty
- #4 - Building software (Make and CMake) or in colour
- Starter CMake project for assignments
- Make and CMake tutorials
- Makefile tutorial - Great introduction to Makefiles
- How to Use CMake,
- Introduction to CMake by Example
- CMake Tutorial.
- #5 - C programming or in colour
- In class C programming examples
- Optional videos on C programming (in Eclipse) by Br. Brian; useful if new to C:
C Basics: Basics, functions, prototypes, and constants
C Modules: Multiple files in a project, including "private" functions (static)
Eclipse basics: Importing an existing makefile program
Linux Programming
- #6 - Linux programming or in colour
- In class Linux programming examples
- YouTube videos on Linux programming (by Brian)
- Processes (Fork & Exec)
fork(): Create a process
exec(): Replace current program with another
fork() and exec() - Threads (pthreads)
#1-Introduction: Create a single thread
#2-Multiple threads: Passing data in/out using a struct with numerous threads
#3-Dynamic memory: Passing data in/out of thread function using dynamically allocated memory - Synchronization
Synchronization using mutex
- Processes (Fork & Exec)
PWL & Noise
- #7 - Voltage, ADC, Piecewise linear, & Noise or in colour
- Feb 3 Zoom Lecture Recording - Passcode:
igotthis
- Feb 3 Zoom Lecture Recording - Passcode:
Debugging & Profiling
- #8 - Debugging w/ GDB & VS Code or in colour
- Debugging guide covers how use GDB and VS Code for graphical debugging
- Examples code for debugging
- Videos
GDB Cross Debugging
GDB Cross Debugging seg faults
Graphical cross debugging with Eclipse
Dynamic memory debugging usingvalgrind
tool - Feb 5 Zoom Lecture Recording - Passcode:
igotthis
- #8.5 - Profiling or in colour
- Examples code for
mtrace
and profiling
- Examples code for
Electronics
Embedded Webserver
- #10 - Node.js or in colour
- This topic is useful, but not covered in lecture. You will need to use some of this on the assignments, but not in depth.
- Pre-recorded videos
- Part 1: Static files (34 minutes)
- Part 2: Dynamic interactions (28 minutes)
- See Node.js in Action (2nd ed) book via SFU Library online for guide to Node.js
- Node.js examples [Updated Feb 9 2023]
Note: Makefile will deploy to public folder too!
Bit Twiddle
-
#13 - Bit Twiddling or in colour
- Book appendix describing Bitwise operations (PDF)
-
As3 PCM Discussion as .png or as .svg - Screenshot of a previous offering!
- Previous year's discussion about PCM audio (some details may not be 100% the same)
R5 - Real Time Processor
- #15.1 - R5 Intro or in colour
- R5 Guide covering installing tools to build R5 code on host and run on MCU R5; takes ~3GB of space on host.
- R5 MCU Sample Code:
blinky.zip
: Sample C application for PCM audio output via ALSA.neopixel.zip
: The wave-player app built using CMake instead of a Makefile.sharedMem.zip
: Template of an audio mixer code for mixing real-time PCM sounds into one output stream. You can use this code directly in your assignment.
- You can also follow the full official guide to setting up your R5/Zephyr development environment. Warning: Takes >10GB.
- R5 MCU Sample Code:
- R5 Guide covering installing tools to build R5 code on host and run on MCU R5; takes ~3GB of space on host.
- #15.2 - R5 Memory or in colour
- #15.3 - NeoPixel or in colour
FMEA
- FMEA notes or in colour
- FMEA spreadsheet template, and FMEA ratings (from here)