1 /*
2 * Copyright (c) 2008 Texas Instruments and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * Texas Instruments - initial implementation
10 *
11 * */
12 package xdc.tools.product;
13
14 /*!
15 * ======== IProductTemplate ========
16 * Interface to provide examples for a product
17 *
18 * This interface allows products to contribute examples to
19 * development environments like IDE's. This is an experimental
20 * interface and is subject to change.
21 */
22 metaonlyinterface IProductTemplate
23 {
24
25 /*!
26 * ======== FileDesc ========
27 * Structure defining properties of a file included in an example
28 *
29 * @field(path) Path to file relative to the package
30 * containing the implementation of
31 * `IProductTemplate`
32 * @field(excludeFromBuild) Flag indicating whether file
33 * should be excluded from build inside
34 * an IDE project
35 * @field(openOnCreation) Flag indicating whether the file
36 * should be opened when a project
37 * containing the example file is created
38 * by the IDE.
39 * @field(copyIntoConfiguration) Flag indicating whether the file
40 * should be copied into RTSC
41 * configuration. This flag
42 * applies only when the `isHybrid`
43 * flag of the {@link #TemplateInfo template} is set to
44 * `false`.
45 *
46 */
47 struct FileDesc {
48 String path; /*! Path to file */
49 Bool excludeFromBuild; /*! Indicates whether file should be
50 excluded from build
51 */
52 Bool openOnCreation; /*! Indicates whether file should be
53 opened on project creation
54 */
55 Bool copyIntoConfiguration; /*! Indicates whether file should be
56 * copied into RTSC configuration
57 */
58 };
59
60 /*!
61 * ======== Filter ========
62 * Structure defining filter properties for an example
63 *
64 * This structure allows example providers to define
65 * constraints for their examples.
66 * IDEs may use the `Filter` properties of an example
67 * to decide whether the example should be presented to the user.
68 *
69 * The filter is evaluated by performing an 'AND' operation
70 * on its individual elements. In other words all the defined
71 * elements must evaluate to `true` for the filter to evaluate
72 * to `true`.
73 *
74 * Example {@link #TemplateInfo providers} typically define an
75 * array of filters. The filter array is evaluated using the 'OR' operation.
76 *
77 * The filter allows the user to define the NOT property by
78 * inserting a "~" character at the start of the string. For
79 * example if the deviceFamily field is set to "~MSP430" the example
80 * will be displayed for all device families except MSP430.
81 *
82 * @field(deviceFamily) String indicating the device family
83 * eg. "MSP430","C6000"
84 * @field(deviceVariant) String indicating device variant
85 * eg. "C674X", "CortexA8"
86 * @field(deviceId) String indicating the device part number
87 * eg. "TMS320C6747"
88 * @field(endianness) String indicating the device endianness
89 * eg. "little", "big"
90 * @field(toolChain) String indicating the tool chain
91 * eg. "TI", "GNU"
92 * @field(outputFormat) String indicating the object file format
93 * eg. "COFF", "ELF"
94 */
95 struct Filter {
96 String deviceFamily;
97 String deviceVariant;
98 String deviceId;
99 String endianness;
100 String toolChain;
101 String outputFormat;
102 };
103
104 /*!
105 * ======== TemplateInfo ========
106 * TemplateInfo structure
107 *
108 * @field(title) String containing the title of the template
109 * @field(fileList) Array of {@link #FileDesc} defining the
110 * properties of the files contributed by this example.
111 * @field(description) String containing description of example
112 * @field(target) String containing RTSC target
113 * @field(platform) String containing RTSC platform
114 * @field(buildProfile) String containing RTSC build profile
115 * @field(linkerCommandFile) Linker command file for the example. If
116 * this is set to the empty string then no
117 * linker command file is added by the IDE
118 * to the example. If this is not defined
119 * then the wizard picks the default
120 * linker command file for the selected device.
121 * @field(requiredProducts) Products required to build this
122 * example. Products are identified by
123 * their globally unique
124 * {@link xdc.tools.product.IProduct#id}
125 * eg. 'com.ti.bios'. Dependency on a
126 * minimum version of a product maybe
127 * defined in the following manner
128 * : <product-id>:<min-version>
129 * @field(groups) Array of strings referring example groups
130 * that a particular example may
131 * belong. Example providers may want to
132 * provide examples that are part of an
133 * existing example group eg."Empty Projects"
134 * that are defined elsewhere. The
135 * groups are identified by an unique id.
136 * @field(configOnly) Flag indicating to the IDE
137 * whether example contributes only
138 * to a RTSC configuration project.
139 * @field(configuroOptions) This string contains options that are passed
140 * to `xdc.tools.configuro`. You must be
141 * careful to quote embedded special characters
142 * in this string in such a way that they can
143 * be directly embedded in an XML file. For
144 * example, to pass '-foo "bar"' to `configuro`
145 * you must use the string
146 * '-foo "bar"'.
147 *
148 * @field(isHybrid) Flag indicating to the IDE
149 * whether example contains RTSC
150 * configuration and target
151 * content files in one project.
152 * If this field is set to `true`
153 * then the IDE consuming this example will
154 * create one project with all the
155 * files. Otherwise multiple projects will
156 * be created - one containing the
157 * target content and the other containing
158 * the RTSC configuration files. This flag
159 * is applies only when `configOnly`
160 * flag is set to `false`.
161 * @field(filterArr) Array of {@link #Filter}. Used to specify
162 * the constraints for a particular
163 * example. The filter array is evaluated using
164 * an OR operation on the individual array
165 * elements. Note that individual elements
166 * within a {@link #Filter filter} is evaluated
167 * with the 'AND' operation.
168 *
169 */
170 struct TemplateInfo {
171 String title; /*! Title of example */
172 FileDesc fileList[]; /*! List of files along with properties
173 * for example
174 */
175 String description; /*! Description of example */
176 String target; /*! RTSC target */
177 String platform; /*! RTSC platform */
178 String buildProfile; /*! RTSC build profile */
179 String linkerCommandFile; /*! Linker command file for the example */
180 String requiredProducts[]; /*! List of products required to build
181 * this example
182 */
183 String groups[]; /*! Array of group ids */
184 Bool legacyTcf;
185 String configuroOptions; /*! configuro options */
186 Bool configOnly; /*! Indicates whether only a RTSC
187 * configuration project should
188 * be created for this example.
189 */
190 Bool isHybrid; /*! Indicates whether application and
191 * configuration content exists in
192 * one project
193 */
194 Filter filterArr[]; /*! Array of filters for example */
195 };
196
197
198 /*!
199 * ======== TemplateGroup ========
200 * TemplateGroup structure
201 *
202 * This structure maybe used to define a hierarchy of examples
203 * for the product. Examples maybe logically organized into groups
204 * with an unique `id` and may specify membership of other groups
205 * by referring to their ids in the `groups` array. In this manner
206 * the example producer can define a tree topology of examples for
207 * their product. Once the template groups are defined the
208 * individual examples may specify their membership of a template
209 * group in the `groups` array of {@link #TemplateInfo}. The example
210 * provider may specify all the defined groups for their product in
211 * {@link #templateGroupArr}.
212 *
213 * @field(id) Unique id for the template group
214 * @field(name) Name of the group
215 * @field(description) Description of the group
216 * @field(groups) Array of group ids used to specify
217 * membership of other groups.
218 *
219 */
220
221 struct TemplateGroup {
222 String id;
223 String name;
224 String description;
225 String groups[];
226 };
227
228
229 /*!
230 * ======== templateArr ========
231 * Examples contained in the product
232 *
233 */
234 config TemplateInfo templateArr[];
235
236
237 /*!
238 * ======== templateGroupArr ========
239 * Array fo template group ids
240 *
241 * This maybe optionally specified by example providers who want to
242 * organize their examples in groups.
243 */
244
245 config TemplateGroup templateGroupArr[] = [];
246
247 }
248 /*
249 * @(#) xdc.tools.product; 1, 0, 0,56; 6-8-2011 13:26:51; /db/ztree/library/trees/xdctools/xdctools-e17x/src/
250 */
251