File Exchange

image thumbnail

Simulink Coder Support Package for BeagleBone Blue Hardware

Generate and deploy code for BeagleBone® Blue boards


Updated 26 Apr 2021

Simulink Coder™ Support Package for BeagleBone® Blue Hardware enables you to create and run Simulink® models on BeagleBone® Blue Hardware . The support package includes a library of Simulink blocks for configuring and accessing BeagleBone® Blue peripherals and communication interfaces.
This support package is functional for R2017b and beyond.
View enhancements and bug fixes in release notes -

Comments and Ratings (17)

Carlos Rodriguez

A downside of this support package is that one cannot generate a desired PWM signal of specified frequency and duty cycle for the 8 servo pins on the board. I was looking to design a custom autopilot controller with Simulink and deploy it on the BeagleBone Blue but unfortunately the servo pins are not available to control ESC with Simulink. You are forced to use them only for servos which generally work at lower frequency.

The only workaround I've come up with is using the servo blocks to control the ESC, but I don't think I can since the ESC need 400 Hz. There are only 2 GPIO pins which are enabled for PWM generation, but I need 8 PWM so that would not be possible either. So I can not use this add-on. If anyone finds a solution, please let me know.

Trey Kasling

Forum Please -- My review -- this needs work. but could be GREAT

Shynesh Sukumaran

I tried the code generation using this toolbox and somehow it is giving this error
Error executing command "touch -c /home/debian/untitled_ert_rtw/*.*;make -f all -C /home/debian/untitled_ert_rtw". Details:

STDERR: MW_digitalIO.c:29:21: fatal error: rc/gpio.h: No such file or directory
#include "rc/gpio.h"
compilation terminated.
make: *** [MW_digitalIO.c.o] Error 1

STDOUT: make: Entering directory '/home/debian/untitled_ert_rtw'
make: Leaving directory '/home/debian/untitled_ert_rtw'

I'm also having this issue. I couldn't find IMU sensor support from BeagleBone Blue Harware/Sensor. The only thing is showing up in the sensor catagory is the Encoder.

Has anyone found a solution for this?

Megh Doshi

The euler angles do not work for the dmp mode of the IMU, I'm not sure if this is an isolated issue, the acceleration works just fine but the euler angles and the quartenion angles always show 0 even after manual calibration.


I was wondering if can I connect the BBB via USB to deploy algorithms via the toolbox in Simulink, and simultaneously connect the 12V connector and / or the LiPo battery connector? This is because I need to power some sensors through the 5V source terminal (available on BBB). Thanks in advance

LJ Yan

I couldn't find IMU sensor support from BeagleBone Blue Harware/Sensor. The only thing is showing up in the sensor catagory is the Encoder. Do I need to also download the BeagleBone Black Driver for the IMU to work?


Daniel SG

I am getting a "not supported" error when trying to install it in Matlab 2017b Ubuntu 18. Any suggestions?

David Jasko

pls change it to accept the newest Kernel

Razek Zim

Is it indeed compatible with Ubuntu 16.04? It gives me an error (not supported) when I try to install it (on R2018b). Thanks.

I am having a problem using "Encoder" block in Matlab 2018b.
I use Encoder block in Matlab 2018a and it work properly. However since I need to send a digital signal out and it was not available in Matlab 2018a, I installed Matlab 2018b. I made sure the installation of Matlab 2018b and debian is correct by sending and receiving UDP signal from and to Beaglebone Blue. However the Encoder block is not working in Matlab 2018b. When I run a Simulink code containing the Encoder block, I get this error:

Build process completed successfully

A run-time error is encountered when running External mode simulation on the BeagleBone Blue hardware. This usually occurs when a hardware resource, such as a web camera, is not available or configured incorrectly. The log file, /home/debian/Encoder_Test_1_2018b.log, storing model diagnostic information on the BeagleBone Blue hardware has the following content:
Component:Simulink | Category:Model error

Many thanks

Pradeep KS

Hi Michele,
The error is due to incompatible roboticscape library version and Debian image on your BeagleBone Blue hardware. Simulink Coder support package for BeagleBlue hardware is compatible with below mentioned versions:

* Debian 8.7 image:
- Please follow the instructions here to prepare the SD card.

* Roboticscape library:
- Download roboticscape_0.3.4_armhf.deb Debian package on to BeagleBlue hardware.
- Go to folder on BBBlue where roboticscape_0.3.4_armhf.deb file is placed.
- To install, execute the command "sudo dpkg -i roboticscape_0.3.4_armhf.deb" in the BeagleBone blue SSH terminal.


Michele Xiloyannis

In function `beagleboneblue_gettingstarted_step':
beagleboneblue_gettingstarted.c:(.text+0x10e): undefined reference to `rc_set_led'
collect2: error: ld returned 1 exit status
make: *** [../beagleboneblue_gettingstarted.elf] Error 1

I keep getting this error, I tried installing older and newer versions of the Robot Control Library but it still won't run.
Did I miss something important?

Mohith Prabhu

Kurt Talke

Thomas Bewley

Giampiero Campa

MATLAB Release Compatibility
Created with R2017b
Compatible with R2017b to R2021a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!