]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/ipc/tests/Dsp_vayu.cfg
a6fe8d42ca26bfae7de2814f4d02b42faebe3233
[ipc/ipcdev.git] / packages / ti / ipc / tests / Dsp_vayu.cfg
1 /*
2  * Copyright (c) 2012-2015, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * *  Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  *
12  * *  Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * *  Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /*
34  * The SysMin is used here instead of StdMin, as trace buffer address is
35  * required for Linux trace debug driver, plus provides better performance.
36  */
37 var System      = xdc.useModule('xdc.runtime.System');
38 var SysMin      = xdc.useModule('ti.trace.SysMin');
39 System.SupportProxy = SysMin;
40 SysMin.bufSize  = 0x8000;
42 /* Define default memory heap properties */
43 var Memory      = xdc.useModule('xdc.runtime.Memory');
44 Memory.defaultHeapSize = 0x20000;
46 var Semaphore   = xdc.useModule('ti.sysbios.knl.Semaphore');
47 var BIOS        = xdc.useModule('ti.sysbios.BIOS');
49 var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
50 Cache.setMarMeta(0xa0000000, 0x02000000, Cache.Mar_DISABLE);
52 /* Reduces code size, by only pulling in modules explicitly referenced: */
53 //BIOS.libType    = BIOS.LibType_Custom;
55 /* Use LibType_Debug option for now to avoid linking error due to bug in BIOS */
56 BIOS.libType    = BIOS.LibType_Debug;
58 xdc.loadPackage('ti.sdo.ipc.family.vayu');
59 xdc.useModule('ti.sdo.ipc.family.vayu.InterruptDsp');
60 xdc.loadPackage('ti.ipc.rpmsg');
61 xdc.loadPackage('ti.ipc.family.vayu');
63 /* TBD: Not yet taken in from omapzoom:
64 xdc.loadPackage('ti.srvmgr');
65 xdc.useModule('ti.srvmgr.omx.OmxSrvMgr');
66 xdc.loadPackage('ti.resmgr');
67 */
69 /* Enable Memory Translation module that operates on the BIOS Resource Table */
70 var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
71 Resource.loadSegment = "EXT_CODE";
73 /* Modules used in Power Management */
74 xdc.loadPackage('ti.pm');
76 var Power = xdc.useModule('ti.sysbios.family.c66.vayu.Power');
77 Power.loadSegment = "PM_DATA";
80 /* Idle function that periodically flushes the unicache */
81 var Idle = xdc.useModule('ti.sysbios.knl.Idle');
82 Idle.addFunc('&VirtQueue_cacheWb');
84 var HeapBuf   = xdc.useModule('ti.sysbios.heaps.HeapBuf');
85 var List      = xdc.useModule('ti.sdo.utils.List');
87 var GateSwi   = xdc.useModule('ti.sysbios.gates.GateSwi');
89 var Task          = xdc.useModule('ti.sysbios.knl.Task');
90 Task.common$.namedInstance = true;
92 var Assert = xdc.useModule('xdc.runtime.Assert');
93 var Defaults = xdc.useModule('xdc.runtime.Defaults');
94 var Diags = xdc.useModule('xdc.runtime.Diags');
95 var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
96 var LoggerSysParams = new LoggerSys.Params();
98 /* Enable Logger: */
99 Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
101 /* Enable runtime Diags_setMask() for non-XDC spec'd modules: */
102 var Text = xdc.useModule('xdc.runtime.Text');
103 Text.isLoaded = true;
104 var Registry = xdc.useModule('xdc.runtime.Registry');
105 Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
106 Registry.common$.diags_EXIT  = Diags.RUNTIME_OFF;
107 Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
108 Registry.common$.diags_INFO  = Diags.RUNTIME_OFF;
109 Registry.common$.diags_LIFECYCLE = Diags.RUNTIME_OFF;
110 Registry.common$.diags_STATUS = Diags.RUNTIME_OFF;
111 Diags.setMaskEnabled = true;
113 var Main = xdc.useModule('xdc.runtime.Main');
114 Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
115 Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
117 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
118 Hwi.enableException = true;
120 /* -------------------------------- DSP ----------------------------------*/
121 var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
122 var myName;
123 var timerId;
124 if (Program.platformName.match(/^ti\.platforms\.evmDRA7XX\:dsp1/)) {
125     myName = "DSP1";
126     /* Configure BIOS clock source as GPTimer5 */
127     timerId = 4;
129     var Deh = xdc.useModule('ti.deh.Deh');
131     Idle.addFunc('&ti_deh_Deh_idleBegin'); /* Must be placed before pwr mgmt */
132     //TBD Idle.addFunc('&IpcPower_idle'); /* IpcPower_idle must be at the end */
134 else {
135     myName = "DSP2";
136     /* Configure BIOS clock source as GPTimer6 */
137     timerId = 5;
139 MultiProc.setConfig(myName, ["HOST", "IPU2", "IPU1", "DSP2", "DSP1"]);
141 /* --------------------------- TICK --------------------------------------*/
142 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
143 Clock.tickSource = Clock.TickSource_USER;
144 Clock.timerId = timerId;
146 var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
148 /* Skip the Timer frequency verification check. Need to remove this later */
149 Timer.checkFrequency = false;
151 /* Match this to the SYS_CLK frequency sourcing the dmTimers.
152  * Not needed once the SYS/BIOS family settings is updated. */
153 Timer.intFreq.hi = 0;
154 Timer.intFreq.lo = 19200000;
156 var timerParams = new Timer.Params();
157 timerParams.period = Clock.tickPeriod;
158 timerParams.periodType = Timer.PeriodType_MICROSECS;
159 /* Switch off Software Reset to make the below settings effective */
160 timerParams.tiocpCfg.softreset = 0x0;
161 /* Smart-idle wake-up-capable mode */
162 timerParams.tiocpCfg.idlemode = 0x3;
163 /* Wake-up generation for Overflow */
164 timerParams.twer.ovf_wup_ena = 0x1;
165 Timer.create(Clock.timerId, Clock.doTick, timerParams);
167 Program.sectMap[".tracebuf"] = "TRACE_BUF";
168 Program.sectMap[".errorbuf"] = "EXC_DATA";
170 /* Version module */
171 /* ???
172 xdc.useModule('ti.utils.Version');
173 */