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.simplelink;
37
38 /*!
39 * ======== Platform ========
40 * A generic platform that supports any CC13xx, CC26xx, or CC32xx 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.simplelink:CC3200"
47 * @p
48 *
49 * In package.bld, the platform instance is selected as in:
50 * @p(code)
51 * Pkg.addExecutable("test", target, "ti.platforms.simplelink:CC3200");
52 * @p
53 *
54 * @a(Note)
55 * The 'simplelink' platform provides support for allowing the user to
56 * specify the application's C stack size within their linker command
57 * file. If the user sets 'Program.stack = 0' in their configuration
58 * file, then it is up to the user to add the necessary content to their
59 * linker command file to define the size and placment of the C stack.
60 * Additionally, if GNU tools are being used, then the user must define
61 * 'STACKSIZE' in their linker command file and have its value be the
62 * size of the C stack in bytes. The 'STACKSIZE' symbol is used
63 * internally to initialize other symbols that must be provided to SYS/BIOS.
64 */
65 @Template ("./Platform.xdt")
66 metaonly module Platform inherits xdc.platform.IPlatform
67 {
68 config xdc.platform.IPlatform.Board BOARD = {
69 id: "0",
70 boardName: "simplelink",
71 boardFamily: null,
72 boardRevision: null
73 };
74
75 /*!
76 * ======== nameFormat ========
77 * Encoding of instance creation parameters in the instance's name
78 *
79 * For this platform, the parameters `deviceName`, `includeLinkCmdFile`
80 * and `clockRate` can be encoded in the instance name supplied on
81 * `xdc.tools.configuro` command line, for example:
82 * @p(code)
83 * xs xdc.tools.configuro ... -p ti.platforms.simplelink:CC3200:1:20
84 * @p
85 * Optional parameters can be omitted:
86 * @p(code)
87 * xs xdc.tools.configuro ... -p ti.platforms.simplelink:CC3200
88 * @p
89 */
90 readonly config string nameFormat
91 = "$(deviceName):$(includeLinkCmdFile):$(clockRate)";
92
93 /*!
94 * ======== useGnuRomLinkCmd ========
95 * Use ROM compatible linker script when building using GNU tools
96 *
97 * If this config param is set to true and "includeLinkCmdFile" is true,
98 * the ROM compatible linker script will be used. The ROM compatible
99 * linker script is required when building a ROM based application.
100 */
101 config Bool useGnuRomLinkCmd = false;
102
103 instance:
104
105 106 107 108 109
110
111 config xdc.platform.IExeContext.Cpu CPU = {
112 id: "0",
113 clockRate: 80.0,
114 catalogName: "ti.catalog.arm.cortexm4",
115 deviceName: "CC32xx",
116 revision: "",
117 };
118
119 /*!
120 * ======== deviceName ========
121 * The name of an `ICpuDataSheet` module for the device
122 *
123 * This parameter is required, but it does not have to be set explicitly;
124 * it can be encoded in the instance's name.
125 */
126 config string deviceName;
127
128 /*!
129 * ======== clockRate ========
130 * The clock rate for this device.
131 */
132 config Double clockRate;
133
134 override config string codeMemory = null;
135
136 override config string dataMemory = null;
137
138 override config string stackMemory = null;
139
140 /*!
141 * ======== includeLinkCmdFile ========
142 * The flag that specifies if the platform should include a linker command
143 * file.
144 *
145 * By default, a user is responsible for adding a linker command file to
146 * the project, or to the linker command line. However, if this flag is
147 * set, this platform will include a default linker command file for the
148 * selected device.
149 */
150 config Bool includeLinkCmdFile = false;
151 };