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            ["whole_program", {
    36                compileOpts: {
    37                    copts: "-oe -O2 -mo",
    38                },
    39            }],
    40            ["whole_program_debug", {
    41                compileOpts: {
    42                    copts: "-oe --symdebug:dwarf -mo",
    43                },
    44            }],
    45        ];
    46    
    47        final override readonly config string sectMap[string] = [
    48            [".text", "code"],
    49            [".ti.decompress", "code"],
    50            [".stack", "stack"],
    51            [".bss", "data"],
    52            [".cinit", "data"],
    53            [".pinit", "data"],
    54            [".init_array", "data"],
    55            [".const", "data"],
    56            [".data", "data"],
    57            [".rodata", "data"],
    58            [".neardata", "data"],
    59            [".fardata", "data"],
    60            [".switch", "data"],
    61            [".sysmem", "data"],
    62            [".far", "data"],
    63            [".args", "data"],
    64            [".cio", "data"],
    65            [".ti.handler_table", "data"],
    66        ];
    67    
    68        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    69            t_IArg          : { size: 4, align: 4 },
    70            t_Char          : { size: 1, align: 1 },
    71            t_Double        : { size: 8, align: 8 },
    72            t_Float         : { size: 4, align: 4 },
    73            t_Fxn           : { size: 4, align: 4 },
    74            t_Int           : { size: 4, align: 4 },
    75            t_Int8          : { size: 1, align: 1 },
    76            t_Int16         : { size: 2, align: 2 },
    77            t_Int32         : { size: 4, align: 4 },
    78            t_Int64         : { size: 8, align: 8 },
    79            t_Long          : { size: 4, align: 4 },
    80            t_LDouble       : { size: 8, align: 8 },
    81            t_LLong         : { size: 8, align: 8 },
    82            t_Ptr           : { size: 4, align: 4 },
    83            t_Short         : { size: 2, align: 2 },
    84            t_Size          : { size: 4, align: 4 },
    85        };
    86        
    87        override config String stdInclude = "ti/targets/elf/std.h";
    88    
    89        override config String binaryParser = "ti.targets.omf.elf.Elf32";
    90    }
    91    /*
    92     *  @(#) ti.targets.elf; 1, 0, 0,417; 3-28-2013 16:05:17; /db/ztree/library/trees/xdctargets/xdctargets-f60x/src/ xlibrary
    93    
    94     */
    95