Create and Validate ToolchainInfo Object
This example shows how to create and validate a coder.make.ToolchainInfo object from the toolchain definition file.
Before you create and validate a ToolchainInfo object, create and edit a toolchain definition file, as described in Create and Edit Toolchain Definition File.
Use the function defined by the toolchain definition file to create a
coder.make.ToolchainInfoobject and assign the object to a handle. For example, the MATLAB® Command Window, enter:tc = newtoolchn_tc
Use the
coder.make.ToolchainInfo.validatemethod with thecoder.make.ToolchainInfoobject. For example, enter:tc.validate
If the
coder.make.ToolchainInfoobject contains errors, the validation method displays error messages in the MATLAB Command Window.Search the toolchain definition file for items named in the error message (without quotes) and update the values.
Repeat the process of creating and validating the
ToolchainInfoobject until there are no more errors.
Next, register the custom toolchain, as described in Register the Custom Toolchain.
For more information, see Troubleshooting Custom Toolchain Validation.