1    /* 
     2     *  Copyright (c) 2008-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    /*
    14     *  ======== C28.xdc ========
    15     *
    16     */
    17    
    18    /*!
    19     *  ======== C28 ========
    20     *  TI C28 default runtime model (little endian)
    21     */
    22    metaonly module C28 inherits ti.targets.ITarget {
    23        override readonly config string name                = "C28";
    24        override readonly config string suffix              = "28";
    25        override readonly config string isa                 = "28";
    26        override readonly config xdc.bld.ITarget.Model model= {endian: "little"};
    27        override readonly config string rts                 = "ti.targets.rts2800";
    28        final override readonly config Bool alignDirectiveSupported = false;
    29    
    30        /*!
    31         *  ======== ar ========
    32         *  Define archiver executable
    33         *
    34         *  Options:
    35         *  @p(dlist)
    36         *      -`-r`
    37         *          replace file
    38         *      -`-q`
    39         *          quiet mode
    40         */
    41        override readonly config xdc.bld.ITarget2.Command ar = {
    42            cmd: "ar2000",
    43            opts: "rq"
    44        };
    45    
    46        /*!
    47         *  ======== cc ========
    48         *  Define compiler executable
    49         *
    50         *  Options:
    51         *  @p(dlist)
    52         *      -`-c`
    53         *          no linking
    54         *      -`-v28`
    55         *          compile for c28x.
    56         */
    57        override readonly config xdc.bld.ITarget2.Command cc = {
    58            cmd: "cl2000 -c",
    59            opts: "-v28"
    60        };
    61    
    62        /*!
    63         *  ======== vers ========
    64         *  Define the vers command
    65         */
    66        override readonly config xdc.bld.ITarget2.Command vers = {
    67            cmd: "cl2000",
    68            opts: "--compiler_revision"
    69        };
    70    
    71        /*!
    72         *  ======== asm ========
    73         *  Define assembler executable
    74         *
    75         *  Options:
    76         *  @p(dlist)
    77         *      -`-c`
    78         *          no linking
    79         *      -`-v28`
    80         *          compile for c28x.
    81         *
    82         */
    83        override readonly config xdc.bld.ITarget2.Command asm = {
    84            cmd: "cl2000 -c",
    85            opts: "-v28"
    86        };
    87    
    88        /*!
    89         *  Define linker executable
    90         */
    91        override readonly config xdc.bld.ITarget2.Command lnk = {
    92            cmd: "cl2000",
    93            opts: "-z"
    94        };
    95    
    96        /*!
    97         *  ======== asmOpts ========
    98         *  User configurable assembler options.
    99         *
   100         *  Defaults:
   101         *  @p(dlist)
   102         *      -`-qq`
   103         *          super quiet mode
   104         */
   105        override config xdc.bld.ITarget2.Options asmOpts = {
   106            prefix: "-qq",
   107            suffix: ""
   108        };
   109    
   110        /*!
   111         *  ======== ccOpts ========
   112         *  Compiler options
   113         *  @p(dlist)
   114         *      -`-qq`
   115         *          super quiet mode
   116         *      -`-pdsw225`
   117         *          generate a warning for implicitly declared functions; i.e.,
   118         *          functions without prototypes
   119         */
   120        override config xdc.bld.ITarget2.Options ccOpts = {
   121            prefix: "-qq -pdsw225",
   122            suffix: ""
   123        };
   124    
   125        /*!
   126         *  ======== profiles ========
   127         *  Standard options profiles for the TI tool-chain.
   128         */
   129        override config xdc.bld.ITarget.OptionSet profiles[string] = [
   130            ["debug", {
   131                compileOpts: {
   132                    copts: "-g",
   133                    defs:  "-D_DEBUG_=1",
   134                }
   135            }],
   136            ["release", {
   137                compileOpts: {
   138                    copts: "-O2",
   139                },
   140            }],
   141            ["profile", {
   142                compileOpts: {
   143                    copts: "-gp",
   144                },
   145            }],
   146            ["coverage", {
   147                compileOpts: {
   148                    copts: "-gp",
   149                },
   150            }],
   151        ];
   152    
   153        /*  Include search path  */
   154        override config string includeOpts = "-I$(rootDir)/include";
   155    
   156        final override readonly config string sectMap[string] = [
   157            [".text", "code"],
   158            [".switch", "code"],
   159            [".data", "data"],
   160            [".cinit", "code"],
   161            [".bss", "data"],
   162            [".ebss", "data"],
   163            [".econst", "code"],
   164            [".const", "code"],
   165            [".stack", "stack"],
   166            [".sysmem", "data"],
   167            [".esysmem", "data"],
   168            [".pinit", "code"],
   169            [".args", "data"],
   170            [".cio", "data"],
   171        ];
   172    
   173        final override readonly config Bool splitMap[string] = [
   174            [".text", true],
   175            [".const", true],
   176            [".econst", true],
   177            [".ebss", true],
   178            [".data", true],
   179            [".switch", true],
   180            [".far", true],
   181            [".args", true],
   182            [".cio", true]
   183        ];
   184    
   185        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
   186            t_IArg          : { size: 2, align: 2 },
   187            t_Char          : { size: 1, align: 1 },
   188            t_Double        : { size: 2, align: 2 },
   189            t_Float         : { size: 2, align: 2 },
   190            t_Fxn           : { size: 2, align: 1 }, /* near */
   191            t_Int           : { size: 1, align: 1 },
   192            t_Int8          : { size: 1, align: 1 },
   193            t_Int16         : { size: 1, align: 1 },
   194            t_Int32         : { size: 2, align: 2 },
   195            t_Int64         : { size: 4, align: 2 },
   196            t_Long          : { size: 2, align: 2 },
   197            t_LDouble       : { size: 2, align: 2 },
   198            t_LLong         : { size: 4, align: 2 },
   199            t_Ptr           : { size: 1, align: 1 },
   200            t_Short         : { size: 1, align: 1 },
   201            t_Size          : { size: 2, align: 2 },
   202        };
   203    
   204        override readonly config Int bitsPerChar = 16;
   205    }
   206    /*
   207     *  @(#) ti.targets; 1, 0, 3,0; 2-10-2017 09:06:40; /db/ztree/library/trees/xdctargets/xdctargets-m11/src/ xlibrary
   208    
   209     */
   210