[processor-sdk/pdk.git] / packages / ti / osal / test / omapl137 / arm9 / bios / osal_arm_omapl137.cfg
1 /**
2 * \file osal_arm_omapl137.cfg
3 *
4 * \brief Sysbios config file for OSAL ARM test 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 */
40 /* ================ General configuration ================ */
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 LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
46 var Main = xdc.useModule('xdc.runtime.Main');
47 var Memory = xdc.useModule('xdc.runtime.Memory')
48 var SysMin = xdc.useModule('xdc.runtime.SysMin');
49 var System = xdc.useModule('xdc.runtime.System');
50 var Text = xdc.useModule('xdc.runtime.Text');
52 var BIOS = xdc.useModule('ti.sysbios.BIOS');
53 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
54 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
55 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
56 var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
57 var Task = xdc.useModule('ti.sysbios.knl.Task');
59 var devType = "omapl137"
61 /* Load the OSAL package */
62 var osType = "tirtos"
63 var Osal = xdc.useModule('ti.osal.Settings');
64 Osal.osType = osType;
65 Osal.socType = devType;
67 /*use CSL package*/
68 var Csl = xdc.loadPackage('ti.csl');
69 Csl.Settings.deviceType = devType;
71 /* Load the uart package */
72 var Uart = xdc.loadPackage('ti.drv.uart');
73 Uart.Settings.socType = devType;
75 /* Load the I2C package */
76 var I2c = xdc.loadPackage('ti.drv.i2c');
77 I2c.Settings.socType = devType;
79 /* Load the Board package and set the board name */
80 var Board = xdc.loadPackage('ti.board');
81 Board.Settings.boardName = "evmOMAPL137";
83 /*
84 * Program.argSize sets the size of the .args section.
85 * The examples don't use command line args so argSize is set to 0.
86 */
87 Program.argSize = 0x0;
89 /* System stack size (used by ISRs and Swis) */
90 Program.stack = 0x20000;
92 /*
93 * Uncomment this line to globally disable Asserts.
94 * All modules inherit the default from the 'Defaults' module. You
95 * can override these defaults on a per-module basis using Module.common$.
96 * Disabling Asserts will save code space and improve runtime performance.
97 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
98 */
100 /*
101 * Uncomment this line to keep module names from being loaded on the target.
102 * The module name strings are placed in the .const section. Setting this
103 * parameter to false will save space in the .const section. Error and
104 * Assert messages will contain an "unknown module" prefix instead
105 * of the actual module name.
106 Defaults.common$.namedModule = false;
107 */
109 /*
110 * Minimize exit handler array in System. The System module includes
111 * an array of functions that are registered with System_atexit() to be
112 * called by System_exit().
113 */
114 System.maxAtexitHandlers = 4;
116 /*
117 * Uncomment this line to disable the Error print function.
118 * We lose error information when this is disabled since the errors are
119 * not printed. Disabling the raiseHook will save some code space if
120 * your app is not using System_printf() since the Error_print() function
121 * calls System_printf().
122 Error.raiseHook = null;
123 */
125 /*
126 * Uncomment this line to keep Error, Assert, and Log strings from being
127 * loaded on the target. These strings are placed in the .const section.
128 * Setting this parameter to false will save space in the .const section.
129 * Error, Assert and Log message will print raw ids and args instead of
130 * a formatted message.
131 Text.isLoaded = false;
132 */
134 /*
135 * Uncomment this line to disable the output of characters by SysMin
136 * when the program exits. SysMin writes characters to a circular buffer.
137 * This buffer can be viewed using the SysMin Output view in ROV.
138 SysMin.flushAtExit = false;
139 */
141 /*
142 * The BIOS module will create the default heap for the system.
143 * Specify the size of this default heap.
144 */
145 BIOS.heapSize = 0x10000;
147 /*
148 * Build a custom SYS/BIOS library from sources.
149 */
150 BIOS.libType = BIOS.LibType_Custom;
152 /* System stack size (used by ISRs and Swis) */
153 Program.stack = 0x20000;
155 /* Circular buffer size for System_printf() */
156 SysMin.bufSize = 0x400;
157 System.SupportProxy = SysMin;
159 /*
160 * Create and install logger for the whole system
161 */
162 var loggerBufParams = new LoggerBuf.Params();
163 loggerBufParams.numEntries = 16;
164 var logger0 = LoggerBuf.create(loggerBufParams);
165 Defaults.common$.logger = logger0;
166 Main.common$.diags_INFO = Diags.ALWAYS_ON;
168 System.SupportProxy = SysMin;
170 var Cache = xdc.useModule('ti.sysbios.family.arm.arm9.Cache')
171 var Mmu = xdc.useModule('ti.sysbios.family.arm.arm9.Mmu');
173 /* Enable the cache */
174 Cache.enableCache = true;
176 // Enable the MMU (Required for L1/L2 data caching)
177 Mmu.enableMMU = true;
179 var attrs = {
180 type: Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
181 bufferable: true, // bufferable
182 cacheable: false, // cacheable
183 imp: 1, // implementation defined
184 domain: 0, // domain between 0-15
185 accPerm: 3, // read/write permission
186 };
188 for (var i=0x01C42000; i < 0x01C42FFF; i = i + 0x00000400) {
189 // Each 'SECTION' descriptor entry spans a 1MB address range
190 Mmu.setFirstLevelDescMeta(i, i, attrs);
191 }
192 for (var i=0x01E00000; i < 0x01E0FFFF; i = i + 0x00000400) {
193 // Each 'SECTION' descriptor entry spans a 1MB address range
194 Mmu.setFirstLevelDescMeta(i, i, attrs);
195 }
196 for (var i=0x01D0C000; i < 0x01D0CFFF; i = i + 0x00000400) {
197 // Each 'SECTION' descriptor entry spans a 1MB address range
198 Mmu.setFirstLevelDescMeta(i, i, attrs);
199 }
200 for (var i=0x01D0D000; i < 0x01D0DFFF; i = i + 0x00000400) {
201 // Each 'SECTION' descriptor entry spans a 1MB address range
202 Mmu.setFirstLevelDescMeta(i, i, attrs);
203 }
205 for (var i=0x01E27000; i < 0x01E27FFF; i = i + 0x00000400) {
206 // Each 'SECTION' descriptor entry spans a 1MB address range
207 Mmu.setFirstLevelDescMeta(i, i, attrs);
208 }
210 for (var i=0x01D00000; i < 0x01D02FFF; i = i + 0x00000400) {
211 // Each 'SECTION' descriptor entry spans a 1MB address range
212 Mmu.setFirstLevelDescMeta(i, i, attrs);
213 }
215 for (var i=0x01D04000; i < 0x01D06FFF; i = i + 0x00000400) {
216 // Each 'SECTION' descriptor entry spans a 1MB address range
217 Mmu.setFirstLevelDescMeta(i, i, attrs);
218 }
220 for (var i=0x01D08000; i < 0x01D0AFFF; i = i + 0x00000400) {
221 // Each 'SECTION' descriptor entry spans a 1MB address range
222 Mmu.setFirstLevelDescMeta(i, i, attrs);
223 }
225 for (var i=0x01C22000; i < 0x01C22FFF; i = i + 0x00000400) {
226 // Each 'SECTION' descriptor entry spans a 1MB address range
227 Mmu.setFirstLevelDescMeta(i, i, attrs);
228 }
230 for (var i=0x01E28000; i < 0x01E28FFF; i = i + 0x00000400) {
231 // Each 'SECTION' descriptor entry spans a 1MB address range
232 Mmu.setFirstLevelDescMeta(i, i, attrs);
233 }
235 /* ================ BIOS configuration ================ */
237 var BIOS = xdc.useModule('ti.sysbios.BIOS');
239 /*
240 * Build a custom SYS/BIOS library from sources.
241 */
242 BIOS.libType = BIOS.LibType_Custom;
243 BIOS.customCCOpts = BIOS.customCCOpts.replace("-o3", "-o0");
244 /*
245 * The BIOS module will create the default heap for the system.
246 * Specify the size of this default heap.
247 */
248 BIOS.heapSize = 0x1000;
250 /* ================ Task configuration ================ */
252 /* No runtime stack checking is performed */
253 Task.checkStackFlag = false;
255 /* Reduce the number of task priorities */
256 Task.numPriorities = 4;
259 var task0Params = new Task.Params();
260 task0Params.instance.name = "echo";
261 task0Params.stackSize = 0x1000;
262 Program.global.echo = Task.create("&osal_test", task0Params);