Updates: This Project has been selected for GSoC 2021.
Will now use this thread for all further discussion and will maintain communication logs here as well.
Mentors: @giuliomoro , @rma (Robert Manzke ), and @nerdboy (Stephen Arnold)
Todays chat logs on slack:
@giuliomoro I was going through the current Bela repo makefile and couldn’t really understand much, but if I am not mistaken it will only work on xenomai kernel builds and not the vanilla one’s?
If that is so then will I have to write a new makefile from scratch for running on vanilla?
29 replies
it’s largely true that it won’t build on a non-Xenomai machine. There are a couple of workarounds for that without rewriting everything from scratch and I guess that would be good exercise to get familiar with the build process and Makefile
. Do you have a Linux machine available?
or will you be waiting for the BBAI to reach you? By the way, send me an email with your shipping details so I can get you a Bela cape. The BBAI will come from BB people, as I understand you already gave jkridner your address.
yes I am currently running Linux Mint 20.1 x86_64 .
How can I compile on my linux laptop?
is libmercury
available on your system?
it is Xenomai’s soft-real-time user-space library.
and that may well just about get you to build the code on your laptop. Possibly it may even allow you to run it on BBAI without a Xenomai kernel.e (edited)
okay I will check that out
if you can’t find libmercury, you can build it from source Installing_Xenomai_3 · Wiki · xenomai / xenomai · GitLab
okay, I have also stumbled across this: Installation steps for xenomai 3 on Ubuntu 16.04 - Stack Overflow
Do you think I shud give it a try as well?
Stack Overflow
Installation steps for xenomai 3 on Ubuntu 16.04
I would like to install Xenomai 3 on Ubuntu 16.04 LTS. I wan unable to find any proper installation guide/procedure for the same. Request help.
that involves installing a Xenomai-patched kernel , which I don’t recommend you do because you won’t be able to run the code on your computer anyhow (because it lacks a PRU!)
hahaha yes true
so my understanding is that you’ll be building locally only until you get a beaglebone
Dhruva: YES
so assuming the makefile will work, the additions to be made are according to our discussed workflow right? For starters I will try to make a flag for detecting cur_hardware
cur_hw = 1 // BBB
cur_hw= 2 // BBAI
cur_hw = -1 // Not supported
Until I get a BeagleBone, yes I will be building on my personal computer
where would that flag be? in the Makefile
?
[PS: I sent you a private message]
1
yes, in the makefile I was thinking?
as you had mentioned on the forum:
you can use `#ifdef` to make them conditional at compile time. The Makefile could detect whether we are running on an AM335x or an AM572x and define a flag accordingly
Sure, that’s fine. Alternatively, we could make it a runtime flag, given how runtime detection will take place anyhow, but probably best to start with build-time detection, so it will also be easier to modify the PRU files.
1
and anyhow, I understand that BB releases different images for AM5729 vs AM3358, so … build-time detection may just be the way forward.
Right