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