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 ti.targets.ITarget {
    18    
    19        override config String stdInclude = "ti/targets/arm/elf/std.h";
    20    
    21        override config string platform   = "ti.platforms.sim470xx";
    22    
    23        override config string includeOpts =
    24            "-I$(rootDir)/include/rts -I$(rootDir)/include ";
    25    
    26        override readonly config xdc.bld.ITarget.Model model = {
    27            shortEnums: true,
    28        };
    29    
    30        override readonly config xdc.bld.ITarget2.Command ar = {
    31            cmd:  "armar",
    32            opts: "rq"
    33        };
    34    
    35        override readonly config xdc.bld.ITarget2.Command vers = {
    36            cmd:  "armcl",
    37            opts: "--compiler_revision"
    38        };
    39    
    40        override readonly config xdc.bld.ITarget2.Command lnk = {
    41            cmd:  "armlnk",
    42            opts: ""
    43        };
    44    
    45        /*!
    46         *  ======== ccOpts ========
    47         *  User configurable compiler options.
    48         *
    49         *  Defaults:
    50         *  @p(dlist)
    51         *      -`-qq`
    52         *          super quiet mode
    53         *      -`-pdsw225`
    54         *          generate a warning for implicitly declared functions; i.e.,
    55         *          functions without prototypes
    56         */
    57        override config xdc.bld.ITarget2.Options ccOpts = {
    58            prefix: "-qq -pdsw225",
    59            suffix: ""
    60        };
    61    
    62        /*!
    63         *  ======== ccConfigOpts ========
    64         *  User configurable compiler options for the generated config C file.
    65         *      -`--fp_mode=strict`
    66         *          disable conversion of double-precision computations to
    67         *          single-precision computations when the result is assigned to
    68         *          a single-precision variable.
    69         */
    70        override config xdc.bld.ITarget2.Options ccConfigOpts = {
    71            prefix: "$(ccOpts.prefix) -ms --fp_mode=strict",
    72            suffix: "$(ccOpts.suffix)"
    73        };
    74    
    75        /*!
    76         *  ======== asmOpts ========
    77         *  User configurable assembler options.
    78         *
    79         *  Defaults:
    80         *  @p(dlist)
    81         *      -`-qq`
    82         *          super quiet mode
    83         */
    84        override config xdc.bld.ITarget2.Options asmOpts = {
    85            prefix: "-qq",
    86            suffix: ""
    87        };
    88    
    89        /*!
    90         *  ======== profiles ========
    91         *  Standard options profiles for the TI tool-chain.
    92         */
    93        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    94            ["debug", {
    95                compileOpts: {
    96                    copts: "--symdebug:dwarf",
    97                    defs:  "-D_DEBUG_=1",
    98                }
    99            }],
   100            ["release", {
   101                compileOpts: {
   102                    copts: "-O2",
   103                },
   104            }],
   105            ["profile", {
   106                compileOpts: {
   107                    copts: "--symdebug:dwarf",
   108                },
   109            }],
   110            ["coverage", {
   111                compileOpts: {
   112                    copts: "--symdebug:dwarf",
   113                },
   114            }],
   115            ["whole_program", {
   116                compileOpts: {
   117                    copts: "-oe -O2 -ms",
   118                },
   119            }],
   120            ["whole_program_debug", {
   121                compileOpts: {
   122                    copts: "-oe --symdebug:dwarf -ms",
   123                },
   124            }],
   125        ];
   126    
   127        final override readonly config string sectMap[string] = [
   128            [".text", "code"],
   129            [".stack", "stack"],
   130            [".bss", "data"],
   131            [".binit", "code"],
   132            [".cinit", "code"],
   133            [".init_array", "code"],
   134            [".const", "code"],
   135            [".data", "data"],
   136            [".rodata", "data"],
   137            [".neardata", "data"],
   138            [".fardata", "data"],
   139            [".switch", "data"],
   140            [".sysmem", "data"],
   141            [".far", "data"],
   142            [".args", "data"],
   143            [".cio", "data"],
   144            [".ARM.exidx", "data"],
   145            [".ARM.extab", "data"]
   146        ];
   147    
   148        override readonly config Bool splitMap[string] = [
   149            [".text", true],
   150            [".const", true],
   151            [".data", true],
   152            [".fardata", true],
   153            [".switch", true],
   154            [".far", true],
   155            [".args", true],
   156            [".cio", true],
   157            [".ARM.extab", true]
   158        ];
   159    
   160        override readonly config Int bitsPerChar = 8;
   161    
   162        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   163            t_IArg          : { size: 4, align: 4 },
   164            t_Char          : { size: 1, align: 1 },
   165            t_Double        : { size: 8, align: 8 },
   166            t_Float         : { size: 4, align: 4 },
   167            t_Fxn           : { size: 4, align: 4 },
   168            t_Int           : { size: 4, align: 4 },
   169            t_Int8          : { size: 1, align: 1 },
   170            t_Int16         : { size: 2, align: 2 },
   171            t_Int32         : { size: 4, align: 4 },
   172            t_Int64         : { size: 8, align: 8 },
   173            t_Long          : { size: 4, align: 4 },
   174            t_LDouble       : { size: 8, align: 8 },
   175            t_LLong         : { size: 8, align: 8 },
   176            t_Ptr           : { size: 4, align: 4 },
   177            t_Short         : { size: 2, align: 2 },
   178            t_Size          : { size: 4, align: 4 },
   179        };
   180    
   181        override config String binaryParser = "ti.targets.omf.elf.Elf32";
   182    }
   183    /*
   184     *  @(#) ti.targets.arm.elf; 1, 0, 0,418; 3-17-2014 16:50:20; /db/ztree/library/trees/xdctargets/xdctargets-h18x/src/ xlibrary
   185    
   186     */
   187