Skip to content

Latest commit

 

History

History
122 lines (101 loc) · 9.02 KB

Project-Notes.md

File metadata and controls

122 lines (101 loc) · 9.02 KB

Project Notes

You can find the link to my proposal: Bela compatibility for the BBAI here.

This Blog talks about everything I have learned so far about the Bela Platform and BeagleBoards. This includes everything from linux filestructure, the boot process, accessing the PRUs, Real-time Kernels and much more! Hope you find this helpful!
Most of the basics are referred from 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

  1. Introduction
  2. General Overview
  3. Embedded Linux Systems
  4. Practical Beagle Board Programming
  5. Interfacing to the Beagle Board
  6. Bela
  7. References
  8. Additional Help

My Project weekly logs can be found here

Introduction to beagleboard and the BeagleBone® AI

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.

General Overview of BeagleBoards

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.

BeagleBone Official Documentation

Capes

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).

On-Board LEDs

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/leds You can see the four (green!) LED sysfs mappings—usr0, usr1, usr2, and usr3.
  • 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 .

Embedded Linux Systems

Some good Documentation has been done here: https://satacker.github.io/posts/beagle_notes/, so do read it as well, incase I miss anything.

Bootloaders

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) .

Kernel Space and User Space

This topic has already been covered under beagle_notes, So I will not go into much depth.

Practical Beagle Board Programming

CHAP5: TODO

Interfacing to the Beagle Board

Interfacing to the Beagle Board I/Os

CHAP5: TODO

Interfacing to the Beagle Board Buses

CHAP6: TODO

Real-Time Interfacing with the PRU-ICSS

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.
    The Architecture:
    image
    Courtesy of the Ti AM572x SRM.

The Remote Processor Framework

It allows a main processor that is running Linux to control the slave processors via OS device bindings. Example: First, I suggest you navigate to /dev/remoteproc/pruss1-core0 as su. Then, try the following

$ echo 'stop' > state   # this will stop the PRU
$ cat state
> offline
$ echo 'am57xx-pru1_0-fw' > firmware  # Refer below for the actual location
$ echo 'start' > state
$ cat state
> running   #This will again start the PRU1_core 0

In this example, PRU0 is controlled, and the firmware from the /lib/firmware/am57xx-pru1_0-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

To see how RPROC headers will be used, goto BELA DOCUMENTATION/The Bela Code/ PRU.cpp

References

Additional Help