1 /**
2 * \file uart_arm.cfg
3 *
4 * \brief Sysbios config file for UART example project on OMAPL137 EVM.
5 *
6 */
8 /*
9 * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the
21 * distribution.
22 *
23 * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
41 var Defaults = xdc.useModule('xdc.runtime.Defaults');
42 var Diags = xdc.useModule('xdc.runtime.Diags');
43 var Error = xdc.useModule('xdc.runtime.Error');
44 var Log = xdc.useModule('xdc.runtime.Log');
45 var Main = xdc.useModule('xdc.runtime.Main');
46 var Memory = xdc.useModule('xdc.runtime.Memory');
47 var SysMin = xdc.useModule('xdc.runtime.SysMin');
48 var System = xdc.useModule('xdc.runtime.System');
49 var Text = xdc.useModule('xdc.runtime.Text');
51 var BIOS = xdc.useModule('ti.sysbios.BIOS');
52 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
53 var Task = xdc.useModule('ti.sysbios.knl.Task');
54 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
55 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
56 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
58 /*
59 * Uncomment this line to globally disable Asserts.
60 * All modules inherit the default from the 'Defaults' module. You
61 * can override these defaults on a per-module basis using Module.common$.
62 * Disabling Asserts will save code space and improve runtime performance.
63 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
64 */
66 /*
67 * Uncomment this line to keep module names from being loaded on the target.
68 * The module name strings are placed in the .const section. Setting this
69 * parameter to false will save space in the .const section. Error and
70 * Assert messages will contain an "unknown module" prefix instead
71 * of the actual module name.
72 Defaults.common$.namedModule = false;
73 */
75 /*
76 * Minimize exit handler array in System. The System module includes
77 * an array of functions that are registered with System_atexit() to be
78 * called by System_exit().
79 */
80 System.maxAtexitHandlers = 4;
82 /*
83 * Uncomment this line to disable the Error print function.
84 * We lose error information when this is disabled since the errors are
85 * not printed. Disabling the raiseHook will save some code space if
86 * your app is not using System_printf() since the Error_print() function
87 * calls System_printf().
88 Error.raiseHook = null;
89 */
91 /*
92 * Uncomment this line to keep Error, Assert, and Log strings from being
93 * loaded on the target. These strings are placed in the .const section.
94 * Setting this parameter to false will save space in the .const section.
95 * Error, Assert and Log message will print raw ids and args instead of
96 * a formatted message.
97 Text.isLoaded = false;
98 */
100 /*
101 * Uncomment this line to disable the output of characters by SysMin
102 * when the program exits. SysMin writes characters to a circular buffer.
103 * This buffer can be viewed using the SysMin Output view in ROV.
104 SysMin.flushAtExit = false;
105 */
107 /*
108 * The BIOS module will create the default heap for the system.
109 * Specify the size of this default heap.
110 */
111 BIOS.heapSize = 0x20000;
112 BIOS.cpuFreq.lo = 375000000;
114 /*
115 * Build a custom SYS/BIOS library from sources.
116 */
117 BIOS.libType = BIOS.LibType_Custom;
119 /*
120 * Program.argSize sets the size of the .args section.
121 * The examples don't use command line args so argSize is set to 0.
122 */
123 Program.argSize = 0x0;
125 /* System stack size (used by ISRs and Swis) */
126 Program.stack = 0x20000;
128 /* Circular buffer size for System_printf() */
129 SysMin.bufSize = 0x400;
131 BIOS.taskEnabled = true;
133 System.SupportProxy = SysMin;
136 /* ================ Driver configuration ================ */
138 var devType = "omapl137"
140 /* Load the OSAL package */
141 var osType = "tirtos"
142 var Osal = xdc.useModule('ti.osal.Settings');
143 Osal.osType = osType;
144 Osal.socType = devType;
146 /*use CSL package*/
147 var Csl = xdc.loadPackage('ti.csl');
148 Csl.Settings.deviceType = devType;
150 /* Load Profiling package */
151 /*var Utils = xdc.loadPackage('ti.utils.profiling');*/
153 /* Load the uart package */
154 var Uart = xdc.loadPackage('ti.drv.uart');
155 Uart.Settings.enableProfiling = false;
156 Uart.Settings.socType = devType;
158 /* Load the I2C package - required by board */
159 var I2c = xdc.loadPackage('ti.drv.i2c');
160 I2c.Settings.socType = devType;
162 /* Load the Board package and set the board name */
163 var Board = xdc.loadPackage('ti.board');
164 Board.Settings.boardName = "evmOMAPL137";
166 /* Enable the cache */
167 var Cache = xdc.useModule('ti.sysbios.family.arm.arm9.Cache');
168 Cache.enableCache = true;
170 var Mmu = xdc.useModule('ti.sysbios.family.arm.arm9.Mmu');
171 Mmu.enableMMU = true;
172 var attrs = {
173 type: Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
174 bufferable: true, // bufferable
175 cacheable: false, // cacheable
176 imp: 1, // implementation defined
177 domain: 3, // domain between 0-15
178 accPerm: 3, // read/write permission
179 };
181 for (var i=0x01C42000; i < 0x01C42FFF; i = i + 0x00000400) {
182 // Each 'SECTION' descriptor entry spans a 1MB address range
183 Mmu.setFirstLevelDescMeta(i, i, attrs);
184 }
185 for (var i=0x01D0C000; i < 0x01D0CFFF; i = i + 0x00000400) {
186 // Each 'SECTION' descriptor entry spans a 1MB address range
187 Mmu.setFirstLevelDescMeta(i, i, attrs);
188 }
189 for (var i=0x01D0D000; i < 0x01D0DFFF; i = i + 0x00000400) {
190 // Each 'SECTION' descriptor entry spans a 1MB address range
191 Mmu.setFirstLevelDescMeta(i, i, attrs);
192 }
194 for (var i=0x01E27000; i < 0x01E27FFF; i = i + 0x00000400) {
195 // Each 'SECTION' descriptor entry spans a 1MB address range
196 Mmu.setFirstLevelDescMeta(i, i, attrs);
197 }
199 for (var i=0x01D00000; i < 0x01D02FFF; i = i + 0x00000400) {
200 // Each 'SECTION' descriptor entry spans a 1MB address range
201 Mmu.setFirstLevelDescMeta(i, i, attrs);
202 }
204 for (var i=0x01D04000; i < 0x01D06FFF; i = i + 0x00000400) {
205 // Each 'SECTION' descriptor entry spans a 1MB address range
206 Mmu.setFirstLevelDescMeta(i, i, attrs);
207 }
209 for (var i=0x01D08000; i < 0x01D0AFFF; i = i + 0x00000400) {
210 // Each 'SECTION' descriptor entry spans a 1MB address range
211 Mmu.setFirstLevelDescMeta(i, i, attrs);
212 }
214 for (var i=0x01C22000; i < 0x01C22FFF; i = i + 0x00000400) {
215 // Each 'SECTION' descriptor entry spans a 1MB address range
216 Mmu.setFirstLevelDescMeta(i, i, attrs);
217 }
219 for (var i=0x01E28000; i < 0x01E28FFF; i = i + 0x00000400) {
220 // Each 'SECTION' descriptor entry spans a 1MB address range
221 Mmu.setFirstLevelDescMeta(i, i, attrs);
222 }
224 /* allocate a config-params object */
225 var HeapParam = new HeapMem.Params;
226 /* optionally assign per-instance configs */
227 HeapParam.size = 200000;
228 HeapParam.sectionName = "app_heap"
230 /* No runtime stack checking is performed */
231 Task.enableIdleTask = false;
232 Task.initStackFlag = false;
233 Task.checkStackFlag = false;
235 /* create an instance-object */
236 Program.global.myHeap = HeapMem.create(HeapParam);
237 Program.sectMap["app_heap"] = "SDRAM";