1 2 3 4 5 6 7 8 9 10 11
12
13 14 15 16
17
18 /*!
19 * ======== TMS470_big_endian.xdc ========
20 * TI TMS470 (Arm) big endian
21 */
22 metaonly module TMS470_big_endian inherits ti.targets.ITarget {
23 override readonly config string name ="TMS470_big_endian";
24 override readonly config string suffix = "470e";
25 override readonly config string isa = "470";
26 override readonly config string rts = "ti.targets.rts470";
27 override readonly config xdc.bld.ITarget.Model model = {
28 endian: "big"
29 };
30
31 override config string platform = "ti.platforms.sim470xx";
32
33 34 35
36 override config String compatibleSuffixes[] = ["7e"];
37
38 override readonly config xdc.bld.ITarget.Module base = ti.targets.TMS470;
39
40 override readonly config xdc.bld.ITarget2.Command ar = {
41 cmd: "ar470",
42 opts: "rq"
43 };
44
45 override readonly config xdc.bld.ITarget2.Command cc = {
46 cmd: "cl470 -c",
47 opts: "-mv4"
48 };
49
50 override readonly config xdc.bld.ITarget2.Command vers = {
51 cmd: "cl470",
52 opts: "--compiler_revision"
53 };
54
55 override readonly config xdc.bld.ITarget2.Command asm = {
56 cmd: "cl470 -c",
57 opts: "-mv4"
58 };
59
60 override readonly config xdc.bld.ITarget2.Command lnk = {
61 cmd: "lnk470",
62 opts: ""
63 };
64
65 /*!
66 * ======== asmOpts ========
67 * User configurable assembler options.
68 *
69 * Defaults:
70 * @p(dlist)
71 * -`-qq`
72 * super quiet mode
73 */
74 override config xdc.bld.ITarget2.Options asmOpts = {
75 prefix: "-qq",
76 suffix: ""
77 };
78
79 /*!
80 * ======== ccOpts ========
81 * User configurable compiler options.
82 *
83 * Defaults:
84 * @p(dlist)
85 * -`-qq`
86 * super quiet mode
87 * -`-pdsw225`
88 * generate a warning for implicitly declared functions; i.e.,
89 * functions without prototypes
90 */
91 override config xdc.bld.ITarget2.Options ccOpts = {
92 prefix: "-qq -pdsw225",
93 suffix: ""
94 };
95
96 /*!
97 * ======== ccConfigOpts ========
98 * User configurable compiler options for the generated config C file.
99 */
100 override config xdc.bld.ITarget2.Options ccConfigOpts = {
101 prefix: "$(ccOpts.prefix) -ms",
102 suffix: "$(ccOpts.suffix)"
103 };
104
105 /*!
106 * ======== profiles ========
107 * Standard options profiles for the TI tool-chain.
108 */
109 override config xdc.bld.ITarget.OptionSet profiles[string] = [
110 ["debug", {
111 compileOpts: {
112 copts: "-g",
113 defs: "-D_DEBUG_=1",
114 }
115 }],
116 ["release", {
117 compileOpts: {
118 copts: "-O2",
119 },
120 }],
121 ["profile", {
122 compileOpts: {
123 copts: "--symdebug:profile_coff",
124 },
125 }],
126 ["coverage", {
127 compileOpts: {
128 copts: "--symdebug:profile_coff",
129 },
130 }],
131 ["whole_program", {
132 compileOpts: {
133 copts: "-oe -O2 -ms",
134 },
135 }],
136 ["whole_program_debug", {
137 compileOpts: {
138 copts: "-oe --symdebug:dwarf -ms",
139 },
140 }],
141 ];
142
143 /*!
144 * ======== linkLib ========
145 * Default TMS470 cgtools runtime library to link with
146 * (options: rts16.lib, rts32.lib)
147 */
148 config string linkLib = "rts16.lib";
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 xdc.bld.ITarget2.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 ti.targets.TMS470.sectMap;
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: 4 },
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: 4 },
188 t_Long : { size: 4, align: 4 },
189 t_LDouble : { size: 8, align: 4 },
190 t_LLong : { size: 8, align: 4 },
191 t_Ptr : { size: 4, align: 4 },
192 t_Short : { size: 2, align: 2 },
193 t_Size : { size: 4, align: 4 },
194 };
195 };
196 197 198 199
200