1 2 3 4 5 6 7 8 9 10 11
12 13 14 15
16
17 /*!
18 * ======== C64P ========
19 * TI C64P default runtime model (little endian)
20 */
21 metaonly module C64P inherits ti.targets.ITarget {
22 override readonly config string name = "C64P";
23 override readonly config string suffix = "64P";
24 override readonly config string isa = "64P";
25 override readonly config xdc.bld.ITarget.Model model = {
26 endian: "little"
27 };
28
29 override readonly config string rts = "ti.targets.rts6000";
30 override config string platform = "ti.platforms.sim6xxx:TMS320CDM420";
31
32 33 34
35 override config String compatibleSuffixes[] = ["64", "62"];
36
37 override readonly config xdc.bld.ITarget2.Command ar = {
38 cmd: "ar6x",
39 opts: "rq"
40 };
41
42 override readonly config xdc.bld.ITarget2.Command cc = {
43 cmd: "cl6x -c",
44 opts: "-mv64p"
45 };
46
47 override readonly config xdc.bld.ITarget2.Command vers = {
48 cmd: "cl6x",
49 opts: "--compiler_revision"
50 };
51
52 override readonly config xdc.bld.ITarget2.Command asm = {
53 cmd: "cl6x -c",
54 opts: "-mv64p"
55 };
56
57 override readonly config xdc.bld.ITarget2.Command lnk = {
58 cmd: "lnk6x",
59 opts: ""
60 };
61
62 /*!
63 * ======== asmOpts ========
64 * User configurable assembler options.
65 *
66 * Defaults:
67 * @p(dlist)
68 * -`-qq`
69 * super quiet mode
70 */
71 override config xdc.bld.ITarget2.Options asmOpts = {
72 prefix: "-qq",
73 suffix: ""
74 };
75
76 /*!
77 * ======== ccOpts ========
78 * User configurable compiler options.
79 *
80 * Defaults:
81 * @p(dlist)
82 * -`-qq`
83 * super quiet mode
84 * -`-pdsw225`
85 * generate a warning for implicitly declared functions; i.e.,
86 * functions without prototypes
87 */
88 override config xdc.bld.ITarget2.Options ccOpts = {
89 prefix: "-qq -pdsw225",
90 suffix: ""
91 };
92
93 /*!
94 * ======== ccConfigOpts ========
95 * User configurable compiler options for the generated config C file.
96 *
97 * -mo places all functions into subsections
98 * --no_compress helps with compile time with no real difference in
99 * code size since the generated config.c is mostly data and small
100 * function stubs.
101 */
102 override config xdc.bld.ITarget2.Options ccConfigOpts = {
103 prefix: "$(ccOpts.prefix) -mo --no_compress",
104 suffix: "$(ccOpts.suffix)"
105 };
106
107 override config string includeOpts = "-I$(rootDir)/include";
108
109 final override readonly config string sectMap[string] = [
110 [".text", "code"],
111 [".stack", "stack"],
112 [".bss", "data"],
113 [".cinit", "data"],
114 [".pinit", "data"],
115 [".const", "data"],
116 [".data", "data"],
117 [".switch", "data"],
118 [".sysmem", "data"],
119 [".far", "data"],
120 [".args", "data"],
121 [".cio", "data"],
122 ];
123
124 final override readonly config Bool splitMap[string] = [
125 [".text", true],
126 [".const", true],
127 [".data", true],
128 [".switch", true],
129 [".far", true],
130 [".args", true],
131 [".cio", true]
132 ];
133
134 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
135 t_IArg : { size: 4, align: 4 },
136 t_Char : { size: 1, align: 1 },
137 t_Double : { size: 8, align: 8 },
138 t_Float : { size: 4, align: 4 },
139 t_Fxn : { size: 4, align: 4 },
140 t_Int : { size: 4, align: 4 },
141 t_Int8 : { size: 1, align: 1 },
142 t_Int16 : { size: 2, align: 2 },
143 t_Int32 : { size: 4, align: 4 },
144 t_Int40 : { size: 8, align: 8 },
145 t_Int64 : { size: 8, align: 8 },
146 t_Long : { size: 8, align: 8 },
147 t_LDouble : { size: 8, align: 8 },
148 t_LLong : { size: 8, align: 8 },
149 t_Ptr : { size: 4, align: 4 },
150 t_Short : { size: 2, align: 2 },
151 t_Size : { size: 4, align: 4 },
152 };
153
154 override readonly config Int bitsPerChar = 8;
155 }
156 157 158 159
160