1 /*
2 * Copyright 2012 by Texas Instruments Incorporated.
3 *
4 */
5
6 /*!
7 * ======== Main ========
8 * Command-line tool for generating projectspec files for RTSC content
9 *
10 * The `trexgen` tool allows RTSC content producers to
11 * create projectspec files that allows their content to be
12 * integrated in the CCS Resource Explorer environment. As input,
13 * the tool requires
14 * @p(blist) 15 * - a RTSC module implementing {@link xdc.tools.product.IProduct}
16 * @p 17 * Refer to {@link ./doc-files/ExampleProduct.xdc ExampleProduct}
18 * for an implementation of {@link xdc.tools.product.IProduct IProduct}.
19 *
20 * The tool generates starter examples that will showup
21 * in the Resource explorer. This is accomplished by implementing
22 * {@link xdc.tools.product.IProductTemplate IProductTemplate} and setting
23 * the {@link xdc.tools.product.IProduct#templateModule templateModule}
24 * configuration parameter of the {@link xdc.tools.product.IProduct IProduct}
25 * implementation to the name of the implementation module.
26 * Refer to {@link ./doc-files/Examples.xdc Examples}
27 * for a sample implementation of {@link 28 * xdc.tools.product.IProductTemplate IProductTemplate}.
29 *
30 * The tool operates on a product that is either specified by the `-p`
31 * option or is present in the folder from which the tool is executed.
32 * The tool will create the resources sub-folder in the output directory
33 * specified with `-o` option. If the `-o`
34 * option is not specified the resources is created in the product root
35 * directory.
36 *
37 * The tool will search the repositories specified in the module
38 * implementing {@link xdc.tools.product.IProduct} for RTSC platforms.
39 * This search can be disabled by specifying the`--disable_repo_search`
40 * option. The user needs to ensure that the repositories are installed
41 * in the product root directory before using the tool.
42 *
43 * @a(Example) 44 * @p(code) 45 * xs xdc.tools.product.trexgen
46 * -p exampleprod_1_0_0_00
47 * -m xdc.tools.product.plugingen.examples.ExampleProduct
48 * @p 49 */
50 metaonlymodule Main inherits xdc.tools.ICmd
51 {
52 overrideconfig String usage[] = [
53 '[-p product_root_directory]',
54 ' -m module',
55 '[-o outdir]'
56 ];
57
58 instance:
59
60 /*!
61 * ======== productDir ========
62 * Product root directory
63 *
64 * This option names the product root directory that is used by the
65 * tool to generate the projectspec files. For example, it's declared
66 * repositories are added to the package path and are searched for
67 * contributed platforms.
68 *
69 * If the '-o' option is not specified, the tool generates the resources
70 * directory in the product root directory.
71 *
72 * If this option is not specified, the product root directory is
73 * assumed to be `./`.
74 *
75 */
76 @CommandOption("p")
77 config String productDir = "./";
78
79 /*!
80 * ======== productModule ========
81 * Input description of the plug-in to be specified
82 *
83 * This required option names a module that implements
84 * `{@link xdc.tools.product.IProduct}`.
85 */
86 @CommandOption("m")
87 config String productModule;
88
89 /*!
90 * ======== outputDir ========
91 * Output directory in which the plugin will be generated.
92 *
93 * This option names the directory in which the project spec
94 * will be generated in a sub-directory named `eclipse`.
95 * If this option is not specified the tool will generate
96 * the plugin in the product root directory specified with
97 * the '-p' option.
98 */
99 @CommandOption("o")
100 config String outputDir = null;
101
102 /*!
103 * ======== generationFormat ========
104 * Plugin generation format
105 */
106 @CommandOption("generation_format")
107 config String generationFormat = null;
108
109 /*!
110 * ======== run ========
111 */
112 override Any run(xdc.tools.Cmdr.Instance cmdr, String args[]);
113 }
114 /*
115 * @(#) xdc.tools.product.trexgen; 1, 0, 0,3; 8-27-2012 11:53:22; /db/ztree/library/trees/xdctools/xdctools-f15x/src/
116 */
117