/* * audioAnalogTest.cfg * * Memory Map and Program intializations for the audio analog test * * Copyright (C) 2016 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. * */ /* load the required files and packages */ var Memory = xdc.useModule('xdc.runtime.Memory') var Task = xdc.useModule ("ti.sysbios.knl.Task"); var BIOS = xdc.useModule ("ti.sysbios.BIOS"); var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner"); 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 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 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 CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc'); /* Add the drivers and libraries required */ //var mcasp = xdc.useModule('ti.drv.mcasp.Settings'); var devType = "k2g"; var Csl = xdc.useModule('ti.csl.Settings'); Csl.deviceType = devType; //var PlatformLib = xdc.loadPackage('ti.platform.evmk2g'); var Edma = xdc.loadPackage('ti.sdo.edma3.drv'); /* Load the uart package -- required by board */ var Uart = xdc.loadPackage('ti.drv.uart'); Uart.Settings.socType = devType; //var Board = xdc.loadPackage('ti.board'); //Board.Settings.boardName = "evmK2G"; /* Load the osal package -- required by board & interrupt example */ var osType = "tirtos" var Osal = xdc.loadPackage('ti.osal'); Osal.Settings.osType = osType; Osal.Settings.socType = devType; /* * 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 = 0x4000; System.SupportProxy = SysStd; var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem'); var heapMemParams = new HeapMem.Params(); heapMemParams.size = 0x28000; heapMemParams.sectionName = "systemHeap"; Program.global.heapHandle = HeapMem.create(heapMemParams); /* * Create and install logger for the whole system */ var loggerBufParams = new LoggerBuf.Params(); loggerBufParams.numEntries = 32; var logger0 = LoggerBuf.create(loggerBufParams); Defaults.common$.logger = logger0; Main.common$.diags_INFO = Diags.ALWAYS_ON; Program.sectMap["systemHeap"] = "L2SRAM"; Program.sectMap[".sysmem"] = "L2SRAM"; Program.sectMap[".args"] = "L2SRAM"; Program.sectMap[".cio"] = "L2SRAM"; Program.sectMap[".far"] = "EXT_RAM"; Program.sectMap[".rodata"] = "L2SRAM"; Program.sectMap[".neardata"] = "L2SRAM"; Program.sectMap[".init_array"] = "L2SRAM"; Program.sectMap[".cinit"] = "L2SRAM"; Program.sectMap[".bss"] = "L2SRAM"; Program.sectMap[".const"] = "L2SRAM"; Program.sectMap[".text"] = "L2SRAM"; Program.sectMap[".code"] = "L2SRAM"; Program.sectMap[".switch"] = "L2SRAM"; Program.sectMap[".data"] = "L2SRAM"; Program.sectMap[".fardata"] = "L2SRAM"; Program.sectMap[".vecs"] = "L2SRAM"; Program.sectMap["platform_lib"] = "L2SRAM"; Program.sectMap[".stack"] = "L2SRAM"; var task0Params = new Task.Params(); task0Params.priority = 5; task0Params.instance.name = "task0"; Program.global.task0 = Task.create("&Audio_echo_Task", task0Params); /* Enable BIOS Task Scheduler */ BIOS.taskEnabled = true; /* * Enable Event Groups here and registering of ISR for specific GEM INTC is done * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs */ ECM.eventGroupHwiNum[0] = 7; ECM.eventGroupHwiNum[1] = 8; ECM.eventGroupHwiNum[2] = 9; ECM.eventGroupHwiNum[3] = 10;