7ccdb036d547d24b9ffbd09503182fc14a018c49
[processor-sdk/pdk.git] / packages / ti / transport / ndk / nimu / example / am65xx / nimuExample_r5.cfg
2 /* =============================================================================
3 * Copyright (c) Texas Instruments Incorporated 2018-2019
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33 /* ================ General configuration ================ */
34 var enableStaticIP = 1;
35 var Defaults = xdc.useModule('xdc.runtime.Defaults');
36 var Diags = xdc.useModule('xdc.runtime.Diags');
37 var Error = xdc.useModule('xdc.runtime.Error');
38 var Log = xdc.useModule('xdc.runtime.Log');
39 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
40 var Main = xdc.useModule('xdc.runtime.Main');
41 var Memory = xdc.useModule('xdc.runtime.Memory')
42 var System = xdc.useModule('xdc.runtime.System');
43 var Text = xdc.useModule('xdc.runtime.Text');
44 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
45 var Task = xdc.useModule('ti.sysbios.knl.Task');
46 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
48 var BIOS = xdc.useModule('ti.sysbios.BIOS');
49 var Hwi = xdc.useModule('ti.sysbios.family.arm.v7r.keystone3.Hwi');
50 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
51 var SysMin = xdc.useModule('xdc.runtime.SysMin');
52 var Load = xdc.useModule('ti.sysbios.utils.Load');
53 /* TEMP work-around until rom cleanup, gel fixed */
54 Clock.timerId = 1;
56 /* Use BIOS POSIX support */
57 var Settings = xdc.useModule('ti.posix.tirtos.Settings');
59 /* Enable cache, turn this off when using BIOS version 14 */
60 var Cache = xdc.useModule('ti.sysbios.family.arm.v7r.Cache');
61 Cache.enableCache = true;
63 /*
64 * Direct CIO to UART
65 */
66 /* System.SupportProxy = SysUart; */
67 System.SupportProxy = SysMin;
69 /*
70 * Program.argSize sets the size of the .args section.
71 * The examples don't use command line args so argSize is set to 0.
72 */
73 Program.argSize = 0x0;
75 /*
76 * Uncomment this line to globally disable Asserts.
77 * All modules inherit the default from the 'Defaults' module. You
78 * can override these defaults on a per-module basis using Module.common$.
79 * Disabling Asserts will save code space and improve runtime performance.
80 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
81 */
83 /*
84 * Uncomment this line to keep module names from being loaded on the target.
85 * The module name strings are placed in the .const section. Setting this
86 * parameter to false will save space in the .const section. Error and
87 * Assert messages will contain an "unknown module" prefix instead
88 * of the actual module name.
89 Defaults.common$.namedModule = false;
90 */
92 /* Create default heap and hook it into Memory */
93 var heapMemParams = new HeapMem.Params;
94 heapMemParams.size = 16384*28;
95 var heap0 = HeapMem.create(heapMemParams);
97 Memory.defaultHeapInstance = heap0;
99 /*
100 * Minimize exit handler array in System. The System module includes
101 * an array of functions that are registered with System_atexit() to be
102 * called by System_exit().
103 */
104 System.maxAtexitHandlers = 4;
106 /*
107 * Uncomment this line to disable the Error print function.
108 * We lose error information when this is disabled since the errors are
109 * not printed. Disabling the raiseHook will save some code space if
110 * your app is not using System_printf() since the Error_print() function
111 * calls System_printf().
112 Error.raiseHook = null;
113 */
115 /*
116 * Uncomment this line to keep Error, Assert, and Log strings from being
117 * loaded on the target. These strings are placed in the .const section.
118 * Setting this parameter to false will save space in the .const section.
119 * Error, Assert and Log message will print raw ids and args instead of
120 * a formatted message.
121 Text.isLoaded = false;
122 */
124 /*
125 * Uncomment this line to disable the output of characters by SysMin
126 * when the program exits. SysMin writes characters to a circular buffer.
127 * This buffer can be viewed using the SysMin Output view in ROV.
128 SysMin.flushAtExit = false;
129 */
131 /* ================ BIOS configuration ================ */
133 /*
134 * Build a custom SYS/BIOS library from sources.
135 */
136 BIOS.libType = BIOS.LibType_Custom;
137 /* System stack size (used by ISRs and Swis) */
138 Program.stack = 0x10000;
140 Task.defaultStackSize = 0x4000;
142 /*
143 * Create and install logger for the whole system
144 */
145 var loggerBufParams = new LoggerBuf.Params();
146 loggerBufParams.numEntries = 32;
147 var logger0 = LoggerBuf.create(loggerBufParams);
148 Defaults.common$.logger = logger0;
149 Main.common$.diags_INFO = Diags.ALWAYS_ON;
152 /* NDK modules */
153 var Global = xdc.useModule('ti.ndk.config.Global');
154 var Ip = xdc.useModule('ti.ndk.config.Ip');
155 var Tcp = xdc.useModule('ti.ndk.config.Tcp');
156 var Udp = xdc.useModule('ti.ndk.config.Udp');
157 var Telnet = xdc.useModule('ti.ndk.config.Telnet');
159 Global.pktNumFrameBufs=512;
160 Global.pktSizeFrameBuf=1664;
161 Global.stackInitHook = "&stackInitHook";
162 Global.ndkThreadStackSize = 0x12000;
163 Global.networkOpenHook = '&NimuApp_netOpenHook';
164 Global.networkCloseHook = '&NimuApp_netCloseHook';
166 Tcp.transmitBufSize = 196608;
167 Tcp.receiveBufSize = 196608;
168 Tcp.receiveBufLimit = 196608;
171 if (enableStaticIP)
172 {
173 /* Settings for static IP configuration */
174 Ip.ResolveIP = false;
175 Ip.CallByIP = false;
176 Ip.autoIp = false;
177 Ip.address = "192.168.1.4";
178 Ip.mask = "255.255.255.0";
179 Ip.gatewayIpAddr = "192.168.1.1";
180 }
181 else
182 {
183 Ip.dhcpClientMode = Ip.CIS_FLG_IFIDXVALID;
184 }
186 /* Disable Timer frequency check, workaround for QT test */
187 var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
188 Timer.checkFrequency = false;
190 var Reset = xdc.useModule("xdc.runtime.Reset");
191 Reset.fxns[Reset.fxns.length++] = "&utilsCopyVecs2ATcm";
193 var BIOS = xdc.module('ti.sysbios.BIOS'); BIOS.cpuFreq.lo = 400000000; BIOS.cpuFreq.hi = 0;
195 var dmTimer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
196 for (var i = 0; i < 4; i++) {
197 dmTimer.intFreqs[i].lo = 25000000;
198 dmTimer.intFreqs[i].hi = 0;
199 }
201 Program.sectMap[".bss:nimu_ddr_mem"] = "DDR0";
202 Program.sectMap[".bss:nimu_msmc_mem"] = "MSMC3_H";
203 /*
204 * Initialize MPU and enable it
205 *
206 * Note: MPU must be enabled and properly configured for caching to work.
207 */
208 xdc.loadCapsule("r5_MPU.xs");