1 2 3 4 5 6 7 8 9 10 11
12 /*!
13 * ======== MSP430X_large ========
14 * IAR MSP430X little endian, large code model, large data model target.
15 */
16
17 metaonly module MSP430X_large inherits ITarget
18 {
19 override readonly config String name = "MSP430X_large";
20 override readonly config String suffix = "r430XL";
21 override readonly config String isa = "430X";
22 override readonly config xdc.bld.ITarget.Model model = {
23 endian: "little",
24 codeModel: "large",
25 dataModel: "large",
26 shortEnums: true
27 };
28
29 /*!
30 * ======== cc ========
31 * The command used to compile C/C++ source files into object files
32 *
33 * Defaults:
34 * @p(dlist)
35 * -`-e`
36 * enable compiler extensions so it's possible to get segment
37 * start addresses in C, via:
38 * @p(code)
39 * #pragma segment = "CSTACK"
40 * isrStack = __segment_begin("CSTACK");
41 * @p
42 * -`--core=430X`
43 * MSP430X architecture
44 * -`--data_model`
45 * Large data model for 430X core
46 * @p
47 */
48 override readonly config Command cc = {
49 cmd: "icc430",
50 opts: "-e --core=430X --data_model=large"
51 };
52
53 /*!
54 * ======== asm ========
55 * The command used to assembles assembly source files into object files
56 *
57 * Defaults:
58 * @p(dlist)
59 * -`-v1`
60 * MSP430X architecture
61 * -`-D__LARGE_DATA_MODEL__`
62 * indicate that this is large model to assembly code; IAR does
63 * currently have any pre-defined macros for this purpose; we use
64 * this symbol because it is the same as that used by the TI
65 * compiler (so some degree of portability is possible).
66 * @p
67 */
68 override readonly config Command asm = {
69 cmd: "a430",
70 opts: "-v1 --data_model large --code_model large -D__LARGE_DATA_MODEL__ -DUSE_LARGE_CODE_MODEL=1"
71 };
72
73 /*!
74 * ======== profiles ========
75 * Standard options profiles for the IAR MSP430 tool-chain.
76 */
77 override config xdc.bld.ITarget.OptionSet profiles[string] = [
78 ["debug", {
79 compileOpts: {
80 copts: "--debug --dlib_config $(rootDir)/lib/dlib/dl430xllfn.h",
81 },
82 linkOpts: "$(rootDir)/lib/dlib/dl430xllfn.r43",
83 }],
84 ["release", {
85 compileOpts: {
86 copts: "-Ohs --dlib_config $(rootDir)/lib/dlib/dl430xllfn.h",
87 },
88 linkOpts: "$(rootDir)/lib/dlib/dl430xllfn.r43",
89 }],
90 ["debug_full", {
91 compileOpts: {
92 copts: "--debug --dlib_config $(rootDir)/lib/dlib/dl430xllff.h",
93 },
94 linkOpts: "$(rootDir)/lib/dlib/dl430xllff.r43",
95 }],
96 ["release_full", {
97 compileOpts: {
98 copts: "-Ohs --dlib_config $(rootDir)/lib/dlib/dl430xllff.h",
99 },
100 linkOpts: "$(rootDir)/lib/dlib/dl430xllff.r43",
101 }],
102
103 ];
104
105 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
106 t_IArg : { size: 4, align: 2 },
107 t_Char : { size: 1, align: 1 },
108 t_Double : { size: 4, align: 2 },
109 t_Float : { size: 4, align: 2 },
110 t_Fxn : { size: 4, align: 2 },
111 t_Int : { size: 2, align: 2 },
112 t_Int8 : { size: 1, align: 1 },
113 t_Int16 : { size: 2, align: 2 },
114 t_Int32 : { size: 4, align: 2 },
115 t_Long : { size: 4, align: 2 },
116 t_LDouble : { size: 4, align: 2 },
117 t_LLong : { size: 8, align: 2 },
118 t_Ptr : { size: 4, align: 2 },
119 t_Short : { size: 2, align: 2 },
120 t_Size : { size: 4, align: 2 },
121 };
122 }
123 124 125 126
127