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