Main Content

matlabshared.targetsdk.Deployer Class

Namespace: matlabshared.targetsdk

Application deployment configuration

Description

Use the Deployer class to represent a deployer used to deploy generated code to the Hardware that a Target supports.

Creation

deployerObj = matlabshared.targetsdk.Deployer(deployerName) returns a Deployer object H with the Name property set to deployerName.

Input Arguments

expand all

Name of the Deployer, specified as a character vector or string scalar.

This argument sets the Name property as a character vector.

Data Types: char | string

Properties

expand all

The name of the Deployer object. The creation function Deployer sets the Name property.

Example: 'MyDeployer'

Attributes:

GetAccess
public
SetAccess
immutable

Data Types: char | string

Registered names for the hardware, specified as a cell array of names. Use the and methods to add or delete Toolchain objects.

Example: {'GNU Tools for ARM Embedded Processors'}

Attributes:

GetAccess
public
SetAccess
public

Data Types: cell

names for the hardware, specified as a cell array of names. Use the and methods to add or delete Loader objects.

Example: {'loaderName'}

Attributes:

GetAccess
public
SetAccess
private

Data Types: cell

Include files to add into generated main.c or main.cpp file using the #include directive specified as a cell array of character vectors.

Example: {'blapp_support.h'}

Attributes:

GetAccess
public
SetAccess
public

Data Types: cell

MATLAB function to invoke after code is generated. The function must have this signature:

function onAfterCodeGen(hCS, buildInfo)
% Code to be called after code generation
end

Here, buildInfo is the RTW.BuildInfo build information object, and hCS is the configuration object.

Example: 'onAfterCodeGen'

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

Name of a MATLAB function to invoke at the start of a build. The function must have this signature:

function onBuildEntry(hCS, buildInfo)
% Code to be called after code generation
end

Here, buildInfo is the RTW.BuildInfo build information object, and hCS is the configuration object.

Example: 'onBuildEntry'

Attributes:

GetAccess
public
SetAccess
public

Data Types: char | string

The C/C++ source code functions that initialize hardware. Each function is called from the generated main file. Functions are assumed to take no input arguments.

Example: {'stm32f4xx_init_board()'}

Attributes:

GetAccess
public
SetAccess
public

Data Types: cell

Placeholder values in code to be replaced with specified string value during code generation. Each token structure contains two fields: Name and Value. Name is a string in the form $(SOME_NAME) that gets replaced during code generation by the Value string. Value must have one of these values:

  • Empty string — In this case, you must define an environment variable with the corresponding name (that is, SOME_NAME).

  • MATLAB function — The build process evaluates the function when the process encounters the token.

  • String — The string replaces Name.

deployerObj = matlabshared.targetsdk.Deployer('MyDeployer');
token.Name = 'MY_PI_VALUE';
token.Value = '3.1415926';
deployerObj.Tokens = {token}
deployerObj = 

  Deployer with properties:

                         Name: 'MyDeployer'
                   Toolchains: {}
                      Loaders: {}
             MainIncludeFiles: {}
                       Tokens: {[1×1 struct]}
                BuildEntryFcn: ''
              AfterCodeGenFcn: ''
    HardwareInitializationFcn: {}

Attributes:

GetAccess
public
SetAccess
public

Data Types: cell

Methods

expand all

Version History

Introduced in R2015a