crossReleaseImport
Import generated model code from a previous release as SIL or PIL blocks
Syntax
Description
imports previously generated model component code into the current release. The
function imports the code as a cross-release block and returns the numeric handle of
the block. The function displays the block in a new model window.blockHandle
= crossReleaseImport(buildFolder
,configSetOrModel
,'SimulationMode',mode
)
In an existing model, you can replace the model component with the cross-release block.
If you set 'SimulationMode'
to, for example,
'SIL'
or 'PIL'
, the function imports the
code as a software-in-the-loop (SIL) or processor-in-the-loop (PIL) block. When you
run a simulation or build the model, the model component uses generated code from
the previous release.
To build a SIL or PIL block, the function by default uses the following parameters
of the Simulink® model specified by configSetOrModel
:
SystemTargetFile
Toolchain
orTemplateMakefile
ExistingSharedCode
PortableWordSizes
TargetLang
TargetLangStandard
TargetLibSuffix
ModelReferenceNumInstancesAllowed
Hardware Implementation pane parameters
If you set 'SimulationMode'
to 'none'
, the
function creates a Cross-Release Code Integration block, which:
Supports generation of code that calls the imported code.
Does not support normal, accelerator, or rapid accelerator mode simulations.
Does not compile the imported code.
You can use the Cross-Release Code Integration block, for example, in workflows where compilation occurs on a different computer.
uses additional configuration parameters for building the SIL or PIL block.blockHandle
= crossReleaseImport(buildFolder
,configSetOrModel
,'SimulationMode',mode
,'ConfigParams',additionalParameterList
)
imports generated code that uses data types specified by a data dictionary. If
blockHandle
= crossReleaseImport(buildFolder
,configSetOrModel
,'SimulationMode',mode
,'DataDictionary',dictionaryFile
)configSetOrModel
is a model associated with a data
dictionary, you do not have to specify the name-value pair. By default, the function
identifies and uses the data dictionary when it imports the generated code. If you
specify a name-value pair, the data dictionary that you specify takes precedence
over the default data dictionary.
imports generated model code with relocated custom code or modified include paths.
The paths specified by blockHandle
= crossReleaseImport(buildFolder
,configSetOrModel
,'SimulationMode',mode
,'OriginalPaths',originalPaths
,'ReplacementPaths',replacementPaths
)replacementPaths
override the original
custom code or include paths specified by originalPaths
in a
one-to-one manner. You cannot use replacementPaths
to specify
additional custom code or include paths.
names the generated SIL or PIL block
blockHandle
= crossReleaseImport(buildFolder
,configSetOrModel
,'SimulationMode',mode
,'SFunctionName',sFunctionName
)sFunctionName
_sil
or
sFunctionName
_pil
. Use the
sFunctionName
argument if the default block name produces
associated MATLAB® identifiers that are longer than 63 characters.