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