1    /* --COPYRIGHT--,EPL
     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     * --/COPYRIGHT--*/
    12    /*
    13     *  ======== Platform.xdc ========
    14     */
    15    package ti.platforms.msp430;
    16    
    17    /*!
    18     *  ======== Platform ========
    19     *  A generic platform that supports any MSP430 device
    20     *
    21     *  The device to be used by this platform is passed as the platform instance
    22     *  name. On the `xdc.tools.configuro` command line, it is done in the
    23     *  following way:
    24     *  @p(code)
    25     *  xs xdc.tools.configuro ... -p "ti.platforms.msp430:MSP430F2274"
    26     *  @p
    27     *
    28     *  In package.bld, the platform instance is selected as in:
    29     *  @p(code)
    30     *  Pkg.addExecutable("test", target, "ti.platforms.msp430:MSP430F5438");
    31     *  @
    32     */
    33    metaonly module Platform inherits xdc.platform.IPlatform
    34    {
    35        config xdc.platform.IPlatform.Board BOARD = { 
    36            id:             "0",
    37            boardName:      "msp430",
    38            boardFamily:    null,
    39            boardRevision:  null
    40        };
    41    
    42        /*!
    43         *  ======== nameFormat ========
    44         *  Encoding of instance creation parameters in the instance's name
    45         * 
    46         *  For this platform, the parameters `deviceName` and `includeLinkCmdFile`
    47         *  can be encoded in the instance name supplied on `xdc.tools.configuro`
    48         *  command line, for example:
    49         *  @p(code)
    50         *      xs xdc.tools.configuro ... -p ti.platforms.MSP430:MSP430F5438:1
    51         *  @p
    52         *  Optional parameters can be omitted:
    53         *  @p(code)
    54         *      xs xdc.tools.configuro ... -p ti.platforms.MSP430:MSP430F5438
    55         *  @p
    56         */
    57         readonly config string nameFormat = "$(deviceName):$(includeLinkCmdFile)";
    58    
    59    instance:
    60    
    61        config xdc.platform.IExeContext.Cpu CPU = { 
    62            id:             "0",
    63            clockRate:      1.0,
    64            catalogName:    "ti.catalog.msp430",
    65            deviceName:     "MSP430",
    66            revision:       "",
    67        };
    68    
    69        /*!
    70         *  ======== deviceName ========
    71         *  The name of an `ICpuDataSheet` module for the device
    72         *
    73         *  This parameter is optional; the device name name also be specified
    74         *  in the name of the the instance.
    75         */
    76        config string deviceName;
    77    
    78        /*!
    79         *  ======== clockRate ========
    80         *  The clock rate for this device.
    81         */
    82        config Double clockRate = 1.0;
    83    
    84        override config string codeMemory = null;
    85        
    86        override config string dataMemory = null;
    87    
    88        override config string stackMemory = null;
    89    
    90        /*!
    91         *  ======== includeLinkCmdFile ========
    92         *  The flag that specifies if the platform should include a linker command
    93         *  file.
    94         *
    95         *  By default, a user is responsible for adding a linker command file to
    96         *  the project, or to the linker command line. However, if this flag is
    97         *  set, this platform will include a default linker command file for the
    98         *  selected device.
    99         */
   100        config Bool includeLinkCmdFile = false;
   101    };
   102