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;
    };
 
        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;
    };
module-wide config parameters
}
 
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
    Bool excludeFromBuild;
    // exclude from build
    Bool openOnCreation;
    // open on project creation
    Bool copyIntoConfiguration;
    // copy into RTSC configuration
};
 
FIELDS
path — Path to file relative to the package containing the implementation of IProductTemplate
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.
 
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 below 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 an 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
    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
    String buildProfile;
    // RTSC build profile
    String linkerCommandFile;
    // Linker command file for this example
    String compilerBuildOptions;
    // Special compiler options for this example
    String linkerBuildOptions;
    // Special linker options for this example
    String requiredProducts[];
    // List of products required to build this example
    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
    IProductTemplate.Filter filterArr[];
    // Array of filters for this example
};
 
FIELDS
title — String containing the title of the 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>
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 is 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.
 
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 Thu, 23 Aug 2012 18:50:51 GMT