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     *  ======== C55.xdc ========
    14     *
    15     */
    16    
    17    /*!
    18     *  ======== C55 ========
    19     *  TI C55 target
    20     */
    21    metaonly module C55 inherits ti.targets.ITarget {
    22        override readonly config string name                = "C55";        
    23        override readonly config string suffix              = "55";
    24        override readonly config string isa                 = "55"; 
    25        override readonly config xdc.bld.ITarget.Model model= {
    26            endian: "big"
    27        };
    28        override readonly config string rts                 = "ti.targets.rts5500";
    29    
    30        override readonly config ITarget.Command ar = {
    31            cmd: "ar55",
    32            opts: "rq"
    33        };
    34    
    35        override readonly config ITarget.Command cc = {
    36            cmd: "cl55 -c",
    37            opts: ""
    38        };
    39    
    40        override readonly config ITarget.Command vers = {
    41            cmd: "cl55",
    42            opts: ""
    43        };
    44    
    45        override readonly config ITarget.Command asm = {
    46            cmd: "cl55 -c",
    47            opts: ""
    48        };
    49    
    50        override readonly config ITarget.Command lnk = {
    51            cmd: "lnk55",
    52            opts: ""
    53        };
    54    
    55        /*!
    56         *  ======== asmOpts ========
    57         *  User configurable assembler options.
    58         *
    59         *  Defaults:
    60         *  @p(dlist)
    61         *      -`-qq`
    62         *          super quiet mode
    63         */
    64        override config ITarget.Options asmOpts = {
    65            prefix: "-qq",
    66            suffix: ""
    67        };
    68    
    69        /*!
    70         *  ======== ccOpts ========
    71         *  User configurable compiler options.
    72         *
    73         *  Defaults:
    74         *  @p(dlist)
    75         *      -`-qq`
    76         *          super quiet mode
    77         *      -`-pdsw225`
    78         *          generate a warning for implicitly declared functions; i.e.,
    79         *          functions without prototypes
    80         *      -`-Dfar= `
    81         *          ignore keyword far; this allows one to write code that can
    82         *          be compiled in large model and small model without #ifdef's
    83         */
    84        override config ITarget.Options ccOpts = {
    85            prefix: "-qq -pdsw225 -Dfar= ",
    86            suffix: ""
    87        };
    88    
    89        /*!
    90         *  ======== lnkOpts ========
    91         *  User configurable linker options.
    92         *
    93         *  Defaults:
    94         *  @p(dlist)
    95         *      -`-w`
    96         *          Display linker warnings
    97         *      -`-q`
    98         *          Quite run
    99         *      -`-u`
   100         *          Place unresolved external symbol into symbol table
   101         *      -`-c`
   102         *          ROM autoinitialization model
   103         *      -`-m`
   104         *          create a map file
   105         *      -`-l`
   106         *          archive library file as linker input
   107         */
   108        override config ITarget.Options lnkOpts = {
   109            prefix: "-w -q -u _c_int00",
   110            suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts55.lib"
   111        };
   112    
   113        override config string includeOpts = "-I$(rootDir)/include";
   114    
   115        final override readonly config string sectMap[string] = [
   116            [".text",     "code"],
   117            [".stack",    "stack"],
   118            [".sysstack", "stack"],
   119            [".bss",      "data"],
   120            [".cinit",    "code"],
   121            [".pinit",    "code"],
   122            [".cio",      "code"],
   123            [".args",     "data"],
   124            [".const",    "data"],
   125            [".data",     "data"],
   126            [".switch",   "code"],
   127            [".sysmem",   "code"],
   128            [".far",      "data"],
   129            ["vectors",   "data"],
   130        ];
   131    
   132        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   133            t_IArg          : { size: 2, align: 2 },
   134            t_Char          : { size: 1, align: 1 },
   135            t_Double        : { size: 2, align: 2 },
   136            t_Float         : { size: 2, align: 2 },
   137            t_Fxn           : { size: 2, align: 2 },
   138            t_Int           : { size: 1, align: 1 },
   139            t_Int8          : { size: 1, align: 1 },
   140            t_Int16         : { size: 1, align: 1 },
   141            t_Int32         : { size: 2, align: 2 },
   142            t_Int40         : { size: 4, align: 2 },
   143            t_Long          : { size: 2, align: 2 },
   144            t_LDouble       : { size: 2, align: 2 },
   145            t_LLong         : { size: 4, align: 2 },
   146            t_Ptr           : { size: 1, align: 1 },
   147            t_Short         : { size: 1, align: 1 },
   148        };
   149    
   150        override readonly config Int bitsPerChar = 16;
   151    };
   152    /*
   153     *  @(#) ti.targets; 1, 0, 3,320; 7-29-2009 16:34:45; /db/atree/library/trees/xdctargets/xdctargets-b12x/src/
   154     */
   155