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