1 2 3 4 5 6 7 8 9 10 11
12
13 14 15 16
17
18 /*!
19 * ======== C28 ========
20 * TI C28 default runtime model (little endian)
21 */
22 metaonly module C28 inherits ti.targets.ITarget {
23 override readonly config string name = "C28";
24 override readonly config string suffix = "28";
25 override readonly config string isa = "28";
26 override readonly config xdc.bld.ITarget.Model model= {endian: "little"};
27 override readonly config string rts = "ti.targets.rts2800";
28 final override readonly config Bool alignDirectiveSupported = false;
29
30 /*!
31 * ======== ar ========
32 * Define archiver executable
33 *
34 * Options:
35 * @p(dlist)
36 * -`-r`
37 * replace file
38 * -`-q`
39 * quiet mode
40 */
41 override readonly config xdc.bld.ITarget2.Command ar = {
42 cmd: "ar2000",
43 opts: "rq"
44 };
45
46 /*!
47 * ======== cc ========
48 * Define compiler executable
49 *
50 * Options:
51 * @p(dlist)
52 * -`-c`
53 * no linking
54 * -`-v28`
55 * compile for c28x.
56 */
57 override readonly config xdc.bld.ITarget2.Command cc = {
58 cmd: "cl2000 -c",
59 opts: "-v28"
60 };
61
62 /*!
63 * ======== vers ========
64 * Define the vers command
65 */
66 override readonly config xdc.bld.ITarget2.Command vers = {
67 cmd: "cl2000",
68 opts: "--compiler_revision"
69 };
70
71 /*!
72 * ======== asm ========
73 * Define assembler executable
74 *
75 * Options:
76 * @p(dlist)
77 * -`-c`
78 * no linking
79 * -`-v28`
80 * compile for c28x.
81 *
82 */
83 override readonly config xdc.bld.ITarget2.Command asm = {
84 cmd: "cl2000 -c",
85 opts: "-v28"
86 };
87
88 /*!
89 * Define linker executable
90 */
91 override readonly config xdc.bld.ITarget2.Command lnk = {
92 cmd: "lnk2000",
93 opts: ""
94 };
95
96 /*!
97 * ======== asmOpts ========
98 * User configurable assembler options.
99 *
100 * Defaults:
101 * @p(dlist)
102 * -`-qq`
103 * super quiet mode
104 */
105 override config xdc.bld.ITarget2.Options asmOpts = {
106 prefix: "-qq",
107 suffix: ""
108 };
109
110 /*!
111 * ======== ccOpts ========
112 * Compiler options
113 * @p(dlist)
114 * -`-qq`
115 * super quiet mode
116 * -`-pdsw225`
117 * generate a warning for implicitly declared functions; i.e.,
118 * functions without prototypes
119 */
120 override config xdc.bld.ITarget2.Options ccOpts = {
121 prefix: "-qq -pdsw225",
122 suffix: ""
123 };
124
125 /*!
126 * ======== lnkOpts ========
127 * Linker options
128 *
129 * Options:
130 * @p(dlist)
131 * -`-q`
132 * Quite run
133 * -`-u`
134 * Place unresolved external symbol into symbol table
135 * -`-c`
136 * ROM autoinitialization model
137 * -`-m`
138 * create a map file
139 * -`-l`
140 * archive library file as linker input
141 */
142 override config xdc.bld.ITarget2.Options lnkOpts = {
143 prefix: "-w -q -u _c_int00",
144 suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts2800.lib"
145 };
146
147
148 override config string includeOpts = "-I$(rootDir)/include";
149
150 final override readonly config string sectMap[string] = [
151 [".text", "code"],
152 [".switch", "code"],
153 [".data", "data"],
154 [".cinit", "code"],
155 [".bss", "data"],
156 [".ebss", "data"],
157 [".econst", "code"],
158 [".const", "code"],
159 [".stack", "stack"],
160 [".sysmem", "data"],
161 [".esysmem", "data"],
162 [".pinit", "code"],
163 [".args", "data"],
164 [".cio", "data"],
165 ];
166
167 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
168 t_IArg : { size: 2, align: 2 },
169 t_Char : { size: 1, align: 1 },
170 t_Double : { size: 2, align: 2 },
171 t_Float : { size: 2, align: 2 },
172 t_Fxn : { size: 2, align: 1 },
173 t_Int : { size: 1, align: 1 },
174 t_Int8 : { size: 1, align: 1 },
175 t_Int16 : { size: 1, align: 1 },
176 t_Int32 : { size: 2, align: 2 },
177 t_Int64 : { size: 4, align: 2 },
178 t_Long : { size: 2, align: 2 },
179 t_LDouble : { size: 2, align: 2 },
180 t_LLong : { size: 4, align: 2 },
181 t_Ptr : { size: 1, align: 1 },
182 t_Short : { size: 1, align: 1 },
183 t_Size : { size: 2, align: 2 },
184 };
185
186 override readonly config Int bitsPerChar = 16;
187 }
188 189 190 191
192