/** * \file audiosample.cfg * * \brief Sysbios config file for mcasp audio test project on OMAPL137 EVM. * */ /* * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * Neither the name of Texas Instruments Incorporated nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* ========================================================================== */ /* CFG script for the Audio sample */ /* ========================================================================== */ /* load the required files and packages */ var GIO = xdc.useModule('ti.sysbios.io.GIO'); var Task = xdc.useModule ("ti.sysbios.knl.Task"); var BIOS = xdc.useModule ("ti.sysbios.BIOS"); var System = xdc.useModule ("xdc.runtime.System"); var SysStd = xdc.useModule('xdc.runtime.SysStd'); var cache = xdc.useModule ("ti.sysbios.hal.Cache"); var Timestamp = xdc.useModule ("xdc.runtime.Timestamp"); var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner"); var Hwi = xdc.useModule ("ti.sysbios.family.c64p.Hwi"); var Sem = xdc.useModule("ti.sysbios.knl.Semaphore"); var Log = xdc.useModule('xdc.runtime.Log'); var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); var Memory = xdc.useModule('xdc.runtime.Memory') var SysMin = xdc.useModule('xdc.runtime.SysMin'); var System = xdc.useModule('xdc.runtime.System'); var Defaults = xdc.useModule('xdc.runtime.Defaults'); var Main = xdc.useModule('xdc.runtime.Main'); var Diags = xdc.useModule('xdc.runtime.Diags'); var HeapMem = xdc.useModule ("ti.sysbios.heaps.HeapMem"); var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample"); var drv = xdc.loadPackage ("ti.sdo.edma3.drv"); var rm = xdc.loadPackage ("ti.sdo.edma3.rm"); /* Load and use the CSL package */ var devType = "omapl137" var Csl = xdc.useModule('ti.csl.Settings'); Csl.deviceType = devType; /* Load the packages */ var socType = "omapl137"; var McASP = xdc.loadPackage('ti.drv.mcasp'); McASP.Settings.socType = socType; /* Load the i2c package */ var I2C = xdc.loadPackage('ti.drv.i2c'); I2C.Settings.socType = socType; /* Load the OSAL package */ var osType = "tirtos" var Osal = xdc.useModule('ti.osal.Settings'); Osal.osType = osType; Osal.socType = socType; /* Load the uart package */ var Uart = xdc.loadPackage('ti.drv.uart'); Uart.Settings.socType = socType; /* Load the Board package and set the board name */ var Board = xdc.loadPackage('ti.board'); Board.Settings.boardName = "evmOMAPL137"; /* * The BIOS module will create the default heap for the system. * Specify the size of this default heap. */ BIOS.heapSize = 0x2000; /* System stack size (used by ISRs and Swis) */ Program.stack = 0x1000; System.SupportProxy = SysStd; /* allocate a config-params object */ var HeapParam = new HeapMem.Params; /* optionally assign per-instance configs */ HeapParam.size = 200000; HeapParam.sectionName = "app_heap"; Program.sectMap["app_heap"] = "SDRAM"; /* create an instance-object */ Program.global.myHeap = HeapMem.create(HeapParam); ECM.eventGroupHwiNum[0] = 7; ECM.eventGroupHwiNum[1] = 8; ECM.eventGroupHwiNum[2] = 9; ECM.eventGroupHwiNum[3] = 5; var task0Params = new Task.Params(); task0Params.priority = 5; task0Params.instance.name = "task0"; Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);