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 /* ========================================================================== */
44 /* load the required files and packages */
45 var GIO = xdc.useModule('ti.sysbios.io.GIO');
46 var Task = xdc.useModule ("ti.sysbios.knl.Task");
47 var BIOS = xdc.useModule ("ti.sysbios.BIOS");
48 var System = xdc.useModule ("xdc.runtime.System");
49 var SysStd = xdc.useModule('xdc.runtime.SysStd');
50 var cache = xdc.useModule ("ti.sysbios.hal.Cache");
51 var Timestamp = xdc.useModule ("xdc.runtime.Timestamp");
52 var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");
53 var Hwi = xdc.useModule ("ti.sysbios.family.c64p.Hwi");
54 var Sem = xdc.useModule("ti.sysbios.knl.Semaphore");
55 var Log = xdc.useModule('xdc.runtime.Log');
56 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
57 var Memory = xdc.useModule('xdc.runtime.Memory')
58 var SysMin = xdc.useModule('xdc.runtime.SysMin');
59 var System = xdc.useModule('xdc.runtime.System');
60 var Defaults = xdc.useModule('xdc.runtime.Defaults');
61 var Main = xdc.useModule('xdc.runtime.Main');
62 var Diags = xdc.useModule('xdc.runtime.Diags');
63 var HeapMem = xdc.useModule ("ti.sysbios.heaps.HeapMem");
65 var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
66 var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
67 var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
69 /* Load and use the CSL package */
70 var devType = "omapl137"
71 var Csl = xdc.useModule('ti.csl.Settings');
72 Csl.deviceType = devType;
74 /* Load the packages */
75 var socType = "omapl137";
76 var McASP = xdc.loadPackage('ti.drv.mcasp');
77 McASP.Settings.socType = socType;
79 /* Load the i2c package */
80 var I2C = xdc.loadPackage('ti.drv.i2c');
81 I2C.Settings.socType = socType;
84 /* Load the OSAL package */
85 var osType = "tirtos"
86 var Osal = xdc.useModule('ti.osal.Settings');
87 Osal.osType = osType;
88 Osal.socType = socType;
90 /* Load the uart package */
91 var Uart = xdc.loadPackage('ti.drv.uart');
92 Uart.Settings.socType = socType;
94 /* Load the Board package and set the board name */
95 var Board = xdc.loadPackage('ti.board');
96 Board.Settings.boardName = "evmOMAPL137";
98 /*
99 * The BIOS module will create the default heap for the system.
100 * Specify the size of this default heap.
101 */
102 BIOS.heapSize = 0x2000;
105 /* System stack size (used by ISRs and Swis) */
106 Program.stack = 0x1000;
108 System.SupportProxy = SysStd;
110 /* allocate a config-params object */
111 var HeapParam = new HeapMem.Params;
113 /* optionally assign per-instance configs */
114 HeapParam.size = 200000;
115 HeapParam.sectionName = "app_heap";
116 Program.sectMap["app_heap"] = "SDRAM";
118 /* create an instance-object */
119 Program.global.myHeap = HeapMem.create(HeapParam);
121 ECM.eventGroupHwiNum[0] = 7;
122 ECM.eventGroupHwiNum[1] = 8;
123 ECM.eventGroupHwiNum[2] = 9;
124 ECM.eventGroupHwiNum[3] = 5;
126 var task0Params = new Task.Params();
127 task0Params.priority = 5;
128 task0Params.instance.name = "task0";
130 Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);