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