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    /*!
    14     *  ======== IArm.xdc ========
    15     *  Common settings for all Arm targets
    16     */
    17    metaonly interface IArm inherits ITarget {
    18    
    19    //    override readonly config string stdInclude = "ti/targets/arm/std.h";
    20    
    21        override config string platform   = "ti.platforms.sim470xx";
    22    
    23        override config string includeOpts = "-I$(rootDir)/include/rts -I$(rootDir)/include ";
    24    
    25        override readonly config ti.targets.ITarget.Command ar = {
    26            cmd:  "ar470",
    27            opts: "rq"
    28        };
    29    
    30        override readonly config ti.targets.ITarget.Command vers = {
    31            cmd:  "cl470",
    32            opts: "-version"
    33        };
    34    
    35        override readonly config ti.targets.ITarget.Command lnk = {
    36            cmd:  "lnk470",
    37            opts: ""
    38        };
    39    
    40        /*!
    41         *  ======== ccOpts ========
    42         *  User configurable compiler options.
    43         *
    44         *  Defaults:
    45         *  @p(dlist)
    46         *      -`-qq`
    47         *          super quiet mode
    48         *      -`-pdsw225`
    49         *          generate a warning for implicitly declared functions; i.e.,
    50         *          functions without prototypes
    51         */
    52        override config ti.targets.ITarget.Options ccOpts = {
    53            prefix: "-qq -pdsw225",
    54            suffix: ""
    55        };
    56    
    57        /*!
    58         *  ======== asmOpts ========
    59         *  User configurable assembler options.
    60         *
    61         *  Defaults:
    62         *  @p(dlist)
    63         *      -`-qq`
    64         *          super quiet mode
    65         */
    66        override config ti.targets.ITarget.Options asmOpts = {
    67            prefix: "-qq",
    68            suffix: ""
    69        };
    70    
    71        /*!
    72         *  ======== lnkOpts ========
    73         *  User configurable linker options.
    74         *
    75         *  Defaults:
    76         *  @p(dlist)
    77         *      -`-w`
    78         *          Display linker warnings
    79         *      -`-q`
    80         *          Quite run
    81         *      -`-u`
    82         *          Place unresolved external symbol into symbol table
    83         *      -`-c`
    84         *          ROM autoinitialization model
    85         *      -`-m`
    86         *          create a map file
    87         */
    88        override config ti.targets.ITarget.Options lnkOpts = {
    89            prefix: "-w -q -u _c_int00",
    90            suffix: "-c -m $(XDCCFGDIR)/$@.map " /* + -l $(rootDir)/lib/linkLib */
    91        };
    92    
    93        /*!
    94         *  ======== profiles ========
    95         *  Standard options profiles for the TI tool-chain.
    96         */
    97        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    98            ["debug", {
    99                compileOpts: {
   100                    copts: "-g",
   101                    defs:  "-D_DEBUG_=1",
   102                }
   103            }],
   104            ["release", {
   105                compileOpts: {
   106                    copts: "-O2",
   107                },
   108            }],
   109            ["profile", {
   110                compileOpts: {
   111                    copts: "-gp",
   112                },
   113            }],
   114            ["coverage", {
   115                compileOpts: {
   116                    copts: "-gp",
   117                },
   118            }],
   119            ["whole_program", {
   120                compileOpts: {
   121                    copts: "-oe -O2 -ms",
   122                },
   123            }],
   124            ["whole_program_debug", {
   125                compileOpts: {
   126                    copts: "-oe --symdebug:dwarf -ms",
   127                },
   128            }],
   129        ];
   130    
   131    //    override config string sectMap[string] = [
   132    //      [".intvecs", "code"],
   133    
   134    //      [".text", "code"],
   135    //      [".cinit", "code"],
   136    //      [".const", "code"],
   137    //      [".pinit", "code"],
   138    
   139    //      [".bss", "data"],
   140    //      [".sysmem", "data"],
   141    //      [".stack", "stack"],
   142    //      [".args", "data"],
   143    //    ];
   144    
   145        override readonly config Int bitsPerChar = 8;
   146    
   147        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   148            t_IArg          : { size: 4, align: 4 },
   149            t_Char          : { size: 1, align: 1 },
   150            t_Double        : { size: 8, align: 4 },
   151            t_Float         : { size: 4, align: 4 },
   152            t_Fxn           : { size: 4, align: 4 },
   153            t_Int           : { size: 4, align: 4 },
   154            t_Int8          : { size: 1, align: 1 },
   155            t_Int16         : { size: 2, align: 2 },
   156            t_Int32         : { size: 4, align: 4 },
   157            t_Int64         : { size: 8, align: 4 },
   158            t_Long          : { size: 4, align: 4 },
   159            t_LDouble       : { size: 8, align: 4 },
   160            t_LLong         : { size: 8, align: 4 },
   161            t_Ptr           : { size: 4, align: 4 },
   162            t_Short         : { size: 2, align: 2 },
   163        };
   164    }
   165    /*
   166     *  @(#) ti.targets.arm.elf; 1, 0, 0,69; 7-29-2009 16:35:26; /db/atree/library/trees/xdctargets/xdctargets-b12x/src/
   167     */
   168