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.stellaris: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",
    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",
    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         *  ======== profiles ========
    57         */
    58        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    59            ["debug", {
    60                compileOpts: {
    61                    copts: "-g",
    62                    defs:  "-D_DEBUG_=1",
    63                },
    64                linkOpts: "-g",
    65            }],
    66    
    67            ["release", {
    68                compileOpts: {
    69                    copts: " -O2 ",
    70                },
    71                linkOpts: " ",
    72            }],
    73        ];
    74    
    75        /*
    76         *  ======== compatibleSuffixes ========
    77         */
    78        override config String compatibleSuffixes[] = [];
    79    
    80        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    81            t_IArg          : { size: 4, align: 4 },
    82            t_Char          : { size: 1, align: 1 },
    83            t_Double        : { size: 8, align: 8 },
    84            t_Float         : { size: 4, align: 4 },
    85            t_Fxn           : { size: 4, align: 4 },
    86            t_Int           : { size: 4, align: 4 },
    87            t_Int8          : { size: 1, align: 1 },
    88            t_Int16         : { size: 2, align: 2 },
    89            t_Int32         : { size: 4, align: 4 },
    90            t_Int64         : { size: 8, align: 8 },
    91            t_Long          : { size: 4, align: 4 },
    92            t_LDouble       : { size: 8, align: 8 },
    93            t_LLong         : { size: 8, align: 8 },
    94            t_Ptr           : { size: 4, align: 4 },
    95            t_Short         : { size: 2, align: 2 },
    96            t_Size          : { size: 4, align: 4 },
    97        };
    98    }
    99    /*
   100     *  @(#) gnu.targets.arm; 1, 0, 0,435; 7-17-2013 22:32:46; /db/ztree/library/trees/xdctargets/xdctargets-g32x/src/ xlibrary
   101    
   102     */
   103