]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/mcasp/example/evmK2G/c66/bios/AudioEQ_demo.cfg
mcasp-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / mcasp / example / evmK2G / c66 / bios / AudioEQ_demo.cfg
1 /* ========================================================================== */
2 /*                      CFG script for the Audio sample                       */
3 /* ========================================================================== */
5 /* load the required files and packages                                       */
6 var GIO                 = xdc.useModule('ti.sysbios.io.GIO');
7 var Task        = xdc.useModule ("ti.sysbios.knl.Task");
8 var BIOS        = xdc.useModule ("ti.sysbios.BIOS");
9 var ECM         = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");
10 var System      = xdc.useModule ("xdc.runtime.System");
11 var SysStd      = xdc.useModule('xdc.runtime.SysStd');
12 var cache       = xdc.useModule ("ti.sysbios.hal.Cache");
13 var Timestamp   = xdc.useModule ("xdc.runtime.Timestamp");
15 var Hwi         = xdc.useModule ("ti.sysbios.family.c64p.Hwi");
16 var Sem         = xdc.useModule("ti.sysbios.knl.Semaphore");
17 var Log                 = xdc.useModule('xdc.runtime.Log');
18 var LoggerBuf   = xdc.useModule('xdc.runtime.LoggerBuf');
19 var Memory              = xdc.useModule('xdc.runtime.Memory')
20 var SysMin              = xdc.useModule('xdc.runtime.SysMin');
21 var System              = xdc.useModule('xdc.runtime.System');
22 var Defaults    = xdc.useModule('xdc.runtime.Defaults');
23 var Main                = xdc.useModule('xdc.runtime.Main');
24 var Diags               = xdc.useModule('xdc.runtime.Diags');
25 var HeapMem     = xdc.useModule ("ti.sysbios.heaps.HeapMem");
26 var LoggingSetup = xdc.useModule('ti.uia.sysbios.LoggingSetup');
27 var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
29 var Edma                        = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
30 var drv                 = xdc.loadPackage ("ti.sdo.edma3.drv");
31 var rm                  = xdc.loadPackage ("ti.sdo.edma3.rm");
33 /* Load and use the CSL package */
34 var devType = "k2g"
35 var Csl = xdc.useModule('ti.csl.Settings');
36 Csl.deviceType = devType;
38 /* Load the packages */
39 var socType           = "k2g";
40 var McASP               = xdc.loadPackage('ti.drv.mcasp');
41 McASP.Settings.socType  = socType;
43 /* Load the i2c package */
44 var I2C               = xdc.loadPackage('ti.drv.i2c');
45 I2C.Settings.socType  = socType;
47 /* Load the uart package */
48 var Uart = xdc.loadPackage('ti.drv.uart');
49 Uart.Settings.socType  = socType;
51 /* Load the OSAL package */ 
52 var osType = "tirtos"
53 var Osal = xdc.useModule('ti.osal.Settings');
54 Osal.osType = osType;
55 Osal.socType = "k2g";
58 /* Load the Board package and set the board name */
59  var Board = xdc.loadPackage('ti.board');
60 Board.Settings.boardName = "evmK2G";
62 /* 
63  * The BIOS module will create the default heap for the system.
64  * Specify the size of this default heap.
65  */
66 BIOS.heapSize = 0x2000;
69 /* System stack size (used by ISRs and Swis) */
70 Program.stack = 0x1000;
72 System.SupportProxy = SysStd;
74 /* allocate a config-params object */  
75 var HeapParam = new HeapMem.Params;  
76   
77 /* optionally assign per-instance configs */  
78 HeapParam.size = 200000;
79 HeapParam.sectionName = "L2SRAM"
80   
81 /* create an instance-object */  
82 Program.global.myHeap = HeapMem.create(HeapParam);  
84 var task0Params = new Task.Params();
85 task0Params.priority = 5;
86 task0Params.instance.name = "task0";
88 Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);
90 var task1Params = new Task.Params();
91 task1Params.priority = 1;
92 task1Params.instance.name = "task1";
94 Program.global.task1 = Task.create("&ReadInputTask", task1Params);
96 ECM.eventGroupHwiNum[0] = 7;
97 ECM.eventGroupHwiNum[1] = 9;
98 ECM.eventGroupHwiNum[2] = 10;
99 ECM.eventGroupHwiNum[3] = 11;
101 Program.sectMap[".text"] = "L2SRAM";
102 // chnaging default tick of timer to 100us from default 1000us
103 var Clock = xdc.useModule('ti.sysbios.knl.Clock'); 
104 Clock.tickPeriod = 1000;
106 /* 
107  * Create and install logger for the whole system
108  */
109 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
110 var loggerBuf0 = LoggerBuf.create();
111 // Change Timer frequency
112 // Set Timer64 freq to 100MHz
113 var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
114 for (var idx = 0; idx < 7; idx++) {
115     Timer.intFreqs[idx].lo = 100000000;
116     Timer.intFreqs[idx].hi = 0;
118 LoggingSetup.sysbiosHwiLogging = true;
119 LoggingSetup.sysbiosSemaphoreLogging = true;
120 LoggingSetup.loadHwiLogging = true;
121 LoggingSetup.loggerType = LoggingSetup.LoggerType_JTAGRUNMODE;
123 var Load = xdc.useModule('ti.sysbios.utils.Load');
124 Load.common$.logger = loggerBuf0;
125 var Diags = xdc.useModule('xdc.runtime.Diags');
126 Load.common$.diags_USER4 = Diags.ALWAYS_ON;
127 BIOS.cpuFreq.lo = 600000000;
129 var System = xdc.useModule('xdc.runtime.System');
130 var SysStd = xdc.useModule('xdc.runtime.SysStd');
131 System.SupportProxy = SysStd;