1    /* 
     2     *  Copyright (c) 2010 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     *  ======== C66.xdc ========
    14     *
    15     */
    16    
    17    /*!
    18     *  ======== C66_big_endian ========
    19     *  TI C66 big endian (COFF)
    20     */
    21    metaonly module C66_big_endian inherits ITarget {
    22        override readonly config string name                 = "C66_big_endian";    
    23        override readonly config string suffix               = "66e";
    24        override readonly config string isa                  = "66";
    25        override readonly config xdc.bld.ITarget.Model model = {
    26            endian: "big",
    27            shortEnums: true
    28        };
    29        override readonly config xdc.bld.ITarget.Module base = ti.targets.C62;
    30    
    31        override readonly config string rts = "ti.targets.rts6000";
    32        override config string platform     = "ti.platforms.simTCI6616";
    33        
    34        override readonly config xdc.bld.ITarget2.Command ar = {
    35            cmd: "ar6x",
    36            opts: "rq"
    37        };
    38    
    39        override readonly config xdc.bld.ITarget2.Command cc = {
    40            cmd: "cl6x -c",
    41            opts: "-mv6600 -me --abi=coffabi"
    42        };
    43    
    44        override readonly config xdc.bld.ITarget2.Command vers = {
    45            cmd: "cl6x",
    46            opts: "--compiler_revision"
    47        };
    48    
    49        override readonly config xdc.bld.ITarget2.Command asm = {
    50            cmd: "cl6x -c",
    51            opts: "-mv6600 -me --abi=coffabi"
    52        };
    53    
    54        override readonly config xdc.bld.ITarget2.Command lnk = {
    55            cmd: "lnk6x",
    56            opts: "--abi=coffabi"
    57        };
    58        
    59        /*!
    60         *  ======== profiles ========
    61         *  The options in "profile" and "coverage" profiles are supported only
    62         *  for the compiler version 6.1 and newer, for this target. If the target
    63         *  is used with the compiler version 6.0, these options are removed
    64         *  from the command line.
    65         */
    66        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    67            ["debug", {
    68                compileOpts: {
    69                    copts: "--symdebug:dwarf",
    70                    defs:  "-D_DEBUG_=1",
    71                }
    72            }],
    73            ["release", {
    74                compileOpts: {
    75                    copts: "-O2",
    76                },
    77            }],
    78            ["profile", {
    79                compileOpts: {
    80                    copts: "--gen_profile_info",
    81                },
    82            }],
    83            ["coverage", {
    84                compileOpts: {
    85                    copts: "--gen_profile_info",
    86                },
    87            }],
    88            ["whole_program", {
    89                compileOpts: {
    90                    copts: "-oe -O2 -mo",
    91                },
    92            }],
    93            ["whole_program_debug", {
    94                compileOpts: {
    95                    copts: "-oe --symdebug:dwarf -mo",
    96                },
    97            }],
    98        ];
    99    
   100        /*!
   101         *  ======== asmOpts ========
   102         *  User configurable assembler options.
   103         *
   104         *  Defaults:
   105         *  @p(dlist)
   106         *      -`-qq`
   107         *          super quiet mode
   108         */
   109        override config xdc.bld.ITarget2.Options asmOpts = {
   110            prefix: "-qq",
   111            suffix: ""
   112        };
   113    
   114        /*!
   115         *  ======== ccOpts ========
   116         *  User configurable compiler options.
   117         *
   118         *  Defaults:
   119         *  @p(dlist)
   120         *      -`-qq`
   121         *          super quiet mode
   122         *      -`-pdsw225`
   123         *          generate a warning for implicitly declared functions; i.e.,
   124         *          functions without prototypes
   125         */
   126        override config xdc.bld.ITarget2.Options ccOpts = {
   127            prefix: "-qq -pdsw225",
   128            suffix: ""
   129        };
   130    
   131        /*!
   132         *  ======== ccConfigOpts ========
   133         *  User configurable compiler options for the generated config C file.
   134         *
   135         *  -mo places all functions into subsections
   136         *  --no_compress helps with compile time with no real difference in
   137         *  code size since the generated config.c is mostly data and small
   138         *  function stubs.
   139         */
   140        override config xdc.bld.ITarget2.Options ccConfigOpts = {
   141            prefix: "$(ccOpts.prefix) -mo",
   142            suffix: "$(ccOpts.suffix)"
   143        };
   144    
   145        /*!
   146         *  ======== lnkOpts ========
   147         *  User configurable linker options.
   148         *
   149         *  Defaults:
   150         *  @p(dlist)
   151         *      -`-w`
   152         *          Display linker warnings
   153         *      -`-q`
   154         *          Quite run
   155         *      -`-u`
   156         *          Place unresolved external symbol into symbol table
   157         *      -`-c`
   158         *          ROM autoinitialization model
   159         *      -`-m`
   160         *          create a map file
   161         *      -`-l`
   162         *          archive library file as linker input
   163         */
   164        override config xdc.bld.ITarget2.Options lnkOpts = {
   165            prefix: "-w -q -u _c_int00",
   166            suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts6600e_coff.lib"
   167        };
   168            
   169        override config string includeOpts = "-I$(rootDir)/include";
   170    
   171        final override readonly config string sectMap[string] =
   172            ti.targets.C62.sectMap;
   173    
   174        override readonly config xdc.bld.ITarget.StdTypes stdTypes = 
   175            ti.targets.C62.stdTypes;
   176        
   177        override readonly config Int bitsPerChar =
   178            ti.targets.C62.bitsPerChar;
   179    }
   180    
   181    /*
   182     *  @(#) ti.targets; 1, 0, 3,401; 9-15-2010 15:03:40; /db/ztree/library/trees/xdctargets/xdctargets-c28x/src/ xlibrary
   183    
   184     */
   185