1 2 3 4 5 6 7 8 9 10 11
12 /*!
13 * ======== ITarget ========
14 * IAR ARM extension to the base `xdc.bld.ITarget3` interface.
15 */
16 @TargetHeader("xdc/bld/stddefs.xdt")
17 metaonly interface ITarget inherits xdc.bld.ITarget3 {
18
19 override readonly config String rts = "iar.targets.arm.rts";
20
21 override config string stdInclude = "iar/targets/arm/std.h";
22
23 24 25 26
27 config string binDir = "$(rootDir)/bin/";
28
29 /*!
30 * ======== ccOpts ========
31 * User configurable compiler options.
32 */
33 override config Options ccOpts = {
34 prefix: "--silent",
35 suffix: ""
36 };
37
38 /*!
39 * ======== asmOpts ========
40 * User configurable assembler options.
41 */
42 override config Options asmOpts = {
43 prefix: "-S",
44 suffix: ""
45 };
46
47 /*!
48 * ======== ar ========
49 * The command used to create an archive
50 */
51 override readonly config Command ar = {
52 cmd: "iarchive",
53 opts: ""
54 };
55
56 /*!
57 * ======== arOpts ========
58 * User configurable archiver options.
59 */
60 override config Options arOpts = {
61 prefix: "--silent",
62 suffix: ""
63 };
64
65 /*!
66 * ======== lnkOpts ========
67 * User configurable linker options.
68 */
69 override config xdc.bld.ITarget2.Options lnkOpts = {
70 prefix: "--silent",
71 suffix: "--map $(XDCCFGDIR)/$@.map --redirect _Printf=_PrintfSmall --redirect _Scanf=_ScanfSmall ",
72 };
73
74 /*!
75 * ======== vers ========
76 * The command used to get the tool-chain to return a version number.
77 */
78 readonly config Command vers = {
79 cmd: "iccarm",
80 opts: "-v"
81 };
82
83 /*!
84 * ======== extension ========
85 * The IAR assembly file extension recognised by this target.
86 */
87 override config Extension extensions[string] = [
88 [".asm", {suf: ".asm", typ: "asm"}],
89 [".c", {suf: ".c", typ: "c" }],
90 [".cpp", {suf: ".cpp", typ: "cpp"}],
91 [".cxx", {suf: ".cxx", typ: "cpp"}],
92 [".C", {suf: ".C", typ: "cpp"}],
93 [".cc", {suf: ".cc", typ: "cpp"}],
94 [".s", {suf: ".s", typ: "asm"}],
95 [".sv7M", {suf: ".sv7M",typ: "asm"}],
96 ];
97
98 /*!
99 * ======== includeOpts ========
100 * Additional user configurable target-specific include path options
101 */
102 override config String includeOpts = "";
103
104 /*!
105 * ======== cmdPrefix ========
106 * Prefix to put in front of each command
107 *
108 * This string is put in front of every Command before being passed to
109 * the shell for execution. This string can be used to run the compiler
110 * in emulation environments.
111 *
112 * LC_ALL=C must be set for code gen to run on SUSE
113 */
114 config String cmdPrefix = "LC_ALL=C ";
115
116 /*!
117 * ======== alignDirectiveSupported ========
118 * The compiler supports an align directive.
119 */
120 override readonly config Bool alignDirectiveSupported = true;
121
122 /*!
123 * ======== stdTypes ========
124 * Size and alignment for standard base types
125 */
126 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
127 t_IArg : { size: 4, align: 4 },
128 t_Char : { size: 1, align: 1 },
129 t_Double : { size: 8, align: 8 },
130 t_Float : { size: 4, align: 4 },
131 t_Fxn : { size: 4, align: 4 },
132 t_Int : { size: 4, align: 4 },
133 t_Int8 : { size: 1, align: 1 },
134 t_Int16 : { size: 2, align: 2 },
135 t_Int32 : { size: 4, align: 4 },
136 t_Long : { size: 4, align: 4 },
137 t_LDouble : { size: 8, align: 8 },
138 t_LLong : { size: 8, align: 8 },
139 t_Ptr : { size: 4, align: 4 },
140 t_Short : { size: 2, align: 2 },
141 t_Size : { size: 4, align: 4 },
142 t_Int64 : { size: 8, align: 8 },
143 };
144 }
145 146 147 148
149