BeagleBoard/GSoC/2021 Proposal/bela on bbai

< BeagleBoard‎ | GSoC
Revision as of 06:49, 9 April 2021 by DhruvaG2000 (talk | contribs) (Proposed method of Implementation and Timeline)
Jump to: navigation, search


{{#ev:youtube|}} About Student: Dhruva Gole
Mentors: Giulio Moro
GSoC: GSoC entry


This project is currently just a proposal.


Please complete the requirements listed on the ideas page and fill out this template.

About you

IRC: dhruvag2000
School: Veermata Jijabai Technological Inst.
Country: India
Primary language : English, Marathi, Hindi
Typical work hours: 10AM - 7PM Indian Standard Time
Previous GSoC participation: I find embedded and IOT pretty interesting, given I have experience with ESP32, SIMCOM, ESP8266, Atmega, and many other microcontroller devices and I think I will be able to excel in this project. This is the first time i am participating in GSoC.

About your project

Project name: Bela support for the BeagleBone AI


What is Bela?

As give on the official website, Bela is a hardware and software system for creating beautiful interaction with sensors and sound. Bela consists of a Bela cape on top of a BeagleBone Black computer (uptil now). Bela has a lot of analog and digital inputs and outputs for hooking up sensors and controlling other devices, and most importantly Bela has stereo audio i/o allowing you to interact with the world of sound.
Both Bela systems use the same Bela software. This is a Bela operating system that takes advantage of features of the BeagleBone computers and can achieve extremely fast audio and sensor processing times.

Applications of Bela

Bela is ideal for creating anything interactive that uses sensors and sound. So far, Bela has been used to create:

  1. musical instruments
  2. kinetic sculptures
  3. wearable devices
  4. interactive sound installations

and many more applications that are listed here

Why add support for BBAI?

The Beagle Black and PocketBeagle are getting more an more outdated by the day and soon newer boards with different and more efficient chips like the AM5X in the BBAI are coming up that need compatiblity with the Bela Software and Hardware. Delegating peripheral initialisation to the mcasp and spi drivers instead of doing it all by setting registers manually should hopefully make it more portable for porting to other boards in the family, present or future.

Programming languages and tools to be used

C, PRU, dtb, uboot, make

Proposed method of Implementation and Timeline

The Bela cape is working on the BB AI using ALSA (although one of the clocks seems to be of the wrong frequency), so we can confirm the pinout and pin settings are OK. We have not tried running the Bela code on the PRU yet. You'll need to know (or learn!) a bit about pinmuxing, uboot, PRU assembly and more in general the Sitara family of SoCs and the McASP audio port. (ref. here)


It can be seen from the syntax here that we are ennumerating the hardware the code is running on as follows:

typedef enum
	BelaHw_NoHw = -1,
} BelaHw;
Mar 29 Applications open Students register with GSoC, work on proposal with mentors.
Apr 13 Proposal complete Submitted to
May 17 Proposal accepted or rejected
  • Community Bonding Period and discussion on the project and resources available.
  • Setting up beaglebone-ai i.e flashing up to date Linux image and connect to local area network (LAN) via either Ethernet or WiFi and try to run bare_minimum code from this repository to test basic stuff is working.
Jun 07 Pre-work complete, Coding officially begins!
  • All the boards and additional hardware will be available to me at this period of time and I should have set up my BeagleBone Black and Ai boards i.e flashing up to date Linux image and Testing user-led blink code :)
  • Initial checks for hardware like audio ports and other peripheral devices will be completed and all the soldering related work will be done.
  • A detailed spreadsheet will be created if not already available for cape pin mapping and referencing for further use during BeagleBone AI software development ease.

(above ref. from here )

Jun 17 Milestone #1, Introductory YouTube video
June 24 Milestone #2
June 30 Milestone #3
July 12 18:00 UTC Milestone #4, Mentors and students can begin submitting Phase 1 evaluations
July 16 18:00 UTC Phase 1 Evaluation deadline
July 23 Milestone #5
July 30 Milestone #6
Aug 06 Milestone #7
August 10 Milestone #8, Completion YouTube video
August 16 - 26 18:00 UTC Final week: Students submit their final work product and their final mentor evaluation
August 23 - 30 18:00 UTC Mentors submit final student evaluations

Experience and approach

  1. I have used C++, C and Python programming languages over the past 3 years in a variety of projects involving embedded systems using the ESP32, Arduino UNO, ESP8266 and am also well-versed with freeRTOS.
  2. I have an aptitude for writing good reports and blogs, and have written a small blog on how to use a debugger.
  3. I recently did a project using ESP32, in which I used the DHT11 sensor to display humidity and temperature on a local HTML server . Other than that I have worked on developing hardware and making documentation for a 3 DOF arm based on an ESP32 custom board.
  4. I also interned at an embedded device startup where I
    1. Interfaced ADS1115 ADC with the ESP32 and used it to read battery voltage.
    2. Used UART for ESP32 and SIMCOM SIM 7600IE communication to gain LTE support.
    3. Published local sensor data to the cloud via LTE.
  5. I actively contribute to open source (most recently, I contributed to the ADS1115 library for ESP32 on the unclerus repo and can be seen here).
  6. Currently I am working on designing a Development board for the Raspberry Pico (RP2040) using KiCAD.
  7. I also do a lot of mini projects throughout the year, you can find my several more interesting projects at my github page


I believe that if I get stuck on my project and my mentor isn’t around, I will use the resources that are available to me. Some of those information portals are listed below.

  1. Derek Molly's beagle bone guide provides all the information needed for getting up and running with my beagle.
  2. Content on is very useful for information that ranges from tutorials and walkthroughs to the level of very advanced stuff.


If successfully completed, this project will add support for the Bela cape + Xenomai + PRU on the BeagleBone AI.

as far as the porting to BBAI project is concerned, it's mostly a matter of getting the right pins enabled, running the PRU code with rproc, probably modify some constants in the PRU code accounting for any difference in SPI, MCASP and GPIO between AM3358 and AM5729 and testing that it all runs with a Xenomai kernel. 



Completed all the requirements listed on the ideas page.
The code for the cross-compilation task can be found here submitted through pull request #149.