Short notes for the BBAI
This includes everything from linux filestructure, the boot process, accessing the PRUs, and much more! You can find all the important links, references and resources for making your projects with the BBAI. Hope you find this helpful!
Most of my reference was the book Exploring BeagleBone. Tools and Techniques for Building with Embedded Linux by Derek Molloy, so be sure to check it out as well!
Table of Contents
- General Overview
- Embedded Linux Systems
- Practical Beagle Board Programming
- Interfacing to the Beagle Board
- Additional Help
The BeagleBoard has been arround since 2008 and is a low-power open-source single-board computer produced by Texas Instruments in association with Digi-Key and Newark element14. It was designed with open source software development in mind.
- BeagleBone® AI fills the gap between small SBCs and more powerful industrial computers.
- It has the the TI C66x digital-signal-processor (DSP) cores and embedded-vision-engine (EVE) cores that makes it easy to explore how artificial intelligence (AI) can be used in everyday life.
Before we dive into the world of BeagleBoard, we need to get a few jargon and basic concepts out of our way first!
Let’s have a look at when one should consider using the Beagle Boards.
The Beagle boards are perfectly placed for the integration of high-level software and low-level electronics in any type of project.
The major advantage over more traditional embedded systems, such as the Arduino, PIC, and AVR microcontrollers, is apparent when you leverage the Linux OS for your projects.
For example, if you built a home automation system using the BeagleBone and you then decided that you wanted to make certain information available on the internet, you could simply install a web server. Linux also provides you with device driver support for many USB peripherals and adapters, making it possible for you to connect cameras, Wi-Fi adapters, and other low-cost consumer periph-erals directly to your platform.
- The BeagleBoard.org website: This provides the main support for this platform, with software guides, community links, and downloads
- Sitara AM5729 ARM Cortex-A15 Technical Reference Manual (TRM): this document contains anything you could possibly want to know about the internal workings of the AM5729.
- BeagleBone AI System Reference Manual: This is the core document that describes the BeagleBone Black hardware.
Capes are daughter boards that can be attached to the P8/P9 expansion headers on the BeagleBone boards. You can connect up to four capes at any one time when the capes are compatible with each other. Here, we will mostly be focusing on the Robotics Cape and the Bela Cape (both of which will be coming up subsequently to support the BBAI).
To understand how to control the hardware pins of the BB Boards, let’s first start off by understanding how to control the bare minimum on-board LEDs. We have 4 in-built LEDs. But to control this, we need some pre-requisites:
- Sysfs is a virtual file system that provides you with access to devices and drivers that would otherwise be accessible only within a restricted kernel space(refer here to understand what is the kernel and user space).
- In the directory
/sys/class/ledsYou can see the four (green!) LED sysfs mappings—
- More on this on Pg. 89 Chap 2:Beagle Software in the book Exploring BeagleBone. Tools and Techniques for Building with Embedded Linux by Derek Molloy .
Some good Documentation has been done here: https://satacker.github.io/posts/beagle_notes/, so do read it as well, incase I miss anything.
The Beagle boards use an open source Linux bootloader, called Das U-Boot(“The” Universal Bootloader). (see Pg 101 Chap3 for further details on this) .
This topic has already been covered under beagle_notes, So I will not go into much depth.
The Programmable Real-Time Unit and Industrial Communication Subsystem (PRU-ICSS) on the Beagle board’s AM57X SoC contains
- Two 32-bitload/store RISC CPU cores- Programmable Real-Time Units(PRU0and PRU1).
- 12-KiB program RAM and 8-KiB data RAM per PRU CPU.
- 21 Enhanced General-Purpose Inputs (EGPI) and 21 Enhanced General-Purpose Outputs(EGPO)
- Interrupt controller (INTC): An interrupt controller can be used to notify each PRU that an event has occurred or to notify the host device of events.
- Scratch pad (SPAD): This provides three banks of 30 × 32-bit registers that are shared between the two PRU cores.
- UART0: A UART device with a dedicated 192 MHz clock is available on the Beagle board headers.
Courtesy of the Ti AM572x SRM.
It allows a main processor that is running Linux to control the slave processors via OS device bindings. Example:
$ echo 'stop' > state $ cat state > offline $ echo 'am335x-pru0-fw' > firmware $ echo 'start' > state $ cat state > running
In this example, PRU0 is controlled, and the firmware from the
/lib/firmware/am335x-pru0-fw file is loaded into the PRU.
note: The PRU must be stopped before you can write new PRU programs.
The remoteproc framework allows different platforms/architectures to control (power on, load firmware, power off) those remote processors while abstracting the hardware differences, so the entire driver doesn’t need to be duplicated
- My proposal: Bela compatibility for the BBAI: proposal
- Official BBAI website: https://beagleboard.org/ai
- GNU Make
- The PRU-ICSS Reference Guide: This document is the main reference for the PRU-ICSS hardware: tiny.cc/beagle1501
- The PRU-ICSS Getting Started Guide on Linux: tiny.cc/beagle1502
- The Processor Messaging Framework: tiny.cc/beagle1505
- BBAI Pins: https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit#gid=227990209 & my copy
- Bela homepage: https://bela.io/
- Robot Control Library: https://beagleboard.org/static/librobotcontrol/index.html
- remoteproc framework and BBB PRUSSv2