1 2 3 4 5 6 7 8 9 10 11
12 13 14 15
16
17 /*!
18 * ======== T16 ========
19 * TI T16 default runtime model (little endian)
20 */
21 metaonly module T16 inherits ITarget {
22 override readonly config string name = "T16";
23 override readonly config string suffix = "et16";
24 override readonly config string isa = "t16";
25 override readonly config xdc.bld.ITarget.Model model = {
26 endian: "little"
27 };
28 override readonly config string rts = "ti.targets.elf.rtst16";
29 override config string platform = "ti.platforms.simT16";
30
31 override readonly config xdc.bld.ITarget2.Command ar = {
32 cmd: "art16",
33 opts: "rq"
34 };
35
36 override readonly config xdc.bld.ITarget2.Command cc = {
37 cmd: "clt16 -c",
38 opts: ""
39 };
40
41 override readonly config xdc.bld.ITarget2.Command asm = {
42 cmd: "clt16 -c",
43 opts: ""
44 };
45
46 override readonly config xdc.bld.ITarget2.Command lnk = {
47 cmd: "lnkt16",
48 opts: ""
49 };
50
51 override readonly config xdc.bld.ITarget2.Command vers = {
52 cmd: "clt16",
53 opts: "--compiler_revision"
54 };
55
56 /*!
57 * ======== asmOpts ========
58 * User configurable assembler options.
59 *
60 * Defaults:
61 * @p(dlist)
62 * -`-qq`
63 * super quiet mode
64 */
65 override config xdc.bld.ITarget2.Options asmOpts = {
66 prefix: "-qq",
67 suffix: ""
68 };
69
70 /*!
71 * ======== ccOpts ========
72 * User configurable compiler options.
73 *
74 * Defaults:
75 * @p(dlist)
76 * -`-qq`
77 * super quiet mode
78 * -`-pdsw225`
79 * generate a warning for implicitly declared functions; i.e.,
80 * functions without prototypes
81 */
82 override config xdc.bld.ITarget2.Options ccOpts = {
83 prefix: "-qq -pdsw225",
84 suffix: ""
85 };
86
87 /*!
88 * ======== ccConfigOpts ========
89 * User configurable compiler options for the generated config C file.
90 */
91 override config xdc.bld.ITarget2.Options ccConfigOpts = {
92 prefix: "$(ccOpts.prefix)",
93 suffix: "$(ccOpts.suffix)"
94 };
95
96 /*!
97 * ======== lnkOpts ========
98 * User configurable linker options.
99 *
100 * Defaults:
101 * @p(dlist)
102 * -`-w`
103 * Display linker warnings
104 * -`-q`
105 * Quite run
106 * -`-u`
107 * Place unresolved external symbol into symbol table
108 * -`-c`
109 * ROM autoinitialization model
110 * -`-m`
111 * create a map file
112 * -`-l`
113 * archive library file as linker input
114 */
115 override config xdc.bld.ITarget2.Options lnkOpts = {
116 prefix: "-w -q -u _c_int00",
117 suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rtst16_v200.lib"
118 };
119
120 override config string includeOpts = "-I$(rootDir)/include";
121
122 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
123 t_IArg : { size: 4, align: 4 },
124 t_Char : { size: 1, align: 1 },
125 t_Double : { size: 8, align: 8 },
126 t_Float : { size: 4, align: 4 },
127 t_Fxn : { size: 4, align: 4 },
128 t_Int : { size: 4, align: 4 },
129 t_Int8 : { size: 1, align: 1 },
130 t_Int16 : { size: 2, align: 2 },
131 t_Int32 : { size: 4, align: 4 },
132 t_Int40 : { size: 8, align: 8 },
133 t_Int64 : { size: 8, align: 8 },
134 t_Long : { size: 8, align: 8 },
135 t_LDouble : { size: 8, align: 8 },
136 t_LLong : { size: 8, align: 8 },
137 t_Ptr : { size: 4, align: 4 },
138 t_Short : { size: 2, align: 2 },
139 t_Size : { size: 4, align: 4 },
140 };
141
142 override readonly config Int bitsPerChar = 8;
143
144 /*!
145 * ======== profiles ========
146 * Standard options profiles for the TI tool-chain.
147 */
148 override config xdc.bld.ITarget.OptionSet profiles[string] = [
149 ["debug", {
150 compileOpts: {
151 copts: "-g",
152 defs: "-D_DEBUG_=1",
153 }
154 }],
155 ["release", {
156 compileOpts: {
157 copts: "-O2",
158 },
159 }],
160 ["profile", {
161 compileOpts: {
162 copts: "--gen_profile_info",
163 },
164 }],
165 ["coverage", {
166 compileOpts: {
167 copts: "--gen_profile_info",
168 },
169 }],
170 ["whole_program", {
171 compileOpts: {
172 copts: "-oe -O2 --gen_func_subsections",
173 },
174 }],
175 ["whole_program_debug", {
176 compileOpts: {
177 copts: "-oe --symdebug:dwarf --gen_func_subsections",
178 },
179 }],
180 ];
181 }
182
183 184 185 186
187