1 2 3 4 5 6 7 8 9 10 11
12 13 14 15
16
17 import xdc.bld.ITarget2;
18
19 /*!
20 * ======== C64T ========
21 * TI C64T default runtime model (little endian)
22 */
23 metaonly module C64T inherits ti.targets.ITarget {
24 override readonly config string name = "C64T";
25 override readonly config string suffix = "64T";
26 override readonly config string isa = "64T";
27 override readonly config xdc.bld.ITarget.Model model = {
28 endian: "little"
29 };
30 override readonly config xdc.bld.ITarget.Module base = ti.targets.C62;
31
32 override readonly config string rts = "ti.targets.rts6000";
33 override config string platform = "ti.platforms.sdp4430";
34 override readonly config string stdInclude = "ti/targets/std.h";
35
36 override readonly config ITarget2.Command ar = {
37 cmd: "ar6x",
38 opts: "rq"
39 };
40
41 override readonly config ITarget2.Command cc = {
42 cmd: "cl6x -c",
43 opts: "-mv=tesla --abi=coffabi"
44 };
45
46 override readonly config ITarget2.Command vers = {
47 cmd: "cl6x",
48 opts: "--compiler_revision"
49 };
50
51 override readonly config ITarget2.Command asm = {
52 cmd: "cl6x -c",
53 opts: "-mv=tesla --abi=coffabi"
54 };
55
56 override readonly config ITarget2.Command lnk = {
57 cmd: "lnk6x",
58 opts: "--abi=coffabi"
59 };
60
61 override config xdc.bld.ITarget.OptionSet profiles[string] = [
62 ["debug", {
63 compileOpts: {
64 copts: "--symdebug:dwarf",
65 defs: "-D_DEBUG_=1",
66 }
67 }],
68 ["release", {
69 compileOpts: {
70 copts: "-O2",
71 },
72 }],
73 ["profile", {
74 compileOpts: {
75 copts: "--gen_profile_info",
76 },
77 }],
78 ["coverage", {
79 compileOpts: {
80 copts: "--gen_profile_info",
81 },
82 }],
83 ["whole_program", {
84 compileOpts: {
85 copts: "-oe -O2 -mo",
86 },
87 }],
88 ["whole_program_debug", {
89 compileOpts: {
90 copts: "-oe --symdebug:dwarf -mo",
91 },
92 }],
93 ];
94
95 /*!
96 * ======== asmOpts ========
97 * User configurable assembler options.
98 *
99 * Defaults:
100 * @p(dlist)
101 * -`-qq`
102 * super quiet mode
103 */
104 override config ITarget2.Options asmOpts = {
105 prefix: "-qq",
106 suffix: ""
107 };
108
109 /*!
110 * ======== ccOpts ========
111 * User configurable compiler options.
112 *
113 * Defaults:
114 * @p(dlist)
115 * -`-qq`
116 * super quiet mode
117 * -`-pdsw225`
118 * generate a warning for implicitly declared functions; i.e.,
119 * functions without prototypes
120 */
121 override config ITarget2.Options ccOpts = {
122 prefix: "-qq -pdsw225",
123 suffix: ""
124 };
125
126 /*!
127 * ======== ccConfigOpts ========
128 * User configurable compiler options for the generated config C file.
129 *
130 * -mo places all functions into subsections
131 * --no_compress helps with compile time with no real difference in
132 * code size since the generated config.c is mostly data and small
133 * function stubs.
134 */
135 override config ITarget2.Options ccConfigOpts = {
136 prefix: "$(ccOpts.prefix) -mo --no_compress",
137 suffix: "$(ccOpts.suffix)"
138 };
139
140 /*!
141 * ======== lnkOpts ========
142 * User configurable linker options.
143 *
144 * Defaults:
145 * @p(dlist)
146 * -`-w`
147 * Display linker warnings
148 * -`-q`
149 * Quite run
150 * -`-u`
151 * Place unresolved external symbol into symbol table
152 * -`-c`
153 * ROM autoinitialization model
154 * -`-m`
155 * create a map file
156 * -`-l`
157 * archive library file as linker input
158 */
159 override config ITarget2.Options lnkOpts = {
160 prefix: "-w -q -u _c_int00",
161 suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rtstesla_le_coff.lib"
162 };
163
164 override config string includeOpts = "-I$(rootDir)/include";
165
166 final override readonly config string sectMap[string] =
167 ti.targets.C62.sectMap;
168
169 override readonly config xdc.bld.ITarget.StdTypes stdTypes =
170 ti.targets.C62.stdTypes;
171
172 override readonly config Int bitsPerChar =
173 ti.targets.C62.bitsPerChar;
174 }
175 176 177 178
179