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 ];
136
137 override readonly config Int bitsPerChar = 8;
138
139 /*!
140 * ======== profiles ========
141 * Standard options profiles for the TI tool-chain.
142 */
143 override config xdc.bld.ITarget.OptionSet profiles[string] = [
144 ["debug", {
145 compileOpts: {
146 copts: "--symdebug:dwarf",
147 defs: "-D_DEBUG_=1",
148 }
149 }],
150 ["release", {
151 compileOpts: {
152 copts: "-O2",
153 },
154 }],
155 ["profile", {
156 compileOpts: {
157 copts: "--symdebug:dwarf",
158 },
159 }],
160 ["coverage", {
161 compileOpts: {
162 copts: "--symdebug:dwarf",
163 },
164 }],
165 ["whole_program", {
166 compileOpts: {
167 copts: "-oe -O2 --gen_func_subsections",
168 },
169 }],
170 ["whole_program_debug", {
171 compileOpts: {
172 copts: "-oe --symdebug:dwarf --gen_func_subsections",
173 },
174 }],
175 ];
176
177 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
178 t_IArg : { size: 4, align: 4 },
179 t_Char : { size: 1, align: 1 },
180 t_Double : { size: 8, align: 8 },
181 t_Float : { size: 4, align: 4 },
182 t_Fxn : { size: 4, align: 4 },
183 t_Int : { size: 4, align: 4 },
184 t_Int8 : { size: 1, align: 1 },
185 t_Int16 : { size: 2, align: 2 },
186 t_Int32 : { size: 4, align: 4 },
187 t_Int64 : { size: 8, align: 8 },
188 t_Long : { size: 4, align: 4 },
189 t_LDouble : { size: 8, align: 8 },
190 t_LLong : { size: 8, align: 8 },
191 t_Ptr : { size: 4, align: 4 },
192 t_Short : { size: 2, align: 2 },
193 t_Size : { size: 4, align: 4 },
194 };
195
196 override config String stdInclude = "ti/targets/elf/arp32/std.h";
197
198 override config String binaryParser = "ti.targets.omf.elf.Elf32";
199 }
200
201 202 203 204
205