soc.sdk.Deployer Class
Namespace: soc.sdk
Application deployment configuration
Description
Use the soc.sdk.Deployer
class to define the tool and software used to
deploy generated code to a hardware board.
Creation
creates a deployerObj
= Deployer(name
)Deployer
object and sets the Name
property to name
.
Properties
Name
— Name of Deployer
object
character vector
Name of the Deployer
object, specified as a character
vector.
Example: 'MyDeployer'
Attributes:
GetAccess | public |
SetAccess | immutable |
Data Types: char
Toolchains
— Toolchain
objects
Toolchain
object | cell array of Toolchain
objects
Toolchain
objects, specified as an soc.sdk.Toolchain
object
or cell array of soc.sdk.Toolchain
objects. The
Deployer
object uses the objects in this property to
compile generated code into an executable. Use the addNewToolchain
and
removeToolchain
methods to
add or remove Toolchain
objects, respectively.
Example: {'toolchainObj'}
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: cell
Loaders
— Loader
objects
{}
(default) | cell array of Loader
objects
Loader
objects for the hardware, specified as a cell
array of soc.sdk.Loader
objects.
Use the addNewLoader
and removeLoader
methods to
add or remove Loader
objects, respectively.
Example: {loaderObj}
Attributes:
GetAccess | public |
SetAccess | private |
Data Types: cell array
MainIncludeFiles
— Files to include in generated main file
{}
(default) | cell array of file names
Files to include in generated main.c
or
main.cpp
file using the #include
directive, specified as a cell array of file names.
Example: {'blapp_support.h'}
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: cell
AfterCodeGenFcn
— MATLAB® function to invoke after code is generated
''
(default) | character vector
MATLAB function to invoke after code is generated, specified as a character vector. The specified function requires this signature.
function onAfterCodeGen(hCS,buildInfo) % Add code to be called after code generation. end
In this signature, the buildInfo
argument is an
RTW.BuildInfo
build information object, and the
hCS
argument is the coder configuration
object.
Example: 'onAfterCodeGen'
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char
BuildEntryFcn
— MATLAB function to invoke at start of build
''
(default) | character vector
MATLAB function to invoke at start of build, specified as a character vector. The specified function requires this signature.
function onBuildEntry(hCS, buildInfo) % Add here code to be called after code generation. end
In this signature, the buildInfo
argument is an
RTW.BuildInfo
build information object, and the
hCS
argument is the coder configuration
object.
Example: 'onBuildEntry'
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: char
HardwareInitializationFcn
— Source code functions that initialize hardware
{}
(default) | cell array of character vectors
Source code functions that initialize hardware, specified as a cell array
of 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 array
Tokens
— Placeholder to be replaced by a complete argument during code generation
{}
(default) | cell array of structures
Placeholder to be replaced by a complete argument during code generation,
specified as a cell array of token structures. Each token structure contains
two fields: Name
and Value
. In the
generated code, Name
becomes a string in form
$(
that gets
replaced during code generation by the NAME
)Value
string. You
must set Value
as one of these options.
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
.
For example, the following code shows the addition of the token with
Name
of MY_PI_VALUE
. During code
generation, MY_PI_VALUE
will be replaced by the value
3.1415926
.
deployerObj = soc.sdk.Deployer('MyDeployer'); token.Name = 'MY_PI_VALUE'; token.Value = '3.1415926'; deployerObj.Tokens = {token}
deployerObj = Deployer with properties: SynthesisTools: {} BitstreamLoaders: {} Name: 'MyDeployer' Toolchains: {} Loaders: {} MainIncludeFiles: {} Tokens: {[1×1 struct]} BuildEntryFcn: '' AfterCodeGenFcn: '' HardwareInitializationFcn: {}
Attributes:
GetAccess | public |
SetAccess | public |
Data Types: cell
Methods
Public Methods
addNewToolchain | Add a registered Toolchain to the Deployer
object |
removeToolchain | Remove toolchain from Deployer object |
addNewLoader | Add new loader to Deployer object |
removeLoader | Remove loader from the deployer object |
Version History
Introduced in R2019b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)