1 2 3 4 5 6 7 8 9 10 11
12 13 14 15
16
17 /*!
18 * ======== ARP32 ========
19 * TI ARP32 default runtime model (little endian)
20 */
21 metaonly module ARP32 inherits ti.targets.ITarget {
22 override readonly config string name = "ARP32";
23 override readonly config string suffix = "earp32";
24 override readonly config string isa = "arp32";
25 override readonly config xdc.bld.ITarget.Model model = {
26 endian: "little"
27 };
28 override readonly config string rts = "ti.targets.elf.arp32.rts";
29 override config string platform = "ti.platforms.simARP32";
30
31 override readonly config xdc.bld.ITarget2.Command ar = {
32 cmd: "ar-arp32",
33 opts: "rq"
34 };
35
36 override readonly config xdc.bld.ITarget2.Command cc = {
37 cmd: "cl-arp32 -c",
38 opts: "--silicon_version=v210"
39 };
40
41 override readonly config xdc.bld.ITarget2.Command asm = {
42 cmd: "cl-arp32 -c",
43 opts: "--silicon_version=v210"
44 };
45
46 override readonly config xdc.bld.ITarget2.Command lnk = {
47 cmd: "lnk-arp32",
48 opts: ""
49 };
50
51 override readonly config xdc.bld.ITarget2.Command vers = {
52 cmd: "cl-arp32",
53 opts: "--compiler_revision"
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 */
82 override config xdc.bld.ITarget2.Options ccOpts = {
83 prefix: "-qq -pdsw225",
84 suffix: ""
85 };
86
87 /*!
88 * ======== ccConfigOpts ========
89 * User configurable compiler options for the generated config C file.
90 */
91 override config xdc.bld.ITarget2.Options ccConfigOpts = {
92 prefix: "$(ccOpts.prefix)",
93 suffix: "$(ccOpts.suffix)"
94 };
95
96 /*!
97 * ======== lnkOpts ========
98 * User configurable linker options.
99 *
100 * Defaults:
101 * @p(dlist)
102 * -`-w`
103 * Display linker warnings
104 * -`-q`
105 * Quite run
106 * -`-u`
107 * Place unresolved external symbol into symbol table
108 * -`-c`
109 * ROM autoinitialization model
110 * -`-m`
111 * create a map file
112 * -`-l`
113 * archive library file as linker input
114 */
115 override config xdc.bld.ITarget2.Options lnkOpts = {
116 prefix: "-w -q -u _c_int00",
117 suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rtsarp32_v200.lib"
118 };
119
120 override config string includeOpts = "-I$(rootDir)/include";
121
122 final override readonly config string sectMap[string] = [
123 [".text", "code"],
124 [".stack", "stack"],
125 [".bss", "data"],
126 [".cinit", "data"],
127 [".init_array", "data"],
128 [".const", "data"],
129 [".data", "data"],
130 [".switch", "data"],
131 [".sysmem", "data"],
132 [".far", "data"],
133 [".args", "data"],
134 [".cio", "data"],
135 [".fardata", "data"],
136 [".rodata", "data"],
137 ];
138
139 override readonly config Int bitsPerChar = 8;
140
141 /*!
142 * ======== profiles ========
143 * Standard options profiles for the TI tool-chain.
144 */
145 override config xdc.bld.ITarget.OptionSet profiles[string] = [
146 ["debug", {
147 compileOpts: {
148 copts: "--symdebug:dwarf",
149 defs: "-D_DEBUG_=1",
150 }
151 }],
152 ["release", {
153 compileOpts: {
154 copts: "-O2",
155 },
156 }],
157 ["profile", {
158 compileOpts: {
159 copts: "--symdebug:dwarf",
160 },
161 }],
162 ["coverage", {
163 compileOpts: {
164 copts: "--symdebug:dwarf",
165 },
166 }],
167 ["whole_program", {
168 compileOpts: {
169 copts: "-oe -O2 --gen_func_subsections",
170 },
171 }],
172 ["whole_program_debug", {
173 compileOpts: {
174 copts: "-oe --symdebug:dwarf --gen_func_subsections",
175 },
176 }],
177 ];
178
179 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
180 t_IArg : { size: 4, align: 4 },
181 t_Char : { size: 1, align: 1 },
182 t_Double : { size: 8, align: 8 },
183 t_Float : { size: 4, align: 4 },
184 t_Fxn : { size: 4, align: 4 },
185 t_Int : { size: 4, align: 4 },
186 t_Int8 : { size: 1, align: 1 },
187 t_Int16 : { size: 2, align: 2 },
188 t_Int32 : { size: 4, align: 4 },
189 t_Int64 : { size: 8, align: 8 },
190 t_Long : { size: 4, align: 4 },
191 t_LDouble : { size: 8, align: 8 },
192 t_LLong : { size: 8, align: 8 },
193 t_Ptr : { size: 4, align: 4 },
194 t_Short : { size: 2, align: 2 },
195 t_Size : { size: 4, align: 4 },
196 };
197
198 override config String stdInclude = "ti/targets/elf/arp32/std.h";
199
200 override config String binaryParser = "ti.targets.omf.elf.Elf32";
201 }
202
203 204 205 206
207