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