Main Content

Custom Target Optional Features

This section describes how to configure a custom embedded target to support these optional features.

To ...Use Target Configuration Parameters ...For more information, see ...
Indicate a custom target is toolchain-compliantUseToolchainInfoCompliant
GenerateMakefile
Support Toolchain Approach with Custom Target
Build a model that includes referenced models and uses a custom targetModelReferenceCompliant
ParMdlRefBuildCompliant (parallel build support)
Support Model Referencing
Control the compiler optimization level building generated code for a custom targetCompOptLevelCompliantSupport Compiler Optimization Level Control
Control C function prototypes of initialize and step functions that are generated for a model that uses a custom targetModelStepFunctionPrototypeControlCompliant (ERT only)Support C Function Prototype Control
Control C++ class interfaces that are generated for a model that uses a custom targetCPPClassGenCompliant (ERT only)Support C++ Class Interface Control
Enable concurrent execution of multiple tasks on a multicore platform for a model that uses a custom targetConcurrentExecutionCompliantSupport Concurrent Execution of Multiple Tasks

The required configuration changes are modifications to your system target file, and in some cases also modifications to your template makefile (TMF) or your custom static main program.

The API for system target file callbacks provides a function SelectCallback for use in system target files. SelectCallback is associated with the target rather than with its individual options. If you implement a SelectCallback function for a target, it is triggered whenever the user selects the target in the System Target File Browser.

The API provides the functions slConfigUIGetVal, slConfigUISetEnabled, and slConfigUISetVal for controlling custom target configuration options from a user-written SelectCallback function. (For function descriptions and examples, see the function reference pages.)

The general requirements for supporting one of the optional features include:

  • To support model referencing or compiler optimization level control, the target must be derived from the GRT or the ERT target. To support C function prototype control or C++ class interface control, the target must be derived from the ERT target.

  • The system target file must declare feature compliance by including one of the target configuration parameters listed above in a SelectCallback function call.

  • Additional changes such as TMF modifications or static main program modifications may be required, depending on the feature. See the detailed steps in the subsections for individual features.

For an example that shows how to configure custom target optional features, see Customize System Target Files.

Related Topics