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