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