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