1    /* 
     2     *  Copyright (c) 2012 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    /*!
    13     *  ======== ITarget ========
    14     *  A IAR extension to the base `xdc.bld.ITarget3` interface.
    15     */
    16    @TargetHeader("xdc/bld/stddefs.xdt")
    17    metaonly interface ITarget inherits xdc.bld.ITarget3 {
    18    
    19        override readonly config String rts = "iar.targets.msp430.rts";
    20    
    21        override config string stdInclude = "iar/targets/msp430/std.h";
    22        
    23        override config String platform = "ti.platforms.msp430:MSP430F5438:1";
    24    
    25        config string binDir = "$(rootDir)/bin/";
    26    
    27        /*!
    28         *  ======== ccOpts ========
    29         *  User configurable compiler options.
    30         *
    31         *  Defaults:
    32         *  @p(dlist)
    33         *      -`--silent`
    34         *          Silent operation
    35         *      -`--diag_suppress`
    36         *          Pa050 complains about Unix EOL characters
    37         *          Go005 complains about function inlining
    38         *  @p
    39         */
    40        override config Options ccOpts = {
    41            prefix: "--silent",
    42            suffix: "--diag_suppress=Pa050,Go005"
    43        };
    44    
    45        /*!
    46         *  ======== asmOpts ========
    47         *  User configurable assembler options.
    48         *
    49         *  Defaults:
    50         *  @p(dlist)
    51         *      -`-S`
    52         *          Silent operation
    53         *  @p
    54         */
    55        override config Options asmOpts = {
    56            prefix: "-S",
    57            suffix: ""
    58        };
    59    
    60        /*!
    61         *  ======== ar ========
    62         *  The command used to create an archive
    63         */
    64        override readonly config Command ar = {
    65            cmd: "xar",
    66            opts: ""
    67        };
    68    
    69        /*!
    70         *  ======== arOpts ========
    71         *  User configurable archiver options.
    72         */
    73        override config Options arOpts = {
    74            prefix: "",
    75            suffix: ""
    76        };
    77    
    78        /*!
    79         *  ======== xlib ========
    80         *  The command used to modify a library
    81         *
    82         *  Defaults:
    83         *  @p(dlist)
    84         *      -`-c`
    85         *        run command line
    86         *  @p
    87         */
    88        readonly config Command xlib = {
    89            cmd: "xlib",
    90            opts: "-c"
    91        };
    92    
    93        /*!
    94         *  ======== xlibOpts ========
    95         *  User configurable xlib options.
    96         *  
    97         *  Defaults:
    98         *  @p(dlist)
    99         *      -`MAKE-LIBRARY`
   100         *        changes a module to library type
   101         *  @p
   102         */
   103        config Options xlibOpts = {
   104            prefix: "",
   105            suffix: "\"MAKE-LIBRARY $@\""
   106        };
   107    
   108        /*!
   109         *  ======== lnk ========
   110         *  The command used to link executables.
   111         */
   112        override readonly config Command lnk = {
   113            cmd: "xlink",
   114            opts: ""
   115        };
   116    
   117        /*!
   118         *  ======== lnkOpts ========
   119         *  User configurable linker options.
   120         *
   121         *  Defaults:
   122         *  @p(dlist)
   123         *      -`-S`
   124         *          Silent operation
   125         *      -`-xens`
   126         *          Cross reference list generated in map file
   127         *      -`-l`
   128         *          Generates a map file
   129         *      -`-rt`
   130         *          Plugins in IAR debugger low level functions
   131         *      -`-e`
   132         *          Redirects function call to another function at link time
   133         *      -`-s`
   134         *          Program entry point
   135         *  @p
   136         */
   137        override config xdc.bld.ITarget2.Options lnkOpts = {
   138            prefix: "-S",
   139            suffix: "-xens -l $(XDCCFGDIR)/$@.map -rt -e_PrintfSmall=_Printf -e_ScanfSmall=_Scanf -s __program_start",
   140        };
   141    
   142        /*!
   143         *  ======== vers ========
   144         *  The command used to get the tool-chain to return a version number.
   145         */
   146        readonly config Command vers = {
   147            cmd: "icc430",
   148            opts: "-v"
   149        };
   150    
   151        /*!
   152         *  ======== extension ========
   153         *  The IAR assembly file extension recognised by this target.
   154         */
   155        override config Extension extensions[string] = [
   156            [".asm", {suf: ".asm", typ: "asm"}],
   157            [".c",   {suf: ".c",   typ: "c"  }],
   158            [".cpp", {suf: ".cpp", typ: "cpp"}],
   159            [".cxx", {suf: ".cxx", typ: "cpp"}],
   160            [".C",   {suf: ".C",   typ: "cpp"}],
   161            [".cc",  {suf: ".cc",  typ: "cpp"}],
   162            [".s43", {suf: ".s43", typ: "asm"}],
   163        ];
   164    
   165        override config String includeOpts = "";
   166    
   167        /*!
   168         *  ======== cmdPrefix ========
   169         *  Prefix to put in front of each command
   170         *
   171         *  This string is put in front of every Command before being passed to
   172         *  the shell for execution.  This string can be used to run the compiler
   173         *  in emulation environments.  
   174         */
   175        config String cmdPrefix = "";
   176    
   177        /*!
   178         *  ======== alignDirectiveSupported ========
   179         *  The compiler supports an align directive.
   180         */
   181        override readonly config Bool alignDirectiveSupported = true;
   182    
   183    }
   184    /*
   185     *  @(#) iar.targets.msp430; 1, 0, 0,0; 2-10-2017 09:06:36; /db/ztree/library/trees/xdctargets/xdctargets-m11/src/ xlibrary
   186    
   187     */
   188