1 2 3 4
5
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
37
38 /*!
39 * ======== IArm.xdc ========
40 * Common settings for all Arm targets
41 */
42 metaonly interface IArm inherits ti.targets.ITarget {
43
44 override config String stdInclude = "ti/targets/arm/elf/std.h";
45
46 override config string platform = "ti.platforms.sim470xx";
47
48 override config string includeOpts =
49 "-I$(rootDir)/include ";
50
51 override readonly config xdc.bld.ITarget.Model model = {
52 shortEnums: true,
53 };
54
55 override readonly config xdc.bld.ITarget2.Command ar = {
56 cmd: "armar",
57 opts: "rq"
58 };
59
60 override readonly config xdc.bld.ITarget2.Command vers = {
61 cmd: "armcl",
62 opts: "--compiler_revision"
63 };
64
65 override readonly config xdc.bld.ITarget2.Command lnk = {
66 cmd: "armcl",
67 opts: "-z"
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 * -`--fp_mode=strict`
91 * disable conversion of double-precision computations to
92 * single-precision computations when the result is assigned to
93 * a single-precision variable.
94 */
95 override config xdc.bld.ITarget2.Options ccConfigOpts = {
96 prefix: "$(ccOpts.prefix) -ms --fp_mode=strict",
97 suffix: "$(ccOpts.suffix)"
98 };
99
100 /*!
101 * ======== asmOpts ========
102 * User configurable assembler options.
103 *
104 * Defaults:
105 * @p(dlist)
106 * -`-qq`
107 * super quiet mode
108 */
109 override config xdc.bld.ITarget2.Options asmOpts = {
110 prefix: "-qq",
111 suffix: ""
112 };
113
114 /*!
115 * ======== profiles ========
116 * Standard options profiles for the TI tool-chain.
117 */
118 override config xdc.bld.ITarget.OptionSet profiles[string] = [
119 ["debug", {
120 compileOpts: {
121 copts: "--symdebug:dwarf",
122 defs: "-D_DEBUG_=1",
123 }
124 }],
125 ["release", {
126 compileOpts: {
127 copts: "-O2",
128 },
129 }],
130 ["profile", {
131 compileOpts: {
132 copts: "--symdebug:dwarf",
133 },
134 }],
135 ["coverage", {
136 compileOpts: {
137 copts: "--symdebug:dwarf",
138 },
139 }],
140 ];
141
142 final override readonly config string sectMap[string] = [
143 [".text", "code"],
144 [".stack", "stack"],
145 [".bss", "data"],
146 [".binit", "code"],
147 [".cinit", "code"],
148 [".init_array", "code"],
149 [".const", "code"],
150 [".data", "data"],
151 [".rodata", "data"],
152 [".neardata", "data"],
153 [".fardata", "data"],
154 [".switch", "data"],
155 [".sysmem", "data"],
156 [".far", "data"],
157 [".args", "data"],
158 [".cio", "data"],
159 [".ARM.exidx", "data"],
160 [".ARM.extab", "data"]
161 ];
162
163 override readonly config Bool splitMap[string] = [
164 [".text", true],
165 [".const", true],
166 [".data", true],
167 [".fardata", true],
168 [".switch", true],
169 [".far", true],
170 [".args", true],
171 [".cio", true],
172 [".ARM.extab", true]
173 ];
174
175 override readonly config Int bitsPerChar = 8;
176
177 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
178 t_IArg : { size: 4, align: 4 },
179 t_Char : { size: 1, align: 1 },
180 t_Double : { size: 8, align: 8 },
181 t_Float : { size: 4, align: 4 },
182 t_Fxn : { size: 4, align: 4 },
183 t_Int : { size: 4, align: 4 },
184 t_Int8 : { size: 1, align: 1 },
185 t_Int16 : { size: 2, align: 2 },
186 t_Int32 : { size: 4, align: 4 },
187 t_Int64 : { size: 8, align: 8 },
188 t_Long : { size: 4, align: 4 },
189 t_LDouble : { size: 8, align: 8 },
190 t_LLong : { size: 8, align: 8 },
191 t_Ptr : { size: 4, align: 4 },
192 t_Short : { size: 2, align: 2 },
193 t_Size : { size: 4, align: 4 },
194 };
195
196 override config String binaryParser = "xdc.targets.omf.Elf";
197 }
198 199 200 201
202