1    /* 
     2     *  Copyright (c) 2012-2015 Texas Instruments Incorporated
     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     *  ======== IARP32.xdc ========
    14     *
    15     */
    16    
    17    /*!
    18     *  ======== IARP32 ========
    19     *  TI IARP32 interface (little endian)
    20     */
    21    metaonly interface IARP32 inherits ti.targets.ITarget {
    22        override readonly config string isa             = "arp32";
    23    
    24        override readonly config string rts = "ti.targets.arp32.rts";
    25        override config string platform     = "ti.platforms.simARP32";
    26    
    27        override readonly config xdc.bld.ITarget2.Command ar = {
    28            cmd: "ar-arp32",
    29            opts: "rq"
    30        };
    31    
    32        override readonly config xdc.bld.ITarget2.Command lnk = {
    33            cmd: "cl-arp32",
    34            opts: "-z"
    35        };
    36    
    37        override readonly config xdc.bld.ITarget2.Command vers = {
    38            cmd: "cl-arp32",
    39            opts: "--compiler_revision"
    40        };
    41    
    42        /*!
    43         *  ======== asmOpts ========
    44         *  User configurable assembler options.
    45         *
    46         *  Defaults:
    47         *  @p(dlist)
    48         *      -`-qq`
    49         *          super quiet mode
    50         */
    51        override config xdc.bld.ITarget2.Options asmOpts = {
    52            prefix: "-qq",
    53            suffix: ""
    54        };
    55    
    56        /*!
    57         *  ======== ccOpts ========
    58         *  User configurable compiler options.
    59         *
    60         *  Defaults:
    61         *  @p(dlist)
    62         *      -`-qq`
    63         *          super quiet mode
    64         *      -`-pdsw225`
    65         *          generate a warning for implicitly declared functions; i.e.,
    66         *          functions without prototypes
    67         */
    68        override config xdc.bld.ITarget2.Options ccOpts = {
    69            prefix: "-qq -pdsw225",
    70            suffix: ""
    71        };
    72    
    73        /*!
    74         *  ======== ccConfigOpts ========
    75         *  User configurable compiler options for the generated config C file.
    76         */
    77        override config xdc.bld.ITarget2.Options ccConfigOpts = {
    78            prefix: "$(ccOpts.prefix)",
    79            suffix: "$(ccOpts.suffix)"
    80        };
    81    
    82        override config string includeOpts = "-I$(rootDir)/include";
    83    
    84        final override readonly config string sectMap[string] = [
    85            [".text", "code"],
    86            [".stack", "stack"],
    87            [".bss", "data"],
    88            [".cinit", "data"],
    89            [".init_array", "data"],
    90            [".const", "data"],
    91            [".data", "data"],
    92            [".switch", "data"],
    93            [".sysmem", "data"],
    94            [".far", "data"],
    95            [".args", "data"],
    96            [".cio", "data"],
    97            [".fardata", "data"],
    98            [".rodata", "data"],
    99        ];
   100    
   101        final override readonly config Bool splitMap[string] = [
   102            [".text", true],
   103            [".switch", true],
   104            [".cio", true],
   105        ];
   106    
   107        override readonly config Int bitsPerChar = 8;
   108    
   109        /*!
   110         *  ======== profiles ========
   111         *  Standard options profiles for the TI tool-chain.
   112         */
   113        override config xdc.bld.ITarget.OptionSet profiles[string] = [
   114            ["debug", {
   115                compileOpts: {
   116                    copts: "--symdebug:dwarf",
   117                    defs:  "-D_DEBUG_=1",
   118                }
   119            }],
   120            ["release", {
   121                compileOpts: {
   122                    copts: "-O2",
   123                },
   124            }],
   125            ["profile", {
   126                compileOpts: {
   127                    copts: "--symdebug:dwarf",
   128                },
   129            }],
   130            ["coverage", {
   131                compileOpts: {
   132                    copts: "--symdebug:dwarf",
   133                },
   134            }]
   135        ];
   136    
   137        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   138            t_IArg          : { size: 4, align: 4 },
   139            t_Char          : { size: 1, align: 1 },
   140            t_Double        : { size: 8, align: 4 },
   141            t_Float         : { size: 4, align: 4 },
   142            t_Fxn           : { size: 4, align: 4 },
   143            t_Int           : { size: 4, align: 4 },
   144            t_Int8          : { size: 1, align: 1 },
   145            t_Int16         : { size: 2, align: 2 },
   146            t_Int32         : { size: 4, align: 4 },
   147            t_Int64         : { size: 8, align: 4 },
   148            t_Long          : { size: 4, align: 4 },
   149            t_LDouble       : { size: 8, align: 4 },
   150            t_LLong         : { size: 8, align: 4 },
   151            t_Ptr           : { size: 4, align: 4 },
   152            t_Short         : { size: 2, align: 2 },
   153            t_Size          : { size: 4, align: 4 },
   154        };
   155    
   156        override config String stdInclude = "ti/targets/arp32/elf/std.h";
   157    
   158        override config String binaryParser = "ti.targets.omf.elf.Elf32";
   159    }
   160    /*
   161     *  @(#) ti.targets.arp32.elf; 1, 0, 0,0; 2-10-2017 09:06:44; /db/ztree/library/trees/xdctargets/xdctargets-m11/src/ xlibrary
   162    
   163     */
   164