1 2 3 4 5 6 7 8 9 10 11
12 import xdc.bld.ITarget2;
13
14 /*!
15 * ======== IM.xdc ========
16 * Common interface for Cortex M bare metal targets
17 *
18 * This defines common parameters of Cortex M bare metal targets. The targets
19 * generate code compatible with the "v7M" architecture.
20 */
21 metaonly interface IM inherits gnu.targets.arm.ITarget {
22 override readonly config xdc.bld.ITarget.Model model= {
23 endian: "little",
24 codeModel: "thumb2",
25 shortEnums: true
26 };
27
28 override readonly config Bool alignDirectiveSupported = true;
29 override readonly config string rts = "gnu.targets.arm.rtsv7M";
30 override config string platform = "ti.platforms.tiva:TM4C1294NCPDT";
31
32 override config string GCCTARG = "arm-none-eabi";
33
34 override readonly config String stdInclude = "gnu/targets/arm/std.h";
35
36 override config ITarget2.Options ccOpts = {
37 prefix: "-Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections ",
38 suffix: "-Dfar= -D__DYNAMIC_REENT__ "
39 };
40
41 /*!
42 * ======== ccConfigOpts ========
43 * User configurable compiler options for the generated config C file.
44 */
45 override config ITarget2.Options ccConfigOpts = {
46 prefix: "$(ccOpts.prefix)",
47 suffix: "$(ccOpts.suffix)"
48 };
49
50 readonly config ITarget2.Command arBin = {
51 cmd: "bin/arm-none-eabi-ar ",
52 opts: ""
53 };
54
55 /*!
56 * ======== bspLib ========
57 * bspLib is assigned the name of the BSP library. The specified library
58 * is included on the link line.
59 *
60 * Possible values for this field are "nosys" and "rdimon" with the default
61 * being "nosys".
62 */
63 override config string bspLib = "nosys";
64
65 /*!
66 * ======== targetPkgPath ========
67 * targetPkgPath controls the path to the package that contains the GNU
68 * libraries.
69 */
70 config string targetPkgPath = null;
71
72 73 74
75 override config xdc.bld.ITarget.OptionSet profiles[string] = [
76 ["debug", {
77 compileOpts: {
78 copts: "-g",
79 defs: "-D_DEBUG_=1",
80 },
81 linkOpts: "-g",
82 }],
83
84 ["release", {
85 compileOpts: {
86 copts: " -O2 ",
87 },
88 linkOpts: " ",
89 }],
90 ];
91
92 93 94
95 override config String compatibleSuffixes[] = [];
96
97 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
98 t_IArg : { size: 4, align: 4 },
99 t_Char : { size: 1, align: 1 },
100 t_Double : { size: 8, align: 8 },
101 t_Float : { size: 4, align: 4 },
102 t_Fxn : { size: 4, align: 4 },
103 t_Int : { size: 4, align: 4 },
104 t_Int8 : { size: 1, align: 1 },
105 t_Int16 : { size: 2, align: 2 },
106 t_Int32 : { size: 4, align: 4 },
107 t_Int64 : { size: 8, align: 8 },
108 t_Long : { size: 4, align: 4 },
109 t_LDouble : { size: 8, align: 8 },
110 t_LLong : { size: 8, align: 8 },
111 t_Ptr : { size: 4, align: 4 },
112 t_Short : { size: 2, align: 2 },
113 t_Size : { size: 4, align: 4 },
114 };
115 }
116 117 118 119
120