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     *  ======== C55_large.xdc ========
    15     *
    16     */
    17    
    18    /*!
    19     *  ======== C55_large ========
    20     *  TI C55 large model
    21     */
    22    metaonly module C55_large inherits ti.targets.ITarget {
    23        override readonly config string name                = "C55_large";  
    24        override readonly config string suffix              = "55L";
    25        override readonly config string isa                 = "55"; 
    26        override readonly config xdc.bld.ITarget.Model model= {
    27            endian: "big",
    28            dataModel: "large"
    29        };
    30        override readonly config string rts                 = "ti.targets.rts5500";
    31    
    32        override readonly config xdc.bld.ITarget.Module base= ti.targets.C55;
    33    
    34        override readonly config xdc.bld.ITarget2.Command ar = {
    35            cmd: "ar55",
    36            opts: "rq"
    37        };
    38    
    39        override readonly config xdc.bld.ITarget2.Command cc = {
    40            cmd: "cl55 -c",
    41            opts: "-ml"
    42        };
    43    
    44        override readonly config xdc.bld.ITarget2.Command vers = {
    45            cmd: "cl55",
    46            opts: "--compiler_revision"
    47        };
    48    
    49        override readonly config xdc.bld.ITarget2.Command asm = {
    50            cmd: "cl55 -c",
    51            opts: "-ml"
    52        };
    53    
    54        override readonly config xdc.bld.ITarget2.Command lnk = {
    55            cmd: "lnk55",
    56            opts: ""
    57        };
    58    
    59        /*!
    60         *  ======== asmOpts ========
    61         *  User configurable assembler options.
    62         *
    63         *  Defaults:
    64         *  @p(dlist)
    65         *      -`-qq`
    66         *          super quiet mode
    67         */
    68        override config xdc.bld.ITarget2.Options asmOpts = {
    69            prefix: "-qq",
    70            suffix: ""
    71        };
    72    
    73        /*!
    74         *  ======== ccOpts ========
    75         *  User configurable compiler options.
    76         *
    77         *  Defaults:
    78         *  @p(dlist)
    79         *      -`-qq`
    80         *          super quiet mode
    81         *      -`-pdsw225`
    82         *          generate a warning for implicitly declared functions; i.e.,
    83         *          functions without prototypes
    84         *      -`-Dfar= `
    85         *          ignore keyword far; this allows one to write code that can
    86         *          be compiled in large model and small model without #ifdef's
    87         */
    88        override config xdc.bld.ITarget2.Options ccOpts = {
    89            prefix: "-qq -pdsw225 -Dfar= ",
    90            suffix: ""
    91        };
    92    
    93        /*!
    94         *  ======== lnkOpts ========
    95         *  User configurable linker options.
    96         *
    97         *  Defaults:
    98         *  @p(dlist)
    99         *      -`-w`
   100         *          Display linker warnings
   101         *      -`-q`
   102         *          Quite run
   103         *      -`-u`
   104         *          Place unresolved external symbol into symbol table
   105         *      -`-c`
   106         *          ROM autoinitialization model
   107         *      -`-m`
   108         *          create a map file
   109         *      -`-l`
   110         *          archive library file as linker input
   111         */
   112        override config xdc.bld.ITarget2.Options lnkOpts = {
   113            prefix: "-w -q -u _c_int00",
   114            suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts55x.lib"
   115        };
   116    
   117        /*!
   118         *  ======== profiles ========
   119         *  Standard options profiles for the TI tool-chain.
   120         */
   121        override config xdc.bld.ITarget.OptionSet profiles[string] = [
   122            ["debug", {
   123                compileOpts: {
   124                    copts: "-g",
   125                    defs:  "-D_DEBUG_=1",
   126                }
   127            }],
   128            ["release", {
   129                compileOpts: {
   130                    copts: "-O2",
   131                },
   132            }],
   133            ["profile", {
   134                compileOpts: {
   135                    copts: "-gp",
   136                },
   137            }],
   138            ["coverage", {
   139                compileOpts: {
   140                    copts: "-gp",
   141                },
   142            }],
   143            ["whole_program", {
   144                compileOpts: {
   145                    copts: "-oe -O2 -mo",
   146                },
   147            }],
   148            ["whole_program_debug", {
   149                compileOpts: {
   150                    copts: "-oe --symdebug:dwarf -mo",
   151                },
   152            }],
   153        ];
   154    
   155        override config string includeOpts = "-I$(rootDir)/include";
   156    
   157        final override readonly config string sectMap[string] =
   158            ti.targets.C55.sectMap;
   159    
   160        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   161            t_IArg          : { size: 2, align: 2 },
   162            t_Char          : { size: 1, align: 1 },
   163            t_Double        : { size: 2, align: 2 },
   164            t_Float         : { size: 2, align: 2 },
   165            t_Fxn           : { size: 2, align: 2 },
   166            t_Int           : { size: 1, align: 1 },
   167            t_Int8          : { size: 1, align: 1 },
   168            t_Int16         : { size: 1, align: 1 },
   169            t_Int32         : { size: 2, align: 2 },
   170            t_Int40         : { size: 4, align: 2 },
   171            t_Long          : { size: 2, align: 2 },
   172            t_LDouble       : { size: 2, align: 2 },
   173            t_LLong         : { size: 4, align: 2 },
   174            t_Ptr           : { size: 2, align: 2 },
   175            t_Short         : { size: 1, align: 1 },
   176            t_Size          : { size: 1, align: 1 },
   177        };
   178    
   179        override readonly config Int bitsPerChar = 16;
   180    }
   181    /*
   182     *  @(#) ti.targets; 1, 0, 3,650; 3-28-2013 16:05:06; /db/ztree/library/trees/xdctargets/xdctargets-f60x/src/ xlibrary
   183    
   184     */
   185