1 2 3 4
5
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
37
38 /*!
39 * ======== IARP32 ========
40 * TI IARP32 interface (little endian)
41 */
42 metaonly interface IARP32 inherits ti.targets.ITarget {
43 override readonly config string isa = "arp32";
44
45 override readonly config string rts = "ti.targets.arp32.rts";
46 override config string platform = "ti.platforms.simARP32";
47
48 override readonly config xdc.bld.ITarget2.Command ar = {
49 cmd: "ar-arp32",
50 opts: "rq"
51 };
52
53 override readonly config xdc.bld.ITarget2.Command lnk = {
54 cmd: "cl-arp32",
55 opts: "-z"
56 };
57
58 override readonly config xdc.bld.ITarget2.Command vers = {
59 cmd: "cl-arp32",
60 opts: "--compiler_revision"
61 };
62
63 /*!
64 * ======== asmOpts ========
65 * User configurable assembler options.
66 *
67 * Defaults:
68 * @p(dlist)
69 * -`-qq`
70 * super quiet mode
71 */
72 override config xdc.bld.ITarget2.Options asmOpts = {
73 prefix: "-qq",
74 suffix: ""
75 };
76
77 /*!
78 * ======== ccOpts ========
79 * User configurable compiler options.
80 *
81 * Defaults:
82 * @p(dlist)
83 * -`-qq`
84 * super quiet mode
85 * -`-pdsw225`
86 * generate a warning for implicitly declared functions; i.e.,
87 * functions without prototypes
88 */
89 override config xdc.bld.ITarget2.Options ccOpts = {
90 prefix: "-qq -pdsw225",
91 suffix: ""
92 };
93
94 /*!
95 * ======== ccConfigOpts ========
96 * User configurable compiler options for the generated config C file.
97 */
98 override config xdc.bld.ITarget2.Options ccConfigOpts = {
99 prefix: "$(ccOpts.prefix)",
100 suffix: "$(ccOpts.suffix)"
101 };
102
103 override config string includeOpts = "-I$(rootDir)/include";
104
105 final override readonly config string sectMap[string] = [
106 [".text", "code"],
107 [".stack", "stack"],
108 [".bss", "data"],
109 [".cinit", "data"],
110 [".init_array", "data"],
111 [".const", "data"],
112 [".data", "data"],
113 [".switch", "data"],
114 [".sysmem", "data"],
115 [".far", "data"],
116 [".args", "data"],
117 [".cio", "data"],
118 [".fardata", "data"],
119 [".rodata", "data"],
120 ];
121
122 final override readonly config Bool splitMap[string] = [
123 [".text", true],
124 [".switch", true],
125 [".cio", true],
126 ];
127
128 override readonly config Int bitsPerChar = 8;
129
130 /*!
131 * ======== profiles ========
132 * Standard options profiles for the TI tool-chain.
133 */
134 override config xdc.bld.ITarget.OptionSet profiles[string] = [
135 ["debug", {
136 compileOpts: {
137 copts: "--symdebug:dwarf",
138 defs: "-D_DEBUG_=1",
139 }
140 }],
141 ["release", {
142 compileOpts: {
143 copts: "-O2",
144 },
145 }],
146 ["profile", {
147 compileOpts: {
148 copts: "--symdebug:dwarf",
149 },
150 }],
151 ["coverage", {
152 compileOpts: {
153 copts: "--symdebug:dwarf",
154 },
155 }]
156 ];
157
158 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
159 t_IArg : { size: 4, align: 4 },
160 t_Char : { size: 1, align: 1 },
161 t_Double : { size: 8, align: 4 },
162 t_Float : { size: 4, align: 4 },
163 t_Fxn : { size: 4, align: 4 },
164 t_Int : { size: 4, align: 4 },
165 t_Int8 : { size: 1, align: 1 },
166 t_Int16 : { size: 2, align: 2 },
167 t_Int32 : { size: 4, align: 4 },
168 t_Int64 : { size: 8, align: 4 },
169 t_Long : { size: 4, align: 4 },
170 t_LDouble : { size: 8, align: 4 },
171 t_LLong : { size: 8, align: 4 },
172 t_Ptr : { size: 4, align: 4 },
173 t_Short : { size: 2, align: 2 },
174 t_Size : { size: 4, align: 4 },
175 };
176
177 override config String stdInclude = "ti/targets/arp32/elf/std.h";
178
179 override config String binaryParser = "xdc.targets.omf.Elf";
180 }
181 182 183 184
185