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