]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - packages/ti/ipc/tests/gatempapp.cfg
Added GateMPApp test for GateMP verification
[ipc/ipcdev.git] / packages / ti / ipc / tests / gatempapp.cfg
1 /* root of the configuration object model */
2 var Program = xdc.useModule('xdc.cfg.Program');
4 /* application uses the following modules and packages */
5 xdc.useModule('xdc.runtime.Assert');
6 xdc.useModule('xdc.runtime.Diags');
7 xdc.useModule('xdc.runtime.Error');
8 xdc.useModule('xdc.runtime.Log');
9 xdc.useModule('xdc.runtime.Registry');
11 xdc.useModule('ti.sysbios.knl.Semaphore');
12 xdc.useModule('ti.sysbios.knl.Task');
15 xdc.loadPackage('ti.sdo.ipc.family.vayu');
16 xdc.useModule('ti.sdo.ipc.family.vayu.InterruptDsp');
17 xdc.loadPackage('ti.ipc.rpmsg');
18 xdc.loadPackage('ti.ipc.family.vayu');
21 /*
22  *  ======== IPC Configuration ========
23  */
24 xdc.loadPackage('ti.ipc.ipcmgr');
25 var BIOS        = xdc.useModule('ti.sysbios.BIOS');
26 BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');
27 BIOS.addUserStartupFunction('&IpcMgr_callIpcStart');
29 /* describe the processors in the system */
30 var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
31 MultiProc.setConfig("DSP1", ["HOST", "IPU2", "IPU1", "DSP2", "DSP1"]);
33 /* GateMP host support */
34 var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
35 GateMP.hostSupport = true;
37 /* shared region configuration */
38 var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
40 /* configure SharedRegion #0 (IPC) */
41 var SR0Mem = Program.cpu.memoryMap["SR_0"];
43 SharedRegion.setEntryMeta(0,
44     new SharedRegion.Entry({
45         name:           "SR0",
46         base:           SR0Mem.base,
47         len:            SR0Mem.len,
48         ownerProcId:    MultiProc.getIdMeta("DSP1"),
49         cacheEnable:    true,
50         isValid:        true
51     })
52 );
54 /* Override the default resource table with my own to add SR0 */
55 var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
56 Resource.customTable = true;
58 var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
59 Cache.setMarMeta(0xa0000000, 0x02000000, Cache.Mar_DISABLE);
60 var L1cache = new Cache.Size();
61 L1cache.l1dSize = Cache.L1Size_0K;
63 /*
64  *  ======== SYS/BIOS Configuration ========
65  */
66 if (Program.build.profile == "debug") {
67     BIOS.libType = BIOS.LibType_Debug;
68 } else {
69     BIOS.libType = BIOS.LibType_Custom;
70 }
73 /* no rts heap */
74 Program.argSize = 100;  /* minimum size */
75 Program.stack = 0x1000;
77 xdc.useModule('ti.sysbios.xdcruntime.GateThreadSupport');
78 var GateSwi   = xdc.useModule('ti.sysbios.gates.GateSwi');
80 var Task = xdc.useModule('ti.sysbios.knl.Task');
81 Task.common$.namedInstance = true;
83 /* default memory heap */
84 var Memory = xdc.useModule('xdc.runtime.Memory');
85 Memory.defaultHeapSize = 0x20000;
87 /* create a heap for MessageQ messages */
88 var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
89 var params = new HeapBuf.Params;
90 params.align = 8;
91 params.blockSize = 512;
92 params.numBlocks = 256;
93 var msgHeap = HeapBuf.create(params);
95 var MessageQ  = xdc.useModule('ti.sdo.ipc.MessageQ');
96 MessageQ.registerHeapMeta(msgHeap, 0);
98 var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
99 //MessageQ.SetupTransportProxy = VirtioSetup;
101 /* Setup NameServer remote proxy */
102 var NameServer = xdc.useModule("ti.sdo.utils.NameServer");
103 var NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
104 NameServer.SetupProxy = NsRemote;
106 /* Enable Memory Translation module that operates on the BIOS Resource Table */
107 var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
108 Resource.loadSegment = "EXT_CODE"
111 /*  Use SysMin because trace buffer address is required for Linux/QNX
112  *  trace debug driver, plus provides better performance.
113  */
114 var System = xdc.useModule('xdc.runtime.System');
115 var SysMin = xdc.useModule('ti.trace.SysMin');
116 System.SupportProxy = SysMin;
117 SysMin.bufSize  = 0x10000;
119 Program.sectMap[".tracebuf"] = "TRACE_BUF";
120 Program.sectMap[".errorbuf"] = "EXC_DATA";
122 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
123 Clock.tickSource = Clock.TickSource_NULL;
125 var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
127 /* Skip the Timer frequency verification check. Need to remove this later */
128 Timer.checkFrequency = false;
130 /* Match this to the SYS_CLK frequency sourcing the dmTimers.
131  * Not needed once the SYS/BIOS family settings is updated. */
132 Timer.intFreq.hi = 0;
133 Timer.intFreq.lo = 19200000;
136 /*
137  *  ======== Power Management Configuration ========
138  */
139 /* Modules used in Power Management */
140 xdc.loadPackage('ti.pm');
142 /* Idle function that periodically flushes the unicache */
143 var Idle = xdc.useModule('ti.sysbios.knl.Idle');
144 Idle.addFunc('&VirtQueue_cacheWb');
147 /*
148  *  ======== Instrumentation Configuration ========
149  */
151 /* system logger */
152 var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
153 var LoggerSysParams = new LoggerSys.Params();
154 var Defaults = xdc.useModule('xdc.runtime.Defaults');
156 /* Enable Logger: */
157 Defaults.common$.logger = LoggerSys.create(LoggerSysParams);
159 /* Enable runtime Diags_setMask() for non-XDC spec'd modules: */
160 var Text = xdc.useModule('xdc.runtime.Text');
161 Text.isLoaded = true;
163 /* enable runtime Diags_setMask() for non-XDC spec'd modules */
164 var Diags = xdc.useModule('xdc.runtime.Diags');
165 Diags.setMaskEnabled = true;
167 /* override diags mask for selected modules */
168 xdc.useModule('xdc.runtime.Main');
169 Diags.setMaskMeta("xdc.runtime.Main",
170     Diags.ENTRY | Diags.EXIT | Diags.INFO, Diags.RUNTIME_ON);
171 Diags.setMaskMeta("ti.ipc.transports.TransportRpmsg",
172     Diags.INFO|Diags.USER1|Diags.STATUS, Diags.ALWAYS_ON);
173 Diags.setMaskMeta("ti.ipc.namesrv.NameServerRemoteRpmsg",
174     Diags.INFO, Diags.ALWAYS_ON);
176 var Registry = xdc.useModule('xdc.runtime.Registry');
177 Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
178 Registry.common$.diags_EXIT  = Diags.RUNTIME_OFF;
179 Registry.common$.diags_INFO  = Diags.ALWAYS_ON;
180 Registry.common$.diags_USER1 = Diags.ALWAYS_ON;
181 Registry.common$.diags_LIFECYCLE = Diags.ALWAYS_ON;
182 Registry.common$.diags_STATUS = Diags.ALWAYS_ON;
184 VirtioSetup.common$.diags_INFO = Diags.ALWAYS_ON;
186 var Main = xdc.useModule('xdc.runtime.Main');
187 Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
188 Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;
190 /* enable exception callstack backtrace */
191 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
192 if (Program.build.profile == "debug") {
193     Hwi.enableException = true;