Guides
Brian's Guides (2024)
These guides will walk you through the steps needed to get up and running for each topic. If (when!) things go wrong, see the troubleshooting steps at the end of most sections before posting in Piazza. Suggested C style guide.
BeagleBone Green Docs
- BBG pin info for P8 Header (top) and P9 Header (bottom)
- BBG System Resource Manual
- BBG Schematic
- Zen Cape data sheets and schematic
- Raw (imperfect, not polished) notes on accessing Zen cape hardware
Guides for the first week - Getting up and running!
- Case Assembly Guide for AdaFruit plate: How to put together the BeagleBone, Zen, and Adafruit mounting plate
- Quick-Start Guide: How to setup the build environment and download code to the BeagleBone
- Networking Guide: How to get an Ethernet connection between the BeagleBone and the host PC
- Reflash your BBG: How to wipe your board and install a new software image to your BBG (wiping everything). Only do this if you want to upgrade to a new version or wipe your board!
- NFS Guide: How to setup the NFS server and connect to it from the target
- [NEW] WSL Embedded Linux Guide: Brief steps on getting WSL2 setup for embedded Linux development. Combines steps from the Quick Start, Networking, and NFS guides.
Guides for Assignment 1
- RFS Customization Guide: Guide to setting the message of the day, and running code on log in.
- LED Guide: How to control the LEDs via the terminal and C
- GPIO Guide: How to control read/write to GPIO pins via the file system and C
- Sample C program for edge triggered GPIO; however, non-edge triggered GPIO (such as described in GPIO guide and assignment) may be easier to implement and debug; use this code only if you want edge-triggered.
Guides for Assignment 2
- A2D (Analog) Guide: Covers enabling the ADC virtual cape, reading a voltage, and using C code
- Sample C program: potDriver.c
- [UPDATE] Expanded guide to show how to wire photoresistor.
- Light Sensor (photoresistor) video by Dr. Brian.
- For printed guide, see light sensor guide (created by students; just first 2 pages); use a 10kOhm resistor (or similar).
- Guide on using I2C to drive 2-digit 14-seg display
- Sample C program: segDisplay.c & i2c_commands.sh
- Linux PWM Guide: How to drive the buzzer and PWM-tri-colour LEDs on the Zen cape via Linux
- [UPDATE] Expanded guide to show how to an LED to under PWM control.
- Debugging Guide: Covers GDB Server, Cross-GDB, Eclipse, and stripping a binary.
Guides for Assignment 3
- Zen Cape Audio Guide covering the Zen cape, USB Audio, and PCM audio output via ALSA in C
- ALSA Code Samples:
wave-player.c
&Makefile
: Sample C application for PCM audio output via ALSA.audio_cmake.zip
: The wave-player app built using CMake instead of a Makefile.audioMixer_template.c/.h
: Template of an audio mixer code for mixing real-time PCM sounds into one output stream.
- Drum sounds suitable for creating a drum beat. From Freesound.org, by "menegass", used under Creative Commons license
- Student created guide for using ALSA with Rust
- ALSA Code Samples:
- Accelerometer: No guide is provided for using the specific parts on the Zen capes.
- See I2C guide above for general commands and understanding.
- See accelerometer data sheet for knowing what registers to read/write:
Zen Cape Green: MMA8452Q datasheet by Freescale Semiconductor, I2C bus I2C_1 at address 0x1C.
Zen Cape Red: LIS331DLH datasheet by ST Micro, I2C bus I2C_1 at address 0x18.
Guides for Assignment 4
- PRU Guide
- Sample code for PRU (
14SegFun.c
)
- Sample code for PRU (
- BBG pin info for:
P8 Header
P9 Header
Guides for Kernel Driver Exercise
- Driver Creation Guide
- Here is a previous guide which covers compiling and downloading a new kernel to the board. However, as of Feb 2023 the version of UBoot running on the board seems not to function with downloading the kernel (generates "data abort" errors). So, we are switching to building drivers for the currently installed kernel on the board, using the above (shorter!) guide.
- LED Wiring Guide; covers configuring LED with the Linux kernel. (.dts file works with Bullseye kernel 5.10)
Old Guides (2023)
These guides have not been updated for this offering of the course; though, they are likely mostly accurate.
Other Guides
- Zen Cape tri-colour LED Guide: How to have the Zen cape's LEDs show as Linux LEDs. DTS file included PDF.
- BBG Serial Port on Grove Connector (just some notes, not a full guide).
All 2021-Spring Guides
Here is a ZIP of all the guides, as of the end of the Spring 2021 semester.
Find guides created by previous student groups here.