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