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.sysbios.family.arm.f2838x.init;
37
38 import xdc.rov.ViewInfo;
39 import xdc.runtime.Assert;
40
41 /*!
42 * ======== Boot ========
43 * TMS320F2838X device Boot Support.
44 *
45 * The Boot module supports boot initialization for the CM core.
46 * Two special Boot init functions are created based on the configuration
47 * settings for this module. One function is an xdc.runtime.Reset
48 * function (called early at boot prior to cinit processing), and the second
49 * function is an xdc.runtime.Startup first function (called before main()).
50 *
51 * The code to support the boot module is placed in a separate section
52 * named `".text:.bootCodeSection"` to allow placement of this section in
53 * the linker .cmd file if necessary. This section is a subsection of the
54 * `".text"` section so this code will be placed into the .text section unless
55 * explicitly placed, either through
56 * `{@link xdc.cfg.Program#sectMap Program.sectMap}` or through a linker
57 * command file.
58 */
59 @Template("./Boot.xdt")
60 module Boot
61 {
62 metaonly struct ModuleView {
63 Bool disableWatchdog;
64 Bool configureFlashController;
65 Bool configureFlashWaitStates;
66 Bool enableFlashProgramCache;
67 Bool enableFlashDataCache;
68 Bool pllSourcedINTOSC;
69 Bool bootFromFlash;
70 }
71
72 @Facet
73 metaonly config ViewInfo.Instance rovViewInfo =
74 ViewInfo.create({
75 viewMap: [
76 [
77 'Module',
78 {
79 type: ViewInfo.MODULE,
80 viewInitFxn: 'viewInitModule',
81 structName: 'ModuleView'
82 }
83 ],
84 ]
85 });
86
87 /*!
88 * Watchdog disable configuration flag, default is false.
89 *
90 * Set to true to disable the watchdog.
91 */
92 metaonly config Bool disableWatchdog = false;
93
94 /*!
95 * Flash controller configuration flag, default is true.
96 *
97 * Set to true to enable the configuration of the Flash controller
98 * wait states, program and data cache.
99 */
100 metaonly config Bool configureFlashController = true;
101
102 /*!
103 * Internal OSCCLK configuration flag, default is true.
104 *
105 * Set to true to indicate PLLSYSCLK is derived from either INTOSC1 or
106 * or INTOSC2, set to false if PLLSYSCLK is derived from an external
107 * crystal (XTAL).
108 */
109 metaonly config Bool pllSourcedINTOSC = true;
110
111 /*!
112 * Flash controller wait states configuration flag, default is true.
113 *
114 * Set to true to configure the Flash controller wait states. The number
115 * of wait states is computed based upon the CPU frequency.
116 */
117 metaonly config Bool configureFlashWaitStates = true;
118
119 /*!
120 * Flash controller program cache enable flag, default is true.
121 *
122 * Set to true to enable the Flash controller's program cache.
123 */
124 metaonly config Bool enableFlashProgramCache = true;
125
126 /*!
127 * Flash controller data cache enable flag, default is true.
128 *
129 * Set to true to enable the Flash controller's data cache.
130 */
131 metaonly config Bool enableFlashDataCache = true;
132
133 /*!
134 * Boot from Flash flag. Default is true.
135 *
136 * Set to true to enable booting CM from Flash.
137 */
138 metaonly config Bool bootFromFlash = true;
139
140 /*!
141 * ======== loadSegment ========
142 * Specifies where to load the Flash controller configuration function.
143 *
144 * If 'configureFlashController' is true, then this parameter
145 * determines where the ".ti_sysbios_family_arm_f2838x_init_flashfuncs"
146 * section gets loaded.
147 */
148 metaonly config String loadSegment;
149
150 /*!
151 * ======== runSegment ========
152 * Specifies where to run the Flash controller configuration function.
153 *
154 * If 'configureFlashController' is true then this parameter
155 * determines where the ".ti_sysbios_family_arm_f2838x_init_flashfuncs"
156 * section gets executed at runtime.
157 */
158 metaonly config String runSegment;
159
160 internal:
161
162
163 metaonly config UInt flashWaitStates;
164
165 166 167 168 169 170
171 Void init();
172 };