metaonly interface xdc.tools.product.IProductTemplate

Interface to provide examples for a product

This interface allows products to contribute examples to development environments like IDE's. This is an experimental interface and is subject to change.
XDCspec summary sourced in xdc/tools/product/IProductTemplate.xdc
metaonly interface IProductTemplate {  ...
XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
 
metaonly interface IProductTemplate {
module-wide constants & types
    };
 
        String path// path to file or folder;
    };
 
        String deviceFamily;
        String deviceVariant;
        String deviceId;
        String endianness;
        String toolChain;
        String outputFormat;
    };
 
    metaonly struct TemplateGroup// TemplateGroup structure {
        String id;
        String name;
        String description;
        String groups[];
    };
 
    metaonly struct TemplateInfo// TemplateInfo structure {
        String title// Title of this example;
        String target// RTSC target;
        String platform// RTSC platform;
        String buildProfile// RTSC build profile;
        Bool legacyTcf;
        String configuroOptions// configuro options;
        String options// Comma separated attributes;
    };
module-wide config parameters
}
 
struct IProductTemplate.Board

Structure defining properties of a board used in the example

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
metaonly struct Board {
    String tiCloudName;
    // name used in TI Cloud TIREX
};
 
FIELDS
tirexName — TIREX on Cloud recognizes board under its previously defined name. We have to use these names to get the tree structure that uses the names.
 
struct IProductTemplate.FileDesc

Structure defining properties of a file included in an example

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
metaonly struct FileDesc {
    String path;
    // path to file or folder
    Bool excludeFromBuild;
    // exclude from build
    Bool openOnCreation;
    // open on project creation
    Bool copyIntoConfiguration;
    // copy into RTSC configuration
    String action;
    // Flag indicating whether the file should be copied into the project or linked to
    String targetDirectory;
    // directory into which the path file/folder should be copied into
};
 
FIELDS
path — Path to file or folder relative to the package containing the implementation of IProductTemplate. If the path points to a file then the file is copied or linked into the project. If the path points to a directory then the entire directory and contents are copied into the project.
excludeFromBuild — Flag indicating whether file should be excluded from build inside an IDE project
openOnCreation — Flag indicating whether the file should be opened when a project containing the example file is created by the IDE.
copyIntoConfiguration — Flag indicating whether the file should be copied into RTSC configuration. This flag applies only when the isHybrid flag of the template is set to false.
action — Flag indicating whether the file should be copied into the project or linked in. For example, the trexgen tool recognizes the following flags: "COPY" - copy the file into the project "LINK" - link the file into the project
targetDirectory — The file or folder from the path field will be copied into this target directory within the project folder.
 
struct IProductTemplate.Filter

Structure defining filter properties for an example

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
metaonly struct Filter {
    String deviceFamily;
    String deviceVariant;
    String deviceId;
    String endianness;
    String toolChain;
    String outputFormat;
};
 
FIELDS
deviceFamily — String indicating the device family eg. "MSP430","C6000"
deviceVariant — String indicating device variant eg. "C674X", "CortexA8"
deviceId — String indicating the device part number eg. "TMS320C6747"
endianness — String indicating the device endianness eg. "little", "big"
toolChain — String indicating the tool chain eg. "TI", "GNU"
outputFormat — String indicating the object file format eg. "COFF", "ELF"
DETAILS
This structure allows products to define constraints for their examples. IDEs use the Filter properties of an example to decide whether the example should be presented to the user.
The filter is evaluated by performing an 'AND' operation on its individual elements. In other words, all the defined elements must evaluate to true for the filter to evaluate to true.
Each example typically defines an array of more than one filter; see TemplateInfo.filterArr. This filter array is evaluated using the 'OR' operation. In other words, the example is presented to the user when any one of the filters evaluate to true.
Each filter property can be an arbitrary Java regular expression. In addition, each allows the user to define the NOT property by inserting a "~" character at the start of the string. For example, if the deviceFamily field is set to "~MSP430", the example will be displayed for all device families except "MSP430".
 
struct IProductTemplate.TemplateGroup

TemplateGroup structure

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
metaonly struct TemplateGroup {
    String id;
    String name;
    String description;
    String groups[];
};
 
FIELDS
id — Unique id for the template group
name — Name of the group
description — Description of the group
groups — Array of group ids used to specify membership of other groups.
DETAILS
This structure may be used to define a hierarchy of examples for the product. Examples may be logically organized into groups with a unique id and may specify membership of other groups by referring to their ids in the groups array. In this manner, the example producer can define a tree topology of examples for their product. Once the template groups are defined, the individual examples may specify their membership within a template group in the groups array of TemplateInfo. The example provider may specify all the defined groups for their product in templateGroupArr.
 
struct IProductTemplate.TemplateInfo

TemplateInfo structure

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
metaonly struct TemplateInfo {
    String title;
    // Title of this example
    String name;
    // Name of the project imported from this template
    IProductTemplate.FileDesc fileList[];
    // List of files along with properties for this example
    String description;
    // Description of this example
    String target;
    // RTSC target
    String platform;
    // RTSC platform
    IProductTemplate.Board board;
    // Properties of the board
    String buildProfile;
    // RTSC build profile
    String linkerCommandFile;
    // Linker file for this example
    String compilerBuildOptions;
    // Special compiler options
    String linkerBuildOptions;
    // Special linker options
    String requiredProducts[];
    // List of products required to build this example
    String xdcToolsVersion;
    // Version of xdctools this template requires eg. '3.24.6.63'
    String groups[];
    // Array of group ids for groups containing this example
    Bool legacyTcf;
    String configuroOptions;
    // configuro options
    Bool configOnly;
    // Indicates whether only a RTSC configuration project should be created for this example
    Bool isHybrid;
    // Indicates whether application and configuration content exists in one project
    Bool isFragment;
    // Indicates whether this template can be applied "incrementally" to an already existing project
    IProductTemplate.Filter filterArr[];
    // Array of filters for this example
    Bool ignoreDefaults;
    // Indicates if settings from the device XML file are ignored
    String options;
    // Comma separated attributes
    String references;
    // Comma separated list of referenced project names
    String buildCommandFlags;
    // Comma seperated list of build-command flags
    Bool launchWizard;
    // Flag indicating to launch the New Project Wizard allowing the user to adjust the details
    String preBuildStep;
    // Shell cmd to run before the build. Cmd is run within the debug/release directory
    String postBuildStep;
    // Shell cmd to run after the build. Cmd is run within the debug/release directory
    String projectType;
    // type of project. If this field is not set, a default will be used that is based on other settings. If it is set to "ccs", the project will be a "Code Composer Studio" project
    String outputType;
    // type of output produced by this project: "executable" or "staticLibrary", or "any". The "any" type indicates that this project template applies to type of output, executable, library, etc
};
 
FIELDS
title — String containing the title of the template
name — String containing the name of the project created from this template
fileList — Array of FileDesc defining the properties of the files contributed by this example.
description — String containing description of example
target — String containing RTSC target
platform — String containing RTSC platform
buildProfile — String containing RTSC build profile
linkerCommandFile — Linker command file for the example. If this is set to the empty string then no linker command file is added by the IDE to the example. If this is not defined, then the wizard picks the default linker command file for the selected device.
compilerBuildOptions — Special compiler options required to build template. For example the template may need special -I and -D options to build and these may be specified here.
linkerBuildOptions — Special linker options to build template
requiredProducts — Products required to build this example. Products are identified by their globally unique xdc.tools.product.IProduct.id eg. 'com.ti.bios'. Dependency on a minimum version of a product may be defined in the following manner : <product-id>:<min-version>
xdcToolsVersion — String containing XDCTools the exact version required eg. '3.24.6.63'. Note that this number must be an 'eclipse' version number: no leading 0's in the first three segments and the forth is treated as an arbitrary string.
If this string is undefined, any version of XDCtools will be allowed.
If the exact version doesn't exist for some reason, the project will still be created, but the project will give a 'this version of XDCtools doesn't exist' warning. The user can then select a version that is hopefully compatible.
groups — Array of strings referring example groups that a particular example may belong. Products may provide examples that are part of an existing example group eg."Empty Projects" that are defined elsewhere. The groups are identified by an unique id.
configOnly — Flag indicating to the IDE whether example contributes only to a RTSC configuration project.
configuroOptions — This string contains options that are passed to xdc.tools.configuro. You must be careful to quote embedded special characters in this string in such a way that they can be directly embedded in an XML file. For example, to pass '-foo "bar"' to configuro you must use the string '-foo &quot;bar&quot;'.
isHybrid — Flag indicating to the IDE whether example contains RTSC configuration and target content files in one project. If this field is set to true, then the IDE consuming this example will create one project with all the files. Otherwise, multiple projects will be created - one containing the target content and the other containing the RTSC configuration files. This flag applies only when configOnly flag is set to false.
filterArr — Array of Filter. Used to specify the constraints for a particular example. The filter array is evaluated using an OR operation on the individual array elements. Note that individual elements within a filter is evaluated with the 'AND' operation.
ignoreDefaults — Property filter commonly specifies a device. Each device has an XML file with default settings, which are applied to a project, in addition to properties specified here. Whe this parameter is set to 'true', these default options are ignored.
options — Comma separated list of options used to specify various configurable items for this template. For example, the trexgen tool recognizes the following flags: "NPW" - display this example in the New Project Wizard, and "TREX" - display this example in the Resource Explorer
references — Comma separated list of referenced project names
buildCommandFlags — Comma separated list of build-command flags.
launchWizard — Flag indicating to launch the New Project wizard allowing the user to adjust the details.
preBuildStep — Shell cmd to run before the build. Cmd is run within the debug/release directory
postBuildStep — Shell cmd to run after the build. Cmd is run within the debug/release directory
 
config IProductTemplate.templateArr  // module-wide

Examples contained in the product

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
config IProductTemplate.TemplateInfo templateArr[];
 
 
config IProductTemplate.templateGroupArr  // module-wide

Array of template group ids

XDCspec declarations sourced in xdc/tools/product/IProductTemplate.xdc
config IProductTemplate.TemplateGroup templateGroupArr[] = [ ];
 
DETAILS
This array may be optionally specified by Products that organize their examples into groups.
generated on Wed, 09 Aug 2017 16:38:22 GMT