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     *  ======== GCArmv6.xdc ========
    16     *  This module defines an embedded target for Linux on Arm. The target
    17     *  generates code compatible with the "v6" architecture.
    18     *
    19     */
    20    metaonly module GCArmv6 inherits gnu.targets.ITarget {
    21        override readonly config string name                = "GCArmv6";    
    22        override readonly config string os                  = "Linux";      
    23        override readonly config string suffix              = "v6";
    24        override readonly config string isa                 = "v6";
    25        override readonly config xdc.bld.ITarget.Model model= {
    26            endian: "little"
    27        };
    28    
    29        override readonly config string rts = "gnu.targets.codesourcery.rtsv6";
    30        override config string platform     = "ti.platforms.evm2530";
    31        
    32        override config string LONGNAME = "/bin/arm-none-linux-gnueabi-gcc";
    33    
    34        override readonly config Bool CYGWIN     = true;
    35    
    36        override readonly config String stdInclude = "gnu/targets/codesourcery/std.h";
    37    
    38        /*!
    39         *  ======== cc ========
    40         *  The compile command
    41         *
    42         *  The following options do not impact the content of the output file. They
    43         *  only generate additional output containg make dependencies.
    44         *
    45         *  @p(dlist)
    46         *      -`-MD`
    47         *          generate make dependency rules
    48         *      -`-MF`
    49         *          the next argument ($@.dep) is the name for the dependency
    50         *          output file
    51         *
    52         */
    53        override readonly config ITarget2.Command cc = {
    54            cmd: "$(rootDir)/$(LONGNAME) -c -MD -MF $@.dep",
    55            opts: "-march=armv6"
    56        };
    57    
    58        override readonly config ITarget2.Command asm = {
    59            cmd: "$(rootDir)/$(LONGNAME) -c -x assembler",
    60            opts: "-march=armv6"
    61        };
    62    
    63        override config ITarget2.Options ccOpts = {
    64            prefix: "-fPIC -Wunused",
    65            suffix: "-Dfar= "
    66        };
    67    
    68        override config ITarget2.Options lnkOpts = {
    69            prefix: "",
    70            suffix: "-lstdc++ -L$(rootDir)/$(GCCTARG)/lib"
    71        };
    72            
    73        /*
    74         *  ======== includeOpts ========
    75         */
    76        override config string includeOpts = "";
    77    
    78        /*
    79         *  ======== compatibleSuffixes ========
    80         */
    81        override config String compatibleSuffixes[] = ["v5T", "470MV", "v5t"];
    82    
    83        override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
    84            t_IArg          : { size: 4, align: 4 },
    85            t_Char          : { size: 1, align: 1 },
    86            t_Double        : { size: 8, align: 4 },
    87            t_Float         : { size: 4, align: 4 },
    88            t_Fxn           : { size: 4, align: 4 },
    89            t_Int           : { size: 4, align: 4 },
    90            t_Int8          : { size: 1, align: 1 },
    91            t_Int16         : { size: 2, align: 2 },
    92            t_Int32         : { size: 4, align: 4 },
    93            t_Int64         : { size: 8, align: 4 },
    94            t_Long          : { size: 4, align: 4 },
    95            t_LDouble       : { size: 8, align: 4 },
    96            t_LLong         : { size: 8, align: 4 },
    97            t_Ptr           : { size: 4, align: 4 },
    98            t_Short         : { size: 2, align: 2 },
    99            t_Size          : { size: 4, align: 4 },
   100        };
   101    }
   102    /*
   103     *  @(#) gnu.targets.codesourcery; 1, 0, 0, 0,389; 4-27-2012 17:31:31; /db/ztree/library/trees/xdctargets/xdctargets-f21x/src/ xlibrary
   104    
   105     */
   106