Build and Run an Executable on BeagleBone Blue Hardware
You can configure a Simulink® model to generate code, build an executable, and then run the executable in the Linux® environment on your BeagleBone® Blue hardware.
Step 1: Configure the Code Generation of the Simulink Model
Open model in the Simulink editor and select Simulation > Model Configuration Parameters.
In the Configuration Parameters dialog box, select Hardware Implementation.
Set the Hardware board parameter to
BeagleBone Blue
. This selection automatically populates the parameters in the Hardware board settings with the default values for the BeagleBone Blue hardware.In the Configuration Parameters dialog box, select Code Generation.
The System target file parameter is set to
ert.tlc
. Theert.tlc
file updates the model configuration parameters with the default values for BeagleBone Blue. For example, the Toolchain parameter now specifiesGNU GCC BeagleBone Blue
as the toolchain for the build process.To save your changes to the model and close the Configuration Parameters dialog box, click OK.
Step 2: Build and Run the Executable
If your computer connects to multiple BeagleBone Blue boards, disconnect the unused boards.
Click Build Model. Alternatively, select Code > C/C++ Code > Build Model or press
Ctrl+B
.By default, the build action for the model is set to
Build, load, and run
.The executable runs in the Linux environment on the BeagleBone Blue hardware.
Tip
If a connection error occurs during the build process, in the Command Window, enter:
bbblue = beagleboneblue
Use this command to ensure that the Secure Shell (SSH) server on the BeagleBone Blue hardware is still connected.
If the SSH server on the BeagleBone Blue hardware refuses the connection, the SSH has stopped working. Restart the BeagleBone Blue hardware and build the model again, as described in Stop or Restart an Executable Running on BeagleBone Blue Hardware.