Main Content

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

  1. Open model in the Simulink editor and select Simulation > Model Configuration Parameters.

  2. In the Configuration Parameters dialog box, select Hardware Implementation.

  3. 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.

  4. In the Configuration Parameters dialog box, select Code Generation.

    The System target file parameter is set to ert.tlc. The ert.tlc file updates the model configuration parameters with the default values for BeagleBone Blue. For example, the Toolchain parameter now specifies GNU GCC BeagleBone Blue as the toolchain for the build process.

  5. To save your changes to the model and close the Configuration Parameters dialog box, click OK.

Step 2: Build and Run the Executable

  1. If your computer connects to multiple BeagleBone Blue boards, disconnect the unused boards.

  2. 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.