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.rf432s0xx;
37
38 /*!
39 * ======== Platform ========
40 * A generic platform that supports any rf432s0xx 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.rf432s0xx:RF432S0xx"
47 * @p
48 *
49 * In package.bld, the platform instance is selected as in:
50 * @p(code)
51 * Pkg.addExecutable("test", target, "ti.platforms.rf432s0xx:RF432S0xx");
52 * @p
53 */
54 @Template ("./Platform.xdt")
55 metaonly module Platform inherits xdc.platform.IPlatform
56 {
57 config xdc.platform.IPlatform.Board BOARD = {
58 id: "0",
59 boardName: "rf432s0xx",
60 boardFamily: null,
61 boardRevision: null
62 };
63
64 /*!
65 * ======== nameFormat ========
66 * Encoding of instance creation parameters in the instance's name
67 *
68 * For this platform, the parameters `deviceName`, `includeLinkCmdFile`
69 * and `clockRate` can be encoded in the instance name supplied on
70 * `xdc.tools.configuro` command line, for example:
71 * @p(code)
72 * xs xdc.tools.configuro ... -p ti.platforms.rf432s0xx:RF432S0xx:1:20
73 * @p
74 * Optional parameters can be omitted:
75 * @p(code)
76 * xs xdc.tools.configuro ... -p ti.platforms.rf432s0xx:RF432S0xx
77 * @p
78 */
79 readonly config string nameFormat
80 = "$(deviceName):$(includeLinkCmdFile):$(clockRate)";
81
82 /*!
83 * ======== useGnuRomLinkCmd ========
84 * Use ROM compatible linker script when building using GNU tools
85 *
86 * If this config param is set to true and "includeLinkCmdFile" is true,
87 * the ROM compatible linker script will be used. The ROM compatible
88 * linker script is required when building a ROM based application.
89 */
90 config Bool useGnuRomLinkCmd = false;
91
92 instance:
93
94 config xdc.platform.IExeContext.Cpu CPU = {
95 id: "0",
96 clockRate: 8.0,
97 catalogName: "ti.catalog.arm.cortexm0",
98 deviceName: "RF432S0xx",
99 revision: "",
100 };
101
102 /*!
103 * ======== deviceName ========
104 * The name of an `ICpuDataSheet` module for the device
105 *
106 * This parameter is required, but it does not have to be set explicitly;
107 * it can be encoded in the instance's name.
108 */
109 config string deviceName;
110
111 /*!
112 * ======== clockRate ========
113 * The clock rate for this device.
114 */
115 config Double clockRate;
116
117 override config string codeMemory = null;
118
119 override config string dataMemory = null;
120
121 override config string stackMemory = null;
122
123 /*!
124 * ======== includeLinkCmdFile ========
125 * The flag that specifies if the platform should include a linker command
126 * file.
127 *
128 * By default, a user is responsible for adding a linker command file to
129 * the project, or to the linker command line. However, if this flag is
130 * set, this platform will include a default linker command file for the
131 * selected device.
132 */
133 config Bool includeLinkCmdFile = false;
134 };