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