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     *  ======== C64P.xdc ========
    14     *
    15     */
    16    
    17    /*!
    18     *  ======== C64P ========
    19     *  TI C64P default runtime model (little endian)
    20     */
    21    metaonly module C64P inherits ti.targets.ITarget {
    22        override readonly config string name                 = "C64P";
    23        override readonly config string suffix               = "64P";
    24        override readonly config string isa                  = "64P";
    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.sim6xxx:TMS320CDM420";
    32        
    33        /*
    34         *  ======== compatibleSuffixes ========
    35         */
    36        override config String compatibleSuffixes[] = ["64", "62"];
    37    
    38        override readonly config xdc.bld.ITarget2.Command ar = {
    39            cmd: "ar6x",
    40            opts: "rq"
    41        };
    42    
    43        override readonly config xdc.bld.ITarget2.Command cc = {
    44            cmd: "cl6x -c",
    45            opts: "-mv64p"
    46        };
    47    
    48        override readonly config xdc.bld.ITarget2.Command vers = {
    49            cmd: "cl6x",
    50            opts: "--compiler_revision"
    51        };
    52    
    53        override readonly config xdc.bld.ITarget2.Command asm = {
    54            cmd: "cl6x -c",
    55            opts: "-mv64p"
    56        };
    57    
    58        override readonly config xdc.bld.ITarget2.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 xdc.bld.ITarget2.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 xdc.bld.ITarget2.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 xdc.bld.ITarget2.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 xdc.bld.ITarget2.Options lnkOpts = {
   169            prefix: "-w -q -u _c_int00",
   170            suffix: "-c -m $(XDCCFGDIR)/$@.map -l $(rootDir)/lib/rts64plus.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 = C62.stdTypes;
   179        
   180        override readonly config Int bitsPerChar = C62.bitsPerChar;
   181    }
   182    /*
   183     *  @(#) ti.targets; 1, 0, 3,595; 9-27-2012 15:05:49; /db/ztree/library/trees/xdctargets/xdctargets-f36x/src/ xlibrary
   184    
   185     */
   186