[processor-sdk/pdk.git] / packages / ti / transport / ndk / nimu_icss / example / k2g / c66 / bios / nimu_icss_c66_wSocLib.cfg
1 var Defaults = xdc.useModule('xdc.runtime.Defaults');
2 var Diags = xdc.useModule('xdc.runtime.Diags');
3 var Error = xdc.useModule('xdc.runtime.Error');
4 var Log = xdc.useModule('xdc.runtime.Log');
5 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
6 var Main = xdc.useModule('xdc.runtime.Main');
7 var Memory = xdc.useModule('xdc.runtime.Memory')
8 var SysMin = xdc.useModule('xdc.runtime.SysMin');
9 var System = xdc.useModule('xdc.runtime.System');
10 var Text = xdc.useModule('xdc.runtime.Text');
11 var BIOS = xdc.useModule('ti.sysbios.BIOS');
12 //var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
13 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
14 //var Timer = xdc.useModule('ti.sysbios.hal.Timer');
15 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
16 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
17 var Task = xdc.useModule('ti.sysbios.knl.Task');
18 var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
19 //var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
20 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
21 var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
22 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
23 var Ecm = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
24 var core = xdc.useModule('ti.sysbios.hal.Core');
25 var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
26 var Cache = xdc.useModule('ti.sysbios.family.c66.Cache');
27 var devType = "k2g"
29 /* Load the OSAL package */
30 var osType = "tirtos"
31 var Osal = xdc.useModule('ti.osal.Settings');
32 Osal.osType = osType;
33 Osal.socType = devType;
35 /*use CSL package*/
36 var Csl = xdc.loadPackage('ti.csl');
37 Csl.Settings.deviceType = devType;
40 /* Load Profiling package */
41 var Utils = xdc.loadPackage('ti.utils.profiling');
43 /* Load the uart package */
44 var Uart = xdc.loadPackage('ti.drv.uart');
45 Uart.Settings.socType = devType;
47 /* Load the I2C package - required by board */
48 var I2c = xdc.loadPackage('ti.drv.i2c');
49 I2c.Settings.socType = devType;
51 /* Load the PRUSS package */
52 var Pruss = xdc.loadPackage('ti.drv.pruss');
53 Pruss.Settings.socType = devType;
56 /* Load the Board package and set the board name */
57 var Board = xdc.loadPackage('ti.board');
58 Board.Settings.boardName = "iceK2G";
61 /* Load the Icss_Emac package */
62 var Icss_Emac = xdc.loadPackage('ti.drv.icss_emac');
63 Icss_Emac.Settings.enableProfiling = true;
64 Icss_Emac.Settings.socType = devType;
66 var Nimu_Icss = xdc.loadPackage('ti.transport.ndk.nimu_icss');
68 var enableStaticIP = 1;
69 /* NDK modules */
70 var Global = xdc.useModule('ti.ndk.config.Global');
71 var Ip = xdc.useModule('ti.ndk.config.Ip');
72 var Tcp = xdc.useModule('ti.ndk.config.Tcp');
73 var Udp = xdc.useModule('ti.ndk.config.Udp');
74 var Telnet = xdc.useModule('ti.ndk.config.Telnet');
76 Tcp.transmitBufSize = 8192;
77 Tcp.receiveBufSize = 8192;
78 Tcp.receiveBufLimit = 8192;
79 Global.pktNumFrameBufs = 384;
81 /*
82 * Program.argSize sets the size of the .args section.
83 * The examples don't use command line args so argSize is set to 0.
84 */
85 Program.argSize = 0x0;
88 /*
89 * Uncomment this line to globally disable Asserts.
90 * All modules inherit the default from the 'Defaults' module. You
91 * can override these defaults on a per-module basis using Module.common$.
92 * Disabling Asserts will save code space and improve runtime performance.
93 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
94 */
96 /*
97 * Uncomment this line to keep module names from being loaded on the target.
98 * The module name strings are placed in the .const section. Setting this
99 * parameter to false will save space in the .const section. Error and
100 * Assert messages will contain an "unknown module" prefix instead
101 * of the actual module name.
102 Defaults.common$.namedModule = false;
103 */
105 /*
106 * Minimize exit handler array in System. The System module includes
107 * an array of functions that are registered with System_atexit() to be
108 * called by System_exit().
109 */
110 System.maxAtexitHandlers = 4;
112 /*
113 * Uncomment this line to disable the Error print function.
114 * We lose error information when this is disabled since the errors are
115 * not printed. Disabling the raiseHook will save some code space if
116 * your app is not using System_printf() since the Error_print() function
117 * calls System_printf().
118 Error.raiseHook = null;
119 */
121 /*
122 * Uncomment this line to keep Error, Assert, and Log strings from being
123 * loaded on the target. These strings are placed in the .const section.
124 * Setting this parameter to false will save space in the .const section.
125 * Error, Assert and Log message will print raw ids and args instead of
126 * a formatted message.
127 Text.isLoaded = false;
128 */
130 /*
131 * Uncomment this line to disable the output of characters by SysMin
132 * when the program exits. SysMin writes characters to a circular buffer.
133 * This buffer can be viewed using the SysMin Output view in ROV.
134 SysMin.flushAtExit = false;
135 */
137 /*
138 * The BIOS module will create the default heap for the system.
139 * Specify the size of this default heap.
140 */
141 BIOS.heapSize = 0xA0000;
142 /*
143 * Build a custom SYS/BIOS library from sources.
144 */
145 BIOS.libType = BIOS.LibType_Custom;
146 /* System stack size (used by ISRs and Swis) */
147 Program.stack = 0x20000;
148 /* Circular buffer size for System_printf() */
149 SysMin.bufSize = 0x400;
150 /*
151 * Create and install logger for the whole system
152 */
153 var loggerBufParams = new LoggerBuf.Params();
154 loggerBufParams.numEntries = 32;
155 var logger0 = LoggerBuf.create(loggerBufParams);
156 Defaults.common$.logger = logger0;
157 Main.common$.diags_INFO = Diags.ALWAYS_ON;
159 System.SupportProxy = SysMin;
161 /* Create a default system heap using ti.bios.HeapMem. */
162 var heapMemParams1 = new HeapMem.Params;
163 heapMemParams1.size = 8192 * 25;
164 heapMemParams1.sectionName = "systemHeap";
165 Program.global.heap0 = HeapMem.create(heapMemParams1);
169 Global.networkOpenHook = "&netOpenHook";
170 Global.networkCloseHook = "&netCloseHook";
172 if (enableStaticIP)
173 {
174 /* Settings for static IP configuration */
175 Ip.ResolveIP = false;
176 Ip.CallByIP = false;
177 Ip.autoIp = false;
178 Ip.address = "192.168.2.3";
179 Ip.mask = "255.255.255.0";
180 Ip.gatewayIpAddr = "192.168.2.1";
181 Ip.ifIdx = 2;
182 }
183 else
184 {
185 Ip.dhcpClientMode = Ip.CIS_FLG_IFIDXVALID;
186 }
187 Global.stackInitHook = "&stackInitHook";
188 Global.ndkTickPeriod = 100;
189 Global.kernTaskPriLevel = 11;
190 Global.serviceReportHook = null;
191 Global.IPv6 = false;
193 Task.defaultStackSize = 4096;
194 Task.idleTaskStackSize = 4096;
198 /* ================ Memory sections configuration ================ */
200 /* This is the default memory heap. */
201 Memory.defaultHeapInstance = Program.global.heap0;
202 Program.sectMap["systemHeap"] = Program.platform.stackMemory;
203 Program.sectMap[".text"] = "APP_CODE_MEM";
204 Program.sectMap[".data"] = "APP_CACHED_DATA_MEM";
205 Program.sectMap[".const"] = "APP_CACHED_DATA_MEM";
206 Program.sectMap[".plt"] = "APP_CACHED_DATA_MEM";
207 Program.sectMap[".fardata:benchmarking"] = "APP_CACHED_DATA_BLK1_MEM";
208 /*
209 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
210 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
211 */
212 Ecm.eventGroupHwiNum[0] = 6;
213 Ecm.eventGroupHwiNum[1] = 7;
214 Ecm.eventGroupHwiNum[2] = 8;
215 Ecm.eventGroupHwiNum[3] = 9;