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