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    import xdc.bld.ITarget2;
    13    
    14    /*!
    15     *  ======== IM.xdc ========
    16     *  Common interface for Cortex M bare metal targets
    17     *
    18     *  This defines common parameters of Cortex M bare metal targets. The targets
    19     *  generate code compatible with the "v7M" architecture.
    20     */
    21    metaonly interface IM inherits gnu.targets.ITarget {
    22        override readonly config xdc.bld.ITarget.Model model= {
    23            endian: "little",
    24            codeModel: "thumb2",
    25            shortEnums: true
    26        };
    27    
    28        override readonly config Bool alignDirectiveSupported = true;
    29        override readonly config string rts = "gnu.targets.arm.rtsv7M";
    30        override config string platform     = "ti.platforms.tiva:LM4F232H5QD";
    31    
    32        override config string LONGNAME = "bin/arm-none-eabi-gcc";
    33    
    34        override readonly config String stdInclude = "gnu/targets/arm/std.h";
    35    
    36        override config ITarget2.Options ccOpts = {
    37            prefix: "-Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections -I$(XDCROOT)/packages/gnu/targets/arm/libs/install-native/$(GCCTARG)/include",
    38            suffix: "-Dfar= -D__DYNAMIC_REENT__ "
    39        };
    40    
    41        /*!
    42         *  ======== ccConfigOpts ========
    43         *  User configurable compiler options for the generated config C file.
    44         */
    45        override config ITarget2.Options ccConfigOpts = {
    46            prefix: "-Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections -I$(XDCROOT)/packages/gnu/targets/arm/libs/install-native/$(GCCTARG)/include",
    47            suffix: "-Dfar= -D__DYNAMIC_REENT__ "
    48        };
    49    
    50        readonly config ITarget2.Command arBin = {
    51            cmd: "bin/arm-none-eabi-ar ",
    52            opts: ""
    53        };
    54    
    55        /*!
    56         *  ======== bspLib ========
    57         *  bspLib is assigned the name of the BSP library. The specified library
    58         *  is included on the link line.
    59         *
    60         *  Possible values for this field are "nosys" and "rdimon" with the default
    61         *  being "nosys".
    62         */
    63        config string bspLib = "nosys";
    64    
    65        /*
    66         *  ======== profiles ========
    67         */
    68        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    69            ["debug", {
    70                compileOpts: {
    71                    copts: "-g",
    72                    defs:  "-D_DEBUG_=1",
    73                },
    74                linkOpts: "-g",
    75            }],
    76    
    77            ["release", {
    78                compileOpts: {
    79                    copts: " -O2 ",
    80                },
    81                linkOpts: " ",
    82            }],
    83        ];
    84    
    85        /*
    86         *  ======== compatibleSuffixes ========
    87         */
    88        override config String compatibleSuffixes[] = [];
    89    
    90        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    91            t_IArg          : { size: 4, align: 4 },
    92            t_Char          : { size: 1, align: 1 },
    93            t_Double        : { size: 8, align: 8 },
    94            t_Float         : { size: 4, align: 4 },
    95            t_Fxn           : { size: 4, align: 4 },
    96            t_Int           : { size: 4, align: 4 },
    97            t_Int8          : { size: 1, align: 1 },
    98            t_Int16         : { size: 2, align: 2 },
    99            t_Int32         : { size: 4, align: 4 },
   100            t_Int64         : { size: 8, align: 8 },
   101            t_Long          : { size: 4, align: 4 },
   102            t_LDouble       : { size: 8, align: 8 },
   103            t_LLong         : { size: 8, align: 8 },
   104            t_Ptr           : { size: 4, align: 4 },
   105            t_Short         : { size: 2, align: 2 },
   106            t_Size          : { size: 4, align: 4 },
   107        };
   108    }
   109    /*
   110     *  @(#) gnu.targets.arm; 1, 0, 0,459; 12-19-2013 15:12:03; /db/ztree/library/trees/xdctargets/xdctargets-g41x/src/ xlibrary
   111    
   112     */
   113