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