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