Main Content

createTarget

Create an object for the target being developed

Description

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

H = createTarget(targetName,referenceTarget,targetFolder,'initialize') returns a Target object, H, with the Name property set to targetName, the ReferenceTarget property set to referenceTarget, the Folder property set to 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.

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.

example

Examples

collapse all

Create a new target using the ARM Cortex-R target as a 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. To construct an object, targetObj, representing the target, execute the following code:

targetObj = createTarget('MyTarget','ARM Cortex-R','c:/mytarget');

To see the features and hardware supported by the target, execute the following code:

show(targetObj)

Since no features or hardware were initialized, no output is displayed to the screen.

Input Arguments

collapse 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

Output Arguments

collapse all

Handle to Target object.

Version History

Introduced in R2015a