]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/tcp3d-lld.git/blob - example/k2l/c66/bios/sample_config.cfg
Merge branch 'releases/mcsdk_03.01.00.00'
[keystone-rtos/tcp3d-lld.git] / example / k2l / c66 / bios / sample_config.cfg
1 /*
2  * ======== sample_config.cfg ========
3  */
5 /* IPC packages */
6 var ListMP = xdc.useModule('ti.sdo.ipc.ListMP');
7 var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
8 var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
9 var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
10 var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
11 var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
13 /* Configure System to use SysMin */
14 System = xdc.useModule('xdc.runtime.System');
15 SysStd  = xdc.useModule('xdc.runtime.SysStd');
16 System.SupportProxy = xdc.useModule('xdc.runtime.SysMin')
17 System.SupportProxy = SysStd;
18 System.extendedFormats = "%$S%f";
20 /* Set the system stack - 0x2000 */
21 Program.stack = 0x4000;
23 var Memory = xdc.useModule('xdc.runtime.Memory');
24 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
26 /* Use HeapMem for default heap manager and give it 49152 (0xC000)
27  * bytes to work with.
28  */
29 Program.sectMap["systemHeap"] = Program.platform.dataMemory;
30 var heapMemParams = new HeapMem.Params;
31 heapMemParams.size = 0x18000;
32 heapMemParams.sectionName = "systemHeap";
33 Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
35 /*
36  * Creating Heap Memories for using with test application
37  */
38 /* Create a heap for TCP3D input/output data using ti.bios.HeapMem. */
39 /* Program.sectMap["tcp3DataSection"] = {loadSegment: "MSMCSRAM"};
40 var heapMemParams1 = new HeapMem.Params;
41 heapMemParams1.size = 0x100000;
42 heapMemParams1.align = 64;
43 heapMemParams1.sectionName = "tcp3DataSection";
44 Program.global.tcp3dDataHeap = HeapMem.create(heapMemParams1); */
46 /* Create a heap for TCP3D driver using ti.bios.HeapMem. */
47 Program.sectMap["tcp3DriverSection"] = Program.platform.dataMemory;
48 var heapMemParams2 = new HeapMem.Params;
49 heapMemParams2.size = 0x4000;
50 heapMemParams2.sectionName = "tcp3DriverSection";
51 Program.global.tcp3dDrvHeap = HeapMem.create(heapMemParams2);
53 /* Create a heap for TCP3D QUEUE DESCRIPTORS using ti.bios.HeapMem. */
54 Program.sectMap["tcp3QueueDescrSection"] = Program.platform.dataMemory;
55 var heapMemParams3 = new HeapMem.Params;
56 heapMemParams3.size = 4096;
57 heapMemParams3.sectionName = "tcp3QueueDescrSection";
58 Program.global.tcp3dQueHeap = HeapMem.create(heapMemParams3);
60 /* To avoid wasting shared memory for Notify and MessageQ transports */
61 for (var i = 0; i < MultiProc.numProcessors; i++) {
62     Ipc.setEntryMeta({
63         remoteProcId: i,
64         setupNotify: false,
65         setupMessageQ: false,
66     });
67 }
70 SharedRegion.setEntryMeta(0,
71     { base: 0x0C000000,
72       len: 0x100000,
73       ownerProcId: 0,
74       cacheLineSize: 64,
75       isValid: true,
76       name: "sharemem",
77     });
79 /* 
80  * Pull in Timer, Semaphore, Swi, Task, and Queue modules
81  * used in this example.
82  */
83 var BIOS = xdc.useModule('ti.sysbios.BIOS');
84 xdc.useModule('ti.sysbios.hal.Timer');
85 xdc.useModule('ti.sysbios.knl.Semaphore');
86 xdc.useModule('ti.sysbios.knl.Swi');
87 xdc.useModule('ti.sysbios.knl.Task');
88 xdc.useModule('ti.sysbios.hal.Cache');
89 xdc.useModule('ti.sysbios.family.c64p.Hwi');
90 xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
91 xdc.useModule('xdc.runtime.Log');
92 xdc.useModule('xdc.runtime.Error');
93 var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
94 var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
96 /*
97  * Enable Event Groups here and registering of ISR for specific GEM INTC is done
98  * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
99  */
100 ECM.eventGroupHwiNum[0] = 7;
101 ECM.eventGroupHwiNum[1] = 8;
102 ECM.eventGroupHwiNum[2] = 9;
103 ECM.eventGroupHwiNum[3] = 10;
105 /*
106  * Setup the Logger for Driver
107  */
108 var LoggerSys0Params0 = new LoggerSys.Params;
109 LoggerSys0Params0.instance.name = 'tcp3dDrvLog';
110 Program.global.tcp3dDrvLog = LoggerSys.create(LoggerSys0Params0);
112 /*
113  * allow printf() to be called from Swi threads. Note that use of this gate
114  * incurs additional latency for Swi processing since Swi scheduler will be
115  * disabled to manage critical sections within the RTS library code.
116 BIOS.rtsGateType = BIOS.GateSwi;
117  */
120 /*
121  * Adding the other Dependent packages
122  */
123 /*xdc.loadPackage('ti.wbi.common.api');*/
124 xdc.loadPackage('ti.sdo.edma3.drv');
126 /* Load the TCP3D package */
127 var Tcp3d = xdc.useModule('ti.drv.tcp3d.Settings');
128 Tcp3d.deviceType = "k2l";
130 /* Load the CSL package */
131 var Csl = xdc.useModule('ti.csl.Settings');
133 /* Device specific configuration */
134 var devName = "k2l";
135 Csl.deviceType      = devName;