1 2 3 4 5 6 7 8 9 10 11
12
13 14 15 16
17
18 /*!
19 * ======== C55 ========
20 * TI C55 default runtime model
21 */
22 metaonly module C55 inherits ti.targets.ITarget {
23 override readonly config string name = "C55";
24 override readonly config string suffix = "55";
25 override readonly config string isa = "55";
26 override readonly config xdc.bld.ITarget.Model model= {
27 endian: "big"
28 };
29 override readonly config string rts = "ti.targets.rts5500";
30
31 override readonly config xdc.bld.ITarget2.Command ar = {
32 cmd: "ar55",
33 opts: "rq"
34 };
35
36 override readonly config xdc.bld.ITarget2.Command cc = {
37 cmd: "cl55 -c",
38 opts: ""
39 };
40
41 override readonly config xdc.bld.ITarget2.Command vers = {
42 cmd: "cl55",
43 opts: ""
44 };
45
46 override readonly config xdc.bld.ITarget2.Command asm = {
47 cmd: "cl55 -c",
48 opts: ""
49 };
50
51 override readonly config xdc.bld.ITarget2.Command lnk = {
52 cmd: "lnk55",
53 opts: ""
54 };
55
56 /*!
57 * ======== asmOpts ========
58 * User configurable assembler options.
59 *
60 * Defaults:
61 * @p(dlist)
62 * -`-qq`
63 * super quiet mode
64 */
65 override config xdc.bld.ITarget2.Options asmOpts = {
66 prefix: "-qq",
67 suffix: ""
68 };
69
70 /*!
71 * ======== ccOpts ========
72 * User configurable compiler options.
73 *
74 * Defaults:
75 * @p(dlist)
76 * -`-qq`
77 * super quiet mode
78 * -`-pdsw225`
79 * generate a warning for implicitly declared functions; i.e.,
80 * functions without prototypes
81 * -`-Dfar= `
82 * ignore keyword far; this allows one to write code that can
83 * be compiled in large model and small model without #ifdef's
84 */
85 override config xdc.bld.ITarget2.Options ccOpts = {
86 prefix: "-qq -pdsw225 -Dfar= ",
87 suffix: ""
88 };
89
90 /*!
91 * ======== lnkOpts ========
92 * User configurable linker options.
93 *
94 * Defaults:
95 * @p(dlist)
96 * -`-w`
97 * Display linker warnings
98 * -`-q`
99 * Quite run
100 * -`-u`
101 * Place unresolved external symbol into symbol table
102 * -`-c`
103 * ROM autoinitialization model
104 * -`-m`
105 * create a map file
106 * -`-l`
107 * archive library file as linker input
108 */
109 override config xdc.bld.ITarget2.Options lnkOpts = {
110 prefix: "-w -q -u _c_int00",
111 suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts55.lib"
112 };
113
114 override config string includeOpts = "-I$(rootDir)/include";
115
116 final override readonly config string sectMap[string] = [
117 [".text", "code"],
118 [".stack", "stack"],
119 [".sysstack", "stack"],
120 [".bss", "data"],
121 [".cinit", "code"],
122 [".pinit", "code"],
123 [".cio", "code"],
124 [".args", "data"],
125 [".const", "data"],
126 [".data", "data"],
127 [".switch", "code"],
128 [".sysmem", "code"],
129 [".far", "data"],
130 ["vectors", "data"],
131 ];
132
133 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
134 t_IArg : { size: 2, align: 2 },
135 t_Char : { size: 1, align: 1 },
136 t_Double : { size: 2, align: 2 },
137 t_Float : { size: 2, align: 2 },
138 t_Fxn : { size: 2, align: 2 },
139 t_Int : { size: 1, align: 1 },
140 t_Int8 : { size: 1, align: 1 },
141 t_Int16 : { size: 1, align: 1 },
142 t_Int32 : { size: 2, align: 2 },
143 t_Int40 : { size: 4, align: 2 },
144 t_Long : { size: 2, align: 2 },
145 t_LDouble : { size: 2, align: 2 },
146 t_LLong : { size: 4, align: 2 },
147 t_Ptr : { size: 1, align: 1 },
148 t_Short : { size: 1, align: 1 },
149 t_Size : { size: 1, align: 1 },
150 };
151
152 override readonly config Int bitsPerChar = 16;
153 };
154 155 156 157
158