matlabshared.targetsdk.Target class

Package: matlabshared.targetsdk
Superclasses:

An object for the target being developed

Description

A Target object represents a target, which deploys MATLAB® and Simulink® designs to hardware. A target provides features for the hardware that it supports, such as processor-specific optimizations and board-level I/O device drivers.

Construction

Note

To construct a target object, use the createTarget function.

H = Target(targetName,referenceTarget,targetFolder) returns a matlabshared.targetsdk.Target object, H, with the Name property set to the string targetName, the ReferenceTargets property set to the string referenceTarget, the Folder property set to the string targetFolder. The function also creates a set of folders and files (also known as “framework”) in targetFolder that implements the target.

H = Target(targetName,referenceTarget,targetFolder) returns a Target object, H, with the Name property set to the string targetName, the ReferenceTargets property set to the string referenceTarget, the Folder property set to the string targetFolder. The Target object is initialized based on the reference Target object. The function also creates a set of folders and files (also known as “framework”) in targetFolder that implements the target.

Input Arguments

expand all

Name of target, specified as a string.

Data Types: char

Name of reference target, specified as a string.

Data Types: char

Name of root folder for the target, specified as a string.

Data Types: char

Properties

expand all

The name of the target being developed, specified as a string of display characters. The default is ''.

Data Types: char

The root folder of the target being developed. The folder must be given as full path. The default is ''.

Data Types: char

The reference target objects for the target being developed, specified as a cell array of objects. This is read-only property. The default is {}.

Data Types: cell

The DeployerDeployer objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

The BaremetalScheduler objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

The OperatingSystem objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

The PIL configuration objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

The ExternalMode configuration objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

The Profiler objects for the target being developed, specified as a cell array of objects. The default is {}.

Data Types: cell

Methods

addNewBaremetalSchedulerAdd new bare metal scheduler to the target
addNewDeployerAdd new deployer to the target
addNewExternalModeAdd new external mode configuration to the target
addNewOperatingSystemAdd new operating system to the target
addNewPILAdd processor-in-the-loop simulation configuration to target
addNewProfilerAdd new profiler to the target
deleteBaremetalSchedulerDelete bare metal scheduler from the target
deleteDeployerDelete deployer from the target
deleteExternalModeDelete external mode configuration from the target
deleteOperatingSystemDelete operating system from the target
deletePILDelete PIL configuration from the target
deleteProfilerDelete profiler from the target
getBaremetalSchedulerGet the bare metal schedulers for a target
getDeployerGet deployers configured for a target
getDisplayNameGet the display name of the hardware
getExternalModeGet the external mode configuration for a target
getFeatureGet the features for a target
getHardwareGet the hardware for a target
getOperatingSystemGet the operating systems for a target
getPILGet the Processor-In-the-Loop (PIL) configuration for a target
isMappedReturns true if feature is mapped to hardware
mapMap the feature and the hardware to the target
setDisplayNameSet the display name of the hardware
showShow the mapping between the features of the target and the hardware
unmapUnmap features from hardware or from target
validateDetermine whether target is valid

Examples

collapse all

Create a new target using ARM Cortex-M target as the reference target. Set the name of the new target to MyTarget and the root folder of the new target to c:/mytarget. Set the supported features and hardware the same way as in the reference target.

Execute the following command to construct an object, tgt, that represents the target.

hTgt = createTarget('My Target','ARM Cortex-M','c:/mytarget','initialize');

Execute the following command to see the features and the hardware supported by the target.

show(hTgt)
                                   
                                                     ARM Cortex-M3 (QEMU)      
Display Name                                            Temporary name         
GNU Tools for ARM Embedded Processors        0                 1               
SysTick Scheduler                            0                 1               
m0m1m0plus SysTick Scheduler                 0                 0               
CMSIS-RTOS RTX                               0                 0               
Ethernet PIL                                 0              TCP/IP             
Ethernet External mode                       0              TCP/IP 

Create a new target using ARM Cortex-M target as the reference target. Set the name of the new target to MyTarget and the root folder of the new target to c:/mytarget. Do not initialize the supported features and the hardware.

Execute the following command to construct an object, hTgt, that represents the target.

hTgt = createTarget('My Target','ARM Cortex-M','c:/mytarget');

Execute the following command to see the features and the hardware supported by the target.

show(hTgt)

No output displays since no features or hardware are initialized.

Introduced in R2015a