summaryrefslogtreecommitdiffstats
blob: 29d68c2cacf37bfc5ebc6fee18ff481954791ed1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
 *  ======== cpsw_example.cfg ========
 *
 */

/* Load all required BIOS/XDC runtime packages */
var Memory                      =   xdc.useModule('xdc.runtime.Memory');
var BIOS                        =   xdc.useModule('ti.sysbios.BIOS');
var HeapMem                     =   xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf                     =   xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Log                         =   xdc.useModule('xdc.runtime.Log');
var Task                        =   xdc.useModule('ti.sysbios.knl.Task');
var Hwi			                =	xdc.useModule('ti.sysbios.family.c64p.Hwi');
var ECM     					= 	xdc.useModule('ti.sysbios.family.c64p.EventCombiner');

/* Load and use the CSL, CPPI and QMSS packages */
var devType = "k2l"
var Csl = xdc.useModule('ti.csl.Settings');
Csl.deviceType = devType;
/* Load the CPPI package */
var Cppi                        =   xdc.loadPackage('ti.drv.cppi'); 
/* Load the QMSS package */
var Qmss                        =   xdc.loadPackage('ti.drv.qmss');

/* Load the PA package */
var Pa                          =   xdc.useModule('ti.drv.pa.Settings');
Pa.deviceType = devType;

/* Load the RM package */
var Rm                          =   xdc.loadPackage('ti.drv.rm');

var System                      =   xdc.useModule('xdc.runtime.System');
SysStd                          =   xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy             =   SysStd;

/* Below configuration is needed if the DSP executable needs to be loaded from MPM client from ARM */
/*
 * The SysMin used here vs StdMin, as trace buffer address is required for
 * Linux trace debug driver, plus provides better performance.
 */
Program.global.sysMinBufSize = 0x8000;
var System = xdc.useModule('xdc.runtime.System');
var SysMin = xdc.useModule('ti.trace.SysMin');
Program.sectMap[".tracebuf"] = "L2SRAM";
System.SupportProxy = SysMin;
SysMin.bufSize = Program.global.sysMinBufSize;

/* Configure resource table for trace only.
   Note that, it traceOnly parameter should not
   be set if application is using MessageQ based IPC
   to communicate between cores.
 */
var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
Resource.loadSegment = Program.platform.dataMemory;
Resource.traceOnly = true;

/* end MPM Client Configurations */

/* Create a default system heap using ti.bios.HeapMem. */
var heapMemParams1              =   new HeapMem.Params;
heapMemParams1.size             =   8192 * 30;
heapMemParams1.sectionName      =   "systemHeap";
Program.global.heap0            =   HeapMem.create(heapMemParams1);

/* This is the default memory heap. */
Memory.defaultHeapInstance      =   Program.global.heap0;

Program.sectMap["systemHeap"]   =   Program.platform.stackMemory;

/* 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;

/* Memory map */
Program.sectMap[".text"] = "MSMCSRAM"; 
Program.sectMap[".const"] = "MSMCSRAM"; 
Program.sectMap[".qmss"] = "L2SRAM"; 
Program.sectMap[".cppi"] = "L2SRAM";