There are useful scripts for downloading and building EEROS applications with your Beagle Bone Blue. Switch to your current working directory
$ cd /path/to/working/directory
an clone the following git repository.
$ git clone https://github.com/ntb-ch/BeagleBoneBlue.git
Get into that cloned folder and run the shell script
$ cd BeagleBoneBlue $ ./clone.sh
this will clone all the required packages to run EEROS on your Beagle Bone Blue.
First you have to build a running version of the Robotics Cape library for your target device. To do that, switch to the Robitics Cape folder
$ cd robotics_cape_installer
and checkout version 0.3.4.
$ git checkout v0.3.4
Afterwards enter the libraries folder and edit its Makefile.
$ cd libraries $ nano Makefile
Find the lines
CC := gcc LINKER := gcc
and change them to
CC := arm-linux-gnueabihf-gcc-4.9 LINKER := arm-linux-gnueabihf-gcc-4.9
This is necassary because we work on the host and must make sure to choose the right cross compiler for our target. If you do not have this compiler on your host, you can get it with
$ sudo apt-get install g++-4.9-arm-linux-gnueabihf && sudo apt-get install cmake
If this package can not be found (Ubuntu 18.04) you have to add xenial to your sources.list
$ sudo gedit /etc/apt/sources.list
Add the following entries:
deb http://dk.archive.ubuntu.com/ubuntu/ xenial main deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe
Build the robotics cape library with
Now you have to change 2 files.First go to your BeagleBoneBlue/myApp folder and edit the CMakeLists.txt. Find the line
and change this absolute path to match your path.
Second, the current main.cpp is not working. Copy and paste the “Hello EEROS” tutorial into your main.cpp.
Change back to your BeagleBoneBlue git repository and run the
$ cd /path/to/working/directory/BeagleBoneBlue $ ./make.sh
This will build EEROS for your target system and also builds a small EEROS application named
SSH into your target and create the required folders (default password for “debian” is “temppwd”)
$ ssh email@example.com $ sudo mkdir /opt/eeros $ sudo chmod +777 /opt/eeros $ mkdir /opt/eeros/bin $ mkdir /opt/eeros/lib
Back on the host deploy the necessary files to your target by running
On the target run the
$ cd /opt/eeros/bin $ sudo ./myApp -c HwConfigBBBlue.json
If the libraries have not yet been copied to the target, copy them by hand to the right place
$ scp ./install-armhf/lib/libbbblueeeros.so firstname.lastname@example.org:/opt/eeros/lib $ scp ./install-armhf/lib/libeeros.so.0.0.0.0 email@example.com:/opt/eeros/lib $ scp ./build-armhf/myApp/myApp firstname.lastname@example.org:/opt/eeros/bin $ scp ./myApp/HwConfigBBBlue.json email@example.com:/opt/eeros/bin
On your target link both libraries to /usr/lib
$ sudo ln -s /opt/eeros/lib/libeeros.so.0.0.0.0 /usr/lib/libeeros.so.0.0.0.0 $ sudo ln -s /opt/eeros/lib/libeeros.so.0.0.0.0 /usr/lib/libeeros.so.0.0 $ sudo ln -s /opt/eeros/lib/libeeros.so.0.0.0.0 /usr/lib/libeeros.so $ sudo ln -s /opt/eeros/lib/libbbblueeeros.so /usr/lib/libbbblueeeros.so
Now you should be able to run the myApp application.
The Beagle Bone Blue comes with a preinstalled Debian 8 with Kernel 4.4.54-ti-r93 or similar. Do not upgrade to Debian 9 cause robitics cape will not work anymore. Also do not use any newer Kernel, this will cause the same problem. The latest Debian Images for your Beagle Bone Blue can be downloaded here.
You can also run the Beagle Bone Blue with a real-time Kernel. Check if there is already a RT-Kernel:
If not, download:
$ sudo apt-get install linux-image-4.4.49-ti-rt-r89
Do not use a newer one. Robotics Cape won't work anymore (ERROR: missing PINMUX driver). Reboot and delete the old kernel:
sudo apt remove --purge linux-image-4.4.54-ti-r93
It is highly recommended to use an IDE for your EEROS applications. You can use an IDE of your choice. The following steps explain how to setup an EEROS application with KDevelop.
$ sudo apt-get install kdevelop
You now have your main.cpp, HwConfigBBBlue.json and the CMakeLists.txt in your project solution. You can build this application by pressing the build-button in the top left corner. To run this application on your target device, get to your working directory
$ cd /path/to/working/directory/BeagleBoneBlue
If your project name is still myApp you can run the
otherwise you have to change the project name in the deploy.txt file
install-armhf/lib/libeeros.so.0.0.0.0 install-armhf/lib/libbbblueeeros.so myApp/HwConfigBBBlue.json build-armhf/YOUR-PROJECT-NAME/myApp
and run the deploy.sh afterwards.