Select Toolchain and Build Options for an Embedded Linux Device
Before a model can be deployed to an embedded Linux® device, a valid Linux toolchain and corresponding build options must be selected. The following steps show the process to select a toolchain for a model to allow compilation of the generated code.
Open a Simulink® model.
On the Apps tab, click System on Chip (SoC). In the System on Chip (SoC) window, set Hardware Board to
Embedded Linux Board
. Click Finish.On the System on Chip tab, click Hardware Settings to open the Configuration Parameters window.
On the Hardware Implementation > Target hardware resources > Board Configuration > Name parameter, select
<Add new Board Configuration>
.On the Code Generation pane, set Build process > Toolchain settings > Toolchain to a valid embedded Linux toolchain.
Note
If an appropriate toolchain does not exist within the available selections, you can create and add a custom toolchain. For more information on adding custom toolchains, see Register Custom Toolchain and Build Executable (Embedded Coder).
Click OK to apply the new configuration to the model.
Some Linux systems use specific gcc
compiler versions and libraries. Any
application that runs on these systems must be compiled with the same version of the compiler.
The SoC Blockset™ Support Package for Embedded Linux Devices provides a specialized toolchain, that transfers the generated code onto the
device and uses the native gcc
compiler to remotely build the code on the
device. This step shows how to select this specialized toolchain.
On the System on Chip tab, click Hardware Settings to open the Configuration Parameters window.
On the Hardware Implementation > Target hardware resources > Board Configuration > Name parameter, select
<Add new Board Configuration>
.On the Code Generation pane, set Build process > Toolchain settings > Toolchain to the
GCC Linaro for Embedded Linux (Remote)
toolchain.