Main Content

validate

Class: coder.make.BuildTool
Package: coder.make

Validate build tool properties

Syntax

validtool = h.validate

Description

validtool = h.validate validates the coder.make.BuildTool object, and generates errors if any properties are incorrectly defined.

Input Arguments

expand all

Object handle for a coder.make.BuildTool object, specified as a variable.

Example: tool

Output Arguments

expand all

The validity of the coder.make.BuildTool object. If the method detects a problem it returns '0' or an error message.

Examples

The coder.make.BuildTool.validate method returns warning and error messages if you try to validate a build tool before you have installed the build tool software (compiler, linker, archiver).

Starting from the Add Custom Toolchains to MATLAB® Coder™ Build Process example, enter the following lines:

tc = intel_tc;
tool = tc.getBuildTool('C Compiler');
tool.validate

If your host computer does not have the Intel® toolchain installed, validate displays the following messages:

Warning: Validation of build tool 'Intel C Compiler' may require the toolchain
to be set up first. The setup information is registered in the toolchain
this build tool belong to. Pass the parent ToolchainInfo object to VALIDATE
in order for any toolchain setup to be done before validation. 
> In C:\Program Files\MATLAB\R2013a\toolbox\coder\foundation\build\+coder\+make\
BuildTool.p>BuildTool.checkForPresence at 634
  In C:\Program Files\MATLAB\R2013a\toolbox\coder\foundation\build\+coder\+make\
BuildTool.p>BuildTool.validate at 430 
Error using message
In 'CoderFoundation:toolchain:ValidateBuildToolError',data type supplied is
incorrect for parameter {1}.

Error in C:\Program
Files\MATLAB\R2013a\toolbox\coder\foundation\build\+coder\+make\
BuildTool.p>BuildTool.checkForPresence
(line 664)


Error in C:\Program
Files\MATLAB\R2013a\toolbox\coder\foundation\build\+coder\+make\
BuildTool.p>BuildTool.validate
(line 430)

 
Trial>> 

For more information, see Troubleshooting Custom Toolchain Validation.