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