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