1 2 3 4 5 6 7 8 9 10 11
12 13 14 15
16
17 /*!
18 * ======== TMS470.xdc ========
19 * TI TMS470 (Arm) little endian ELF EABI target
20 */
21 metaonly module TMS470 inherits ti.targets.ITarget {
22 override readonly config string name = "TMS470";
23 override readonly config string suffix = "e470";
24 override readonly config string isa = "470";
25 override readonly config string rts = "ti.targets.arm.rtsarm";
26 override readonly config xdc.bld.ITarget.Model model = {
27 endian: "little",
28 shortEnums: true
29 };
30
31 override config string platform = "ti.platforms.sim470xx";
32
33 34 35
36 override config String compatibleSuffixes[] = ["7"];
37
38 override readonly config ti.targets.ITarget.Command ar = {
39 cmd: "ar470",
40 opts: "rq"
41 };
42
43 override readonly config ti.targets.ITarget.Command cc = {
44 cmd: "cl470 -c",
45 opts: " -me -mv4 --abi=eabi"
46 };
47
48 override readonly config ti.targets.ITarget.Command vers = {
49 cmd: "cl470",
50 opts: "-version"
51 };
52
53 override readonly config ti.targets.ITarget.Command asm = {
54 cmd: "cl470 -c",
55 opts: " -me -mv4 --abi=eabi"
56 };
57
58 override readonly config ti.targets.ITarget.Command lnk = {
59 cmd: "lnk470",
60 opts: " --abi=eabi"
61 };
62
63 /*!
64 * ======== asmOpts ========
65 * User configurable assembler options.
66 *
67 * Defaults:
68 * @p(dlist)
69 * -`-qq`
70 * super quiet mode
71 */
72 override config ti.targets.ITarget.Options asmOpts = {
73 prefix: "-qq",
74 suffix: ""
75 };
76
77 /*!
78 * ======== ccOpts ========
79 * User configurable compiler options.
80 *
81 * Defaults:
82 * @p(dlist)
83 * -`-qq`
84 * super quiet mode
85 * -`-pdsw225`
86 * generate a warning for implicitly declared functions; i.e.,
87 * functions without prototypes
88 */
89 override config ti.targets.ITarget.Options ccOpts = {
90 prefix: "-qq -pdsw225",
91 suffix: ""
92 };
93
94 /*!
95 * ======== ccConfigOpts ========
96 * User configurable compiler options for the generated config C file.
97 */
98 override config ti.targets.ITarget.Options ccConfigOpts = {
99 prefix: "$(ccOpts.prefix) -ms",
100 suffix: "$(ccOpts.suffix)"
101 };
102
103 /*!
104 * ======== linkLib ========
105 * Default TMS470 cgtools runtime library to link with
106 * (options: rtsv4_T_le_eabi.lib,
107 * rtsv7M3_T_le_eabi.lib, rtsv4_A_le_eabi_eh.lib,
108 * rtsv7A8_A_le_n_eabi.lib, rtsv7R4_T_le_eabi.lib)
109 */
110 config string linkLib = "rtsv4_T_le_eabi.lib";
111
112 /*!
113 * ======== profiles ========
114 * Standard options profiles for the TI tool-chain.
115 */
116 override config xdc.bld.ITarget.OptionSet profiles[string] = [
117 ["debug", {
118 compileOpts: {
119 copts: "-g",
120 defs: "-D_DEBUG_=1",
121 }
122 }],
123 ["release", {
124 compileOpts: {
125 copts: "-O2",
126 },
127 }],
128 ["profile", {
129 compileOpts: {
130 copts: "--gen_profile_info",
131 },
132 }],
133 ["coverage", {
134 compileOpts: {
135 copts: "--gen_profile_info",
136 },
137 }],
138 ["whole_program", {
139 compileOpts: {
140 copts: "-oe -O2 -ms",
141 },
142 }],
143 ["whole_program_debug", {
144 compileOpts: {
145 copts: "-oe --symdebug:dwarf -ms",
146 },
147 }],
148 ];
149
150 /*!
151 * ======== lnkOpts ========
152 * User configurable linker options.
153 *
154 * Defaults:
155 * @p(dlist)
156 * -`-w`
157 * Display linker warnings
158 * -`-q`
159 * Quite run
160 * -`-u`
161 * Place unresolved external symbol into symbol table
162 * -`-c`
163 * ROM autoinitialization model
164 * -`-m`
165 * create a map file
166 */
167 override config ti.targets.ITarget.Options lnkOpts = {
168 prefix: "-w -q -u _c_int00",
169 suffix: "-c -m $(XDCCFGDIR)/$@.map "
170 };
171
172 override config string includeOpts = "-I$(rootDir)/include/rts -I$(rootDir)/include ";
173
174 final override readonly config string sectMap[string] = [
175 [".intvecs", "code"],
176
177 [".text", "code"],
178 [".cinit", "code"],
179 [".const", "code"],
180 [".data", "data"],
181 [".pinit", "code"],
182
183 [".bss", "data"],
184 [".sysmem", "data"],
185 [".stack", "stack"],
186 [".args", "data"],
187 ];
188
189 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
190 t_IArg : { size: 4, align: 4 },
191 t_Char : { size: 1, align: 1 },
192 t_Double : { size: 8, align: 4 },
193 t_Float : { size: 4, align: 4 },
194 t_Fxn : { size: 4, align: 4 },
195 t_Int : { size: 4, align: 4 },
196 t_Int8 : { size: 1, align: 1 },
197 t_Int16 : { size: 2, align: 2 },
198 t_Int32 : { size: 4, align: 4 },
199 t_Int64 : { size: 8, align: 4 },
200 t_Long : { size: 4, align: 4 },
201 t_LDouble : { size: 8, align: 4 },
202 t_LLong : { size: 8, align: 4 },
203 t_Ptr : { size: 4, align: 4 },
204 t_Short : { size: 2, align: 2 },
205 };
206 };
207 208 209
210