Main Content

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.

  1. Open a Simulink® model.

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

  3. On the System on Chip tab, click Hardware Settings to open the Configuration Parameters window.

  4. On the Hardware Implementation > Target hardware resources > Board Configuration > Name parameter, select <Add new Board Configuration>.

  5. 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).

  6. 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. These step shows how to select this specialized toolchain.

  1. On the System on Chip tab, click Hardware Settings to open the Configuration Parameters window.

  2. On the Hardware Implementation > Target hardware resources > Board Configuration > Name parameter, select <Add new Board Configuration>.

  3. On the Code Generation pane, set Build process > Toolchain settings > Toolchain to the GCC Linaro for Embedded Linux (Remote) toolchain.

See Also

Related Topics