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