1    /* 
     2     *  Copyright (c) 2008 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * */
    12    
    13    /*!
    14     *  ======== MSP430_large_data.xdc ========
    15     *  TI MSP430 large model, little endian target
    16     */
    17    
    18    metaonly module MSP430_large_data inherits ti.targets.ITarget {
    19        override readonly config string name             = "MSP430_large_data"; 
    20        override readonly config string suffix           = "430XL";
    21        override readonly config string isa              = "430";    
    22        override readonly config string rts              = "ti.targets.rts430";
    23        override readonly config xdc.bld.ITarget.Model model = {
    24            endian: "little",
    25            dataModel: "large",
    26            codeModel: "large"
    27        };
    28    
    29        override readonly config ITarget.Command ar = {
    30            cmd:  "ar430",
    31            opts: "rq"
    32        };
    33    
    34        override readonly config ITarget.Command cc = {
    35            cmd:  "cl430 -c",
    36            opts: " -vmspx -ml"
    37        };
    38    
    39        override readonly config ITarget.Command vers = {
    40            cmd:  "cl430",
    41            opts: "-version"
    42        };
    43    
    44        override readonly config ITarget.Command asm = {
    45            cmd:  "cl430 -c",
    46            opts: " -vmspx -ml"
    47        };
    48    
    49        override readonly config ITarget.Command lnk = {
    50            cmd:  "lnk430",
    51            opts: ""
    52        };
    53    
    54        /*!
    55         *  ======== asmOpts ========
    56         *  User configurable assembler options.
    57         *
    58         *  Defaults:
    59         *  @p(dlist)
    60         *      -`-qq`
    61         *          super quiet mode
    62         */
    63        override config ITarget.Options asmOpts = {
    64            prefix: "-qq",
    65            suffix: ""
    66        };
    67    
    68        /*!
    69         *  ======== ccOpts ========
    70         *  User configurable compiler options.
    71         *
    72         *  Defaults:
    73         *  @p(dlist)
    74         *      -`-qq`
    75         *          super quiet mode
    76         *      -`-pdsw225`
    77         *          generate a warning for implicitly declared functions; i.e.,
    78         *          functions without prototypes
    79         */
    80        override config ITarget.Options ccOpts = {
    81            prefix: "-qq -pdsw225",
    82            suffix: ""
    83        };
    84    
    85        /*!
    86         *  ======== ccConfigOpts ========
    87         *  User configurable compiler options for the generated config C file.
    88         */
    89        override config ITarget.Options ccConfigOpts = {
    90            prefix: "$(ccOpts.prefix)",
    91            suffix: "$(ccOpts.suffix)"
    92        };
    93    
    94        /*!
    95         *  ======== linkLib ========
    96         *  Default MSP430 cgtools runtime library to link with 
    97         *  (options: rts16e.lib, rts32e.lib)
    98         */
    99        config string linkLib = "rts430xl.lib";
   100        
   101        /*!
   102         *  ======== lnkOpts ========
   103         *  User configurable linker options.
   104         *
   105         *  Defaults:
   106         *  @p(dlist)
   107         *      -`-w`
   108         *          Display linker warnings
   109         *      -`-q`
   110         *          Quite run
   111         *      -`-u`
   112         *          Place unresolved external symbol into symbol table
   113         *      -`-c`
   114         *          ROM autoinitialization model
   115         *      -`-m`
   116         *          create a map file
   117         */
   118        override config ITarget.Options lnkOpts = {
   119            prefix: "-w -q -u _c_int00",
   120            suffix: "-c -m $(XDCCFGDIR)/$@.map " /* + -l $(rootDir)/lib/linkLib */
   121        };
   122    
   123        /*!
   124         *  ======== profiles ========
   125         *  Standard options profiles for the TI tool-chain.
   126         */
   127        override config xdc.bld.ITarget.OptionSet profiles[string] = [
   128            ["debug", {
   129                compileOpts: {
   130                    copts: "-g",
   131                    defs:  "-D_DEBUG_=1",
   132                }
   133            }],
   134            ["release", {
   135                compileOpts: {
   136                    copts: "-O2",
   137                },
   138            }],
   139            ["profile", {
   140                compileOpts: {
   141                    copts: "-gp",
   142                },
   143            }],
   144            ["coverage", {
   145                compileOpts: {
   146                    copts: "-gp",
   147                },
   148            }],
   149            ["whole_program", {
   150                compileOpts: {
   151                    copts: "-oe -O2",
   152                },
   153            }],
   154            ["whole_program_debug", {
   155                compileOpts: {
   156                    copts: "-oe --symdebug:dwarf",
   157                },
   158            }],
   159        ];
   160    
   161        override config string includeOpts = "-I$(rootDir)/include ";
   162    
   163        final override readonly config string sectMap[string] = [
   164            [".text", "code"],
   165            [".cinit", "code"],
   166            [".const", "code"],
   167            [".pinit", "code"],
   168    
   169            [".bss", "data"],
   170            [".sysmem", "data"],
   171            [".stack", "stack"],
   172            [".args", "data"],
   173            [".cio", "data"],
   174            [".reset", "data"],
   175        ];
   176    
   177        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   178            t_IArg          : { size: 4, align: 2 },
   179            t_Char          : { size: 1, align: 1 },
   180            t_Double        : { size: 4, align: 2 },
   181            t_Float         : { size: 4, align: 2 },
   182            t_Fxn           : { size: 4, align: 2 },
   183            t_Int           : { size: 2, align: 2 },
   184            t_Int8          : { size: 1, align: 1 },
   185            t_Int16         : { size: 2, align: 2 },
   186            t_Int32         : { size: 4, align: 2 },
   187            t_Long          : { size: 4, align: 2 },
   188            t_LDouble       : { size: 4, align: 2 },
   189            t_LLong         : { size: 4, align: 2 },
   190            t_Ptr           : { size: 4, align: 2 },
   191            t_Short         : { size: 2, align: 2 },
   192            t_Size          : { size: 4, align: 2 },
   193        };
   194    };
   195    /*
   196     *  @(#) ti.targets; 1, 0, 3,389; 6-9-2010 16:20:04; /db/ztree/library/trees/xdctargets/xdctargets-b37x/src/
   197     */
   198