Custom Target Optional Features - MATLAB & Simulink (original) (raw)
Main Content
This section describes how to configure a custom embedded target to support these optional features.
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 functionSelectCallback
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.