1 2 3 4 5 6 7 8 9 10 11
12
13 /*!
14 * ======== IArm.xdc ========
15 * Common settings for all Arm targets
16 */
17 metaonly interface IArm inherits ti.targets.ITarget {
18
19 override config String stdInclude = "ti/targets/arm/elf/std.h";
20
21 override config string platform = "ti.platforms.sim470xx";
22
23 override config string includeOpts =
24 "-I$(rootDir)/include/rts -I$(rootDir)/include ";
25
26 override readonly config xdc.bld.ITarget.Model model = {
27 shortEnums: true,
28 };
29
30 override readonly config xdc.bld.ITarget2.Command ar = {
31 cmd: "ar470",
32 opts: "rq"
33 };
34
35 override readonly config xdc.bld.ITarget2.Command vers = {
36 cmd: "cl470",
37 opts: "--compiler_revision"
38 };
39
40 override readonly config xdc.bld.ITarget2.Command lnk = {
41 cmd: "lnk470",
42 opts: ""
43 };
44
45 /*!
46 * ======== ccOpts ========
47 * User configurable compiler options.
48 *
49 * Defaults:
50 * @p(dlist)
51 * -`-qq`
52 * super quiet mode
53 * -`-pdsw225`
54 * generate a warning for implicitly declared functions; i.e.,
55 * functions without prototypes
56 */
57 override config xdc.bld.ITarget2.Options ccOpts = {
58 prefix: "-qq -pdsw225",
59 suffix: ""
60 };
61
62 /*!
63 * ======== ccConfigOpts ========
64 * User configurable compiler options for the generated config C file.
65 * -`--fp_mode=strict`
66 * disable conversion of double-precision computations to
67 * single-precision computations when the result is assigned to
68 * a single-precision variable.
69 */
70 override config xdc.bld.ITarget2.Options ccConfigOpts = {
71 prefix: "$(ccOpts.prefix) -ms --fp_mode=strict",
72 suffix: "$(ccOpts.suffix)"
73 };
74
75 /*!
76 * ======== asmOpts ========
77 * User configurable assembler options.
78 *
79 * Defaults:
80 * @p(dlist)
81 * -`-qq`
82 * super quiet mode
83 */
84 override config xdc.bld.ITarget2.Options asmOpts = {
85 prefix: "-qq",
86 suffix: ""
87 };
88
89 /*!
90 * ======== lnkOpts ========
91 * User configurable linker options.
92 *
93 * Defaults:
94 * @p(dlist)
95 * -`-w`
96 * Display linker warnings
97 * -`-q`
98 * Quite run
99 * -`-u`
100 * Place unresolved external symbol into symbol table
101 * -`-c`
102 * ROM autoinitialization model
103 * -`-m`
104 * create a map file
105 */
106 override config xdc.bld.ITarget2.Options lnkOpts = {
107 prefix: "-w -q -u _c_int00",
108 suffix: "-c -m $(XDCCFGDIR)/$@.map "
109 };
110
111 /*!
112 * ======== profiles ========
113 * Standard options profiles for the TI tool-chain.
114 */
115 override config xdc.bld.ITarget.OptionSet profiles[string] = [
116 ["debug", {
117 compileOpts: {
118 copts: "--symdebug:dwarf",
119 defs: "-D_DEBUG_=1",
120 }
121 }],
122 ["release", {
123 compileOpts: {
124 copts: "-O2",
125 },
126 }],
127 ["profile", {
128 compileOpts: {
129 copts: "--symdebug:dwarf",
130 },
131 }],
132 ["coverage", {
133 compileOpts: {
134 copts: "--symdebug:dwarf",
135 },
136 }],
137 ["whole_program", {
138 compileOpts: {
139 copts: "-oe -O2 -ms",
140 },
141 }],
142 ["whole_program_debug", {
143 compileOpts: {
144 copts: "-oe --symdebug:dwarf -ms",
145 },
146 }],
147 ];
148
149 final override readonly config string sectMap[string] = [
150 [".text", "code"],
151 [".stack", "stack"],
152 [".bss", "data"],
153 [".cinit", "code"],
154 [".init_array", "code"],
155 [".const", "code"],
156 [".data", "data"],
157 [".rodata", "data"],
158 [".neardata", "data"],
159 [".fardata", "data"],
160 [".switch", "data"],
161 [".sysmem", "data"],
162 [".far", "data"],
163 [".args", "data"],
164 [".cio", "data"],
165 ];
166
167 override readonly config Int bitsPerChar = 8;
168
169 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
170 t_IArg : { size: 4, align: 4 },
171 t_Char : { size: 1, align: 1 },
172 t_Double : { size: 8, align: 8 },
173 t_Float : { size: 4, align: 4 },
174 t_Fxn : { size: 4, align: 4 },
175 t_Int : { size: 4, align: 4 },
176 t_Int8 : { size: 1, align: 1 },
177 t_Int16 : { size: 2, align: 2 },
178 t_Int32 : { size: 4, align: 4 },
179 t_Int64 : { size: 8, align: 8 },
180 t_Long : { size: 4, align: 4 },
181 t_LDouble : { size: 8, align: 8 },
182 t_LLong : { size: 8, align: 8 },
183 t_Ptr : { size: 4, align: 4 },
184 t_Short : { size: 2, align: 2 },
185 t_Size : { size: 4, align: 4 },
186 };
187
188 override config String binaryParser = "ti.targets.omf.elf.Elf32";
189 }
190
191 192 193 194
195