1    /*
     2     *  Copyright 2018 by Texas Instruments Incorporated.
     3     *
     4     */
     5    
     6    /*
     7     *  Copyright (c) 2008-2017 Texas Instruments and others.
     8     *  All rights reserved. This program and the accompanying materials
     9     *  are made available under the terms of the Eclipse Public License v1.0
    10     *  which accompanies this distribution, and is available at
    11     *  http://www.eclipse.org/legal/epl-v10.html
    12     *
    13     *  Contributors:
    14     *      Texas Instruments - initial implementation
    15     */
    16    import xdc.bld.ITarget2;
    17    
    18    /*!
    19     *  ======== IM.xdc ========
    20     *  Common interface for Cortex M bare metal targets
    21     *
    22     *  This defines common parameters of Cortex M bare metal targets. The targets
    23     *  generate code compatible with the "v7M" or "v8M" architecture.
    24     */
    25    metaonly interface IM inherits gnu.targets.arm.ITarget {
    26        override readonly config xdc.bld.ITarget.Model model= {
    27            endian: "little",
    28            codeModel: "thumb2",
    29            shortEnums: true
    30        };
    31    
    32        override readonly config Bool alignDirectiveSupported = true;
    33        override readonly config string rts = "gnu.targets.arm.rtsv7M";
    34        override config string platform     = "ti.platforms.tiva:TM4C1294NCPDT";
    35    
    36        override config string GCCTARG = "arm-none-eabi";
    37    
    38        override readonly config String stdInclude = "gnu/targets/arm/std.h";
    39    
    40        override config ITarget2.Options ccOpts = {
    41            prefix: "-Wunused -Wunknown-pragmas -ffunction-sections -fdata-sections ",
    42            suffix: "-Dfar= -D__DYNAMIC_REENT__ "
    43        };
    44    
    45        /*!
    46         *  ======== ccConfigOpts ========
    47         *  User configurable compiler options for the generated config C file.
    48         */
    49        override config ITarget2.Options ccConfigOpts = {
    50            prefix: "$(ccOpts.prefix)",
    51            suffix: "$(ccOpts.suffix)"
    52        };
    53    
    54        readonly config ITarget2.Command arBin = {
    55            cmd: "bin/arm-none-eabi-ar ",
    56            opts: ""
    57        };
    58    
    59        /*!
    60         *  ======== bspLib ========
    61         *  bspLib is assigned the name of the BSP library. The specified library
    62         *  is included on the link line.
    63         *
    64         *  Possible values for this field are "nosys" and "rdimon" with the default
    65         *  being "nosys".
    66         */
    67        override config string bspLib = "nosys";
    68    
    69        /*
    70         *  ======== profiles ========
    71         */
    72        override config xdc.bld.ITarget.OptionSet profiles[string] = [
    73            ["debug", {
    74                compileOpts: {
    75                    copts: "-g",
    76                    defs:  "-D_DEBUG_=1",
    77                },
    78                linkOpts: "-g",
    79            }],
    80    
    81            ["release", {
    82                compileOpts: {
    83                    copts: " -O2 ",
    84                },
    85                linkOpts: " ",
    86            }],
    87        ];
    88    
    89        /*
    90         *  ======== compatibleSuffixes ========
    91         */
    92        override config String compatibleSuffixes[] = [];
    93    
    94        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    95            t_IArg          : { size: 4, align: 4 },
    96            t_Char          : { size: 1, align: 1 },
    97            t_Double        : { size: 8, align: 8 },
    98            t_Float         : { size: 4, align: 4 },
    99            t_Fxn           : { size: 4, align: 4 },
   100            t_Int           : { size: 4, align: 4 },
   101            t_Int8          : { size: 1, align: 1 },
   102            t_Int16         : { size: 2, align: 2 },
   103            t_Int32         : { size: 4, align: 4 },
   104            t_Int64         : { size: 8, align: 8 },
   105            t_Long          : { size: 4, align: 4 },
   106            t_LDouble       : { size: 8, align: 8 },
   107            t_LLong         : { size: 8, align: 8 },
   108            t_Ptr           : { size: 4, align: 4 },
   109            t_Short         : { size: 2, align: 2 },
   110            t_Size          : { size: 4, align: 4 },
   111        };
   112    }
   113    /*
   114     *  @(#) gnu.targets.arm; 1, 0, 0,0; 9-28-2018 17:07:31; /db/ztree/library/trees/xdctargets/xdctargets-r12/src/ xlibrary
   115    
   116     */
   117