Main Content

Create and Edit Toolchain Definition File

This example shows how to create a toolchain definition file by copying and pasting an example file. You then update the relevant elements, and add or remove other elements as needed for your custom toolchain. This is the first step in the typical workflow for creating and using a custom toolchain definition. For more information about the workflow, see Typical Workflow.

  1. Review the list of registered toolchains. In the MATLAB® Command Window, enter:


    The resulting output includes the list of factory toolchains for your development computer environment, and previously-registered custom toolchains.

  2. Create the folder of example files by opening the Add Custom Toolchains to MATLAB® Coder™ Build Process example.

  3. Copy the example toolchain definition file to another location and rename it. For example:


  4. Open the new toolchain definition file in the MATLAB Editor. For example:

    cd ../
    edit newtoolchn_tc.m

  5. Edit the contents of the new toolchain definition file, providing information for the custom toolchain.

    For expanded commentary on an example toolchain definition file, see Toolchain Definition File with Commentary.

    For reference information about the class attributes and methods you can use in the toolchain definition file, see coder.make.ToolchainInfo.

  6. Save your changes to the toolchain definition file.

Next, create and validate a coder.make.ToolchainInfo object from the toolchain definition file, as described in Create and Validate ToolchainInfo Object