]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/transport/ndk/nimu/example/am335x/armv7/bios/nimu_evm.cfg
transport: add to PDK
[processor-sdk/pdk.git] / packages / ti / transport / ndk / nimu / example / am335x / armv7 / bios / nimu_evm.cfg
1 /*******************************************************************************
2  *                                                                             *
3  * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com/      *
4  *                        ALL RIGHTS RESERVED                                  *
5  *                                                                             *
6  ******************************************************************************/
8 /*******************************************************************************
9 *  file name: nimu_evm.cfg
10 *  This file is included in the ethernet switch example
11 *
12 *******************************************************************************/
14 /* ================ General configuration ================ */
16 var enableStaticIP         = 1;
18 var Defaults = xdc.useModule('xdc.runtime.Defaults');
19 var Diags = xdc.useModule('xdc.runtime.Diags');
20 var Error = xdc.useModule('xdc.runtime.Error');
21 var Main = xdc.useModule('xdc.runtime.Main');
22 var Memory = xdc.useModule('xdc.runtime.Memory')
23 var SysMin = xdc.useModule('xdc.runtime.SysMin');
24 var System = xdc.useModule('xdc.runtime.System');
25 var Text = xdc.useModule('xdc.runtime.Text');
26 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
27 var Task = xdc.useModule('ti.sysbios.knl.Task');
28 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
29 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
30 var Timer = xdc.useModule('ti.sysbios.hal.Timer');
31 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
32 var SemihostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
34 /*
35  * Program.argSize sets the size of the .args section.
36  * The examples don't use command line args so argSize is set to 0.
37  */
38 Program.argSize = 0x0;
40 /* System stack size (used by ISRs and Swis) */
41 Program.stack = 0x10000;
43 /*
44  * Uncomment this line to globally disable Asserts.
45  * All modules inherit the default from the 'Defaults' module.  You
46  * can override these defaults on a per-module basis using Module.common$. 
47  * Disabling Asserts will save code space and improve runtime performance.
48 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
49  */
50 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
52 /*
53  * Uncomment this line to keep module names from being loaded on the target.
54  * The module name strings are placed in the .const section. Setting this
55  * parameter to false will save space in the .const section.  Error and
56  * Assert messages will contain an "unknown module" prefix instead
57  * of the actual module name.
58 Defaults.common$.namedModule = false;
59  */
60 Defaults.common$.namedModule = false;
62 /*
63  * Minimize exit handler array in System.  The System module includes
64  * an array of functions that are registered with System_atexit() to be
65  * called by System_exit().
66  */
67 System.maxAtexitHandlers = 4;
69 /* 
70  * Uncomment this line to disable the Error print function.  
71  * We lose error information when this is disabled since the errors are
72  * not printed.  Disabling the raiseHook will save some code space if
73  * your app is not using System_printf() since the Error_print() function
74  * calls System_printf().
75 Error.raiseHook = null;
76  */
77 Error.raiseHook = null;
78 /* 
79  * Uncomment this line to keep Error, Assert, and Log strings from being
80  * loaded on the target.  These strings are placed in the .const section.
81  * Setting this parameter to false will save space in the .const section.
82  * Error, Assert and Log message will print raw ids and args instead of
83  * a formatted message.
84 Text.isLoaded = false;
85  */
86 Text.isLoaded = false;
87 /*
88  * Uncomment this line to disable the output of characters by SysMin
89  * when the program exits.  SysMin writes characters to a circular buffer.
90  * This buffer can be viewed using the SysMin Output view in ROV.
91  */
92 SysMin.flushAtExit = false;
94 /* Circular buffer size for System_printf() */
95 SysMin.bufSize = 0x200;
97 System.SupportProxy = SysMin;
99 Clock.tickPeriod = 500;
100 var Global = xdc.useModule('ti.ndk.config.Global');
101 var Ip = xdc.useModule('ti.ndk.config.Ip');
103 Global.netSchedulerPri = Global.NC_PRIORITY_HIGH;
104 Global.debugAbortLevel = Global.DBG_ERROR;
105 Global.debugPrintLevel = Global.DBG_NONE;
107 var ti_sysbios_hal_Timer = xdc.useModule('ti.sysbios.hal.Timer');
109 /* Global.stackThreadUser = "&NDKACD_stackThread"; */
111 var Tcp = xdc.useModule('ti.ndk.config.Tcp');
112 var Udp = xdc.useModule('ti.ndk.config.Udp');
114 if (enableStaticIP)
116     /* Settings for static IP configuration */
117         Ip.ResolveIP = false;
118         Ip.CallByIP = false;
119         Ip.autoIp = false;
120     Ip.address = "192.168.1.4";
121     Ip.mask = "255.255.255.0";
122     Ip.gatewayIpAddr = "192.168.1.1";
124 else
126     Ip.dhcpClientMode = Ip.CIS_FLG_IFIDXVALID;
129 Global.ndkTickPeriod = 200;
130 Global.kernTaskPriLevel = 11;
131 Global.serviceReportHook = null;
132 Global.IPv6 = false;
133 Global.pktNumFrameBufs=384;
135 Tcp.transmitBufSize = 16384;
136 Tcp.receiveBufSize = 65536;
137 Tcp.receiveBufLimit = 65536;
140 Program.sectMap[".c_int00"] = new Program.SectionSpec();
141 Program.sectMap[".c_int00"].loadAddress = 0x80000000;
143 /* ================ BIOS configuration ================ */
145 var BIOS = xdc.useModule('ti.sysbios.BIOS');
146 BIOS.libType = BIOS.LibType_Custom;
147 BIOS.customCCOpts = BIOS.customCCOpts.replace(" -g ","");
148 BIOS.assertsEnabled = false;
149 BIOS.logsEnabled = false;
150 BIOS.swiEnabled = true;
152 /*
153  * The BIOS module will create the default heap for the system.
154  * Specify the size of this default heap.
155  */
156 BIOS.heapSize = 0x155000;
158 Task.defaultStackSize = 4096;
159 Task.idleTaskStackSize = 4096;
161 /* ================ Driver configuration ================ */
162 var socType           = "am335x";
163 /*use CSL package*/
164 var Csl = xdc.loadPackage('ti.csl');
165 Csl.Settings.deviceType = socType;
167 /* Load the OSAL package */
168 var osType = "tirtos"
169 var Osal = xdc.useModule('ti.osal.Settings');
170 Osal.osType = osType;
172 /* Load the board package */
173 var Board = xdc.loadPackage('ti.board');
174 Board.Settings.boardName = "evmAM335x";
175 /* Load the uart package */
176 var UartPackage = xdc.loadPackage('ti.drv.uart');
179 /* Load the uart package */
180 var I2cPackage = xdc.loadPackage('ti.drv.i2c');
182 /* Load the uart package */
183 var GpioPackage = xdc.loadPackage('ti.drv.gpio');
186 /* Load the emac package */
187 var Emac = xdc.loadPackage('ti.drv.emac');
188 Emac.Settings.socType = socType;
190 /* Load the NIMU package */
191 var Nimu                = xdc.loadPackage('ti.transport.ndk.nimu');
192 Nimu.Settings.socType  = socType;
195 /* ================ Cache and MMU configuration ================ */
197 var Cache = xdc.useModule('ti.sysbios.family.arm.a8.Cache');
198 Cache.enableCache = true; 
200 var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
201 Mmu.enableMMU = true;
203 /* Force peripheral section to be NON cacheable strongly-ordered memory */
204 var peripheralAttrs = {
205     type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
206     tex: 0,
207     bufferable : false,                // bufferable
208     cacheable  : false,                // cacheable
209     shareable  : false,                // shareable
210     noexecute  : true,                 // not executable
211 };
213 /* Define the base address of the 1 Meg page the peripheral resides in. */
214 var peripheralBaseAddr = 0x40300000;
216 /* Configure the corresponding MMU page descriptor accordingly */
217 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
218                           peripheralBaseAddr,
219                           peripheralAttrs);
222 /* Define the base address of the 1 Meg page the peripheral resides in. */
223 var peripheralBaseAddr = 0x44e00000;
225 /* Configure the corresponding MMU page descriptor accordingly */
226 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
227                           peripheralBaseAddr,
228                           peripheralAttrs);
231 /* Define the base address of the 1 Meg page the peripheral resides in. */
232 var peripheralBaseAddr = 0x48000000;
234 /* Configure the corresponding MMU page descriptor accordingly */
235 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
236                           peripheralBaseAddr,
237                           peripheralAttrs);
240 /* Define the base address of the 1 Meg page the peripheral resides in. */
241 var peripheralBaseAddr = 0x48100000;
243 /* Configure the corresponding MMU page descriptor accordingly */
244 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
245                           peripheralBaseAddr,
246                           peripheralAttrs);
249 /* Define the base address of the 1 Meg page the peripheral resides in. */
250 var peripheralBaseAddr = 0x48200000;
252 /* Configure the corresponding MMU page descriptor accordingly */
253 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
254                           peripheralBaseAddr,
255                           peripheralAttrs);
258 /* Define the base address of the 1 Meg page the peripheral resides in. */
259 var peripheralBaseAddr = 0x48300000;
261 /* Configure the corresponding MMU page descriptor accordingly */
262 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
263                           peripheralBaseAddr,
264                           peripheralAttrs);
267 /* Define the base address of the 1 Meg page the peripheral resides in. */
268 var peripheralBaseAddr = 0x49000000;
270 /* Configure the corresponding MMU page descriptor accordingly */
271 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
272                           peripheralBaseAddr,
273                           peripheralAttrs);
276 /* Define the base address of the 1 Meg page the peripheral resides in. */
277 var peripheralBaseAddr = 0x4a100000;
279 /* Configure the corresponding MMU page descriptor accordingly */
280 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
281                           peripheralBaseAddr,
282                           peripheralAttrs);
285 /* Define the base address of the 1 Meg page the peripheral resides in. */
286 var peripheralBaseAddr = 0x4a300000;
288 /* Configure the corresponding MMU page descriptor accordingly */
289 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
290                           peripheralBaseAddr,
291                           peripheralAttrs);