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     *  ======== ITarget.xdc ========
    14     *
    15     */
    16    
    17    /*!
    18     *  ======== ITarget ========
    19     *  An ELF extension to the `ti.targets.ITarget` interface.
    20     */
    21    metaonly interface ITarget inherits ti.targets.ITarget {
    22    
    23        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    24            ["debug", {
    25                compileOpts: {
    26                    copts: "--symdebug:dwarf",
    27                    defs:  "-D_DEBUG_=1",
    28                }
    29            }],
    30            ["release", {
    31                compileOpts: {
    32                    copts: "-O2",
    33                },
    34            }],
    35            ["profile", {
    36                compileOpts: {
    37                    copts: "--gen_profile_info",
    38                },
    39            }],
    40            ["coverage", {
    41                compileOpts: {
    42                    copts: "--gen_profile_info",
    43                },
    44            }],
    45            ["whole_program", {
    46                compileOpts: {
    47                    copts: "-oe -O2 -mo",
    48                },
    49            }],
    50            ["whole_program_debug", {
    51                compileOpts: {
    52                    copts: "-oe --symdebug:dwarf -mo",
    53                },
    54            }],
    55        ];
    56    
    57        final override readonly config string sectMap[string] = [
    58            [".text", "code"],
    59            [".ti.decompress", "code"],
    60            [".stack", "stack"],
    61            [".bss", "data"],
    62            [".cinit", "data"],
    63            [".pinit", "data"],
    64            [".init_array", "data"],
    65            [".const", "data"],
    66            [".data", "data"],
    67            [".rodata", "data"],
    68            [".neardata", "data"],
    69            [".fardata", "data"],
    70            [".switch", "data"],
    71            [".sysmem", "data"],
    72            [".far", "data"],
    73            [".args", "data"],
    74            [".cio", "data"],
    75            [".ti.handler_table", "data"],
    76        ];
    77    
    78        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    79            t_IArg          : { size: 4, align: 4 },
    80            t_Char          : { size: 1, align: 1 },
    81            t_Double        : { size: 8, align: 8 },
    82            t_Float         : { size: 4, align: 4 },
    83            t_Fxn           : { size: 4, align: 4 },
    84            t_Int           : { size: 4, align: 4 },
    85            t_Int8          : { size: 1, align: 1 },
    86            t_Int16         : { size: 2, align: 2 },
    87            t_Int32         : { size: 4, align: 4 },
    88            t_Int64         : { size: 8, align: 8 },
    89            t_Long          : { size: 4, align: 4 },
    90            t_LDouble       : { size: 8, align: 8 },
    91            t_LLong         : { size: 8, align: 8 },
    92            t_Ptr           : { size: 4, align: 4 },
    93            t_Short         : { size: 2, align: 2 },
    94            t_Size          : { size: 4, align: 4 },
    95        };
    96        
    97        override config String stdInclude = "ti/targets/elf/std.h";
    98    
    99        override config String binaryParser = "ti.targets.omf.elf.Elf32";
   100    }
   101    /*
   102     *  @(#) ti.targets.elf; 1, 0, 0,298; 4-27-2012 17:07:43; /db/ztree/library/trees/xdctargets/xdctargets-f21x/src/ xlibrary
   103    
   104     */
   105