[processor-sdk/pdk.git] / packages / ti / drv / mcasp / example / evmOMAPL137 / armv5 / bios / audiosample.cfg
1 /**
2 * \file audiosample.cfg
3 *
4 * \brief Sysbios config file for mcasp audio 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 /* ========================================================================== */
41 /* CFG script for the Audio sample */
42 /* ========================================================================== */
43 var Defaults = xdc.useModule('xdc.runtime.Defaults');
44 var Diags = xdc.useModule('xdc.runtime.Diags');
45 var Error = xdc.useModule('xdc.runtime.Error');
46 var Log = xdc.useModule('xdc.runtime.Log');
47 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
48 var Main = xdc.useModule('xdc.runtime.Main');
49 var Memory = xdc.useModule('xdc.runtime.Memory')
50 var SysMin = xdc.useModule('xdc.runtime.SysMin');
51 var System = xdc.useModule('xdc.runtime.System');
52 var Text = xdc.useModule('xdc.runtime.Text');
53 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
54 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
55 var Task = xdc.useModule ("ti.sysbios.knl.Task");
56 var Sem = xdc.useModule("ti.sysbios.knl.Semaphore");
57 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
59 /* load the required files and packages */
60 var GIO = xdc.useModule('ti.sysbios.io.GIO');
61 var BIOS = xdc.useModule ("ti.sysbios.BIOS");
62 var SysStd = xdc.useModule('xdc.runtime.SysStd');
64 var HeapMem = xdc.useModule ("ti.sysbios.heaps.HeapMem");
66 var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
67 var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
68 var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
70 var socType = "omapl137";
71 var Csl = xdc.useModule('ti.csl.Settings');
72 Csl.deviceType = "omapl137";
73 Csl.libProfile = "release";
78 /* Load the OSAL package */
79 var osType = "tirtos"
80 var Osal = xdc.useModule('ti.osal.Settings');
81 Osal.osType = osType;
82 Osal.socType = socType;
84 /* Load the driver packages, starting with mcasp */
85 var McASP = xdc.loadPackage('ti.drv.mcasp');
86 McASP.Settings.socType = socType;
88 /* Load the i2c package */
89 var I2C = xdc.loadPackage('ti.drv.i2c');
90 I2C.Settings.socType = socType;
92 /* Load the uart package */
93 var Uart = xdc.loadPackage('ti.drv.uart');
94 Uart.Settings.socType = socType;
96 /* Load the Board package and set the board name */
97 var Board = xdc.loadPackage('ti.board');
98 Board.Settings.boardName = "evmOMAPL137";
100 /*
101 * The BIOS module will create the default heap for the system.
102 * Specify the size of this default heap.
103 */
104 BIOS.heapSize = 0x2000;
105 BIOS.cpuFreq.lo = 375000000;
106 BIOS.libType = BIOS.LibType_Custom;
108 Program.stack = 0x2000;
110 /* Enable the cache */
111 var Cache = xdc.useModule('ti.sysbios.family.arm.arm9.Cache');
112 Cache.enableCache = true;
114 /* Enable the MMU (Required for L1/L2 caching) */
116 /***********************************************
117 * MMU Configuration *
118 ***********************************************/
119 var Mmu = xdc.useModule('ti.sysbios.family.arm.arm9.Mmu');
120 Mmu.enableMMU = true;
121 var attrs = {
122 type: Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
123 bufferable: true, // bufferable
124 cacheable: false, // cacheable
125 imp: 1, // implementation defined
126 domain: 3, // domain between 0-15
127 accPerm: 3, // read/write permission
128 };
130 for (var i=0x01E27000; i < 0x01E27FFF; i = i + 0x00000400) {
131 // Each 'SECTION' descriptor entry spans a 1MB address range
132 Mmu.setFirstLevelDescMeta(i, i, attrs);
133 }
135 for (var i=0x01D00000; i < 0x01D02FFF; i = i + 0x00000400) {
136 // Each 'SECTION' descriptor entry spans a 1MB address range
137 Mmu.setFirstLevelDescMeta(i, i, attrs);
138 }
140 for (var i=0x01D04000; i < 0x01D06FFF; i = i + 0x00000400) {
141 // Each 'SECTION' descriptor entry spans a 1MB address range
142 Mmu.setFirstLevelDescMeta(i, i, attrs);
143 }
145 for (var i=0x01D08000; i < 0x01D0AFFF; i = i + 0x00000400) {
146 // Each 'SECTION' descriptor entry spans a 1MB address range
147 Mmu.setFirstLevelDescMeta(i, i, attrs);
148 }
150 for (var i=0x01C22000; i < 0x01C22FFF; i = i + 0x00000400) {
151 // Each 'SECTION' descriptor entry spans a 1MB address range
152 Mmu.setFirstLevelDescMeta(i, i, attrs);
153 }
155 for (var i=0x01E28000; i < 0x01E28FFF; i = i + 0x00000400) {
156 // Each 'SECTION' descriptor entry spans a 1MB address range
157 Mmu.setFirstLevelDescMeta(i, i, attrs);
158 }
160 for (var i=0xC3000000; i < 0xC4000000; i = i + 0x00100000) {
161 // Each 'SECTION' descriptor entry spans a 1MB address range
162 Mmu.setFirstLevelDescMeta(i, i, attrs);
163 }
166 /*
167 * Program.argSize sets the size of the .args section.
168 * The examples don't use command line args so argSize is set to 0.
169 */
170 Program.argSize = 0x0;
172 /* System stack size (used by ISRs and Swis) */
173 Program.stack = 0x20000;
175 /*
176 * Minimize exit handler array in System. The System module includes
177 * an array of functions that are registered with System_atexit() to be
178 * called by System_exit().
179 */
180 System.maxAtexitHandlers = 4;
182 /* Circular buffer size for System_printf() */
183 SysMin.bufSize = 0x200;
184 System.SupportProxy = SysMin;
187 /* allocate a config-params object */
188 var HeapParam = new HeapMem.Params;
190 /* optionally assign per-instance configs */
191 HeapParam.size = 200000;
192 HeapParam.sectionName = "app_heap"
194 /* create an instance-object */
195 Program.global.myHeap = HeapMem.create(HeapParam);
196 Program.sectMap["app_heap"] = "SDRAM";
198 var task0Params = new Task.Params();
199 task0Params.priority = 5;
200 task0Params.instance.name = "task0";
202 Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);
204 //Program.sectMap[".text"] = "L2SRAM";
205 // chnaging default tick of timer to 100us from default 1000us
206 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
207 Clock.tickPeriod = 1000;
210 /* No runtime stack checking is performed */
211 Task.enableIdleTask = true;
212 Task.initStackFlag = false;
213 Task.checkStackFlag = false;
215 var loggerBufParams = new LoggerBuf.Params();
216 loggerBufParams.numEntries = 16;
217 var logger0 = LoggerBuf.create(loggerBufParams);
218 Defaults.common$.logger = logger0;