[processor-sdk/pdk.git] / packages / ti / transport / ndk / nimu_icss / example / CCLink / am574x / c66 / bios / cclink_idkAM574x.cfg
1 /**
2 * \file cclink_idkAM574x.cfg
3 *
4 * \brief Sysbios config file for ethernet example project on AM574X IDK EVM.
5 *
6 */
8 /*
9 * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the
21 * distribution.
22 *
23 * Neither the name of Texas Instruments Incorporated nor the names of
24 * its contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 *
39 */
40 /* ================ General configuration ================ */
41 var enableStaticIP = 1;
42 var mode = Program.build.cfgArgs.MODE;
44 /* use modules */
45 var Defaults = xdc.useModule('xdc.runtime.Defaults');
46 var Diags = xdc.useModule('xdc.runtime.Diags');
47 var Error = xdc.useModule('xdc.runtime.Error');
48 var Log = xdc.useModule('xdc.runtime.Log');
49 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
50 var Main = xdc.useModule('xdc.runtime.Main');
51 var System = xdc.useModule('xdc.runtime.System');
52 var Text = xdc.useModule('xdc.runtime.Text');
53 var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
54 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
55 var Timer = xdc.useModule('ti.sysbios.hal.Timer');
56 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
57 var Task = xdc.useModule('ti.sysbios.knl.Task');
58 var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox');
59 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
60 var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
61 var SysMin = xdc.useModule('xdc.runtime.SysMin');
62 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
63 var Ecm = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
64 var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
65 var core = xdc.useModule('ti.sysbios.hal.Core');
66 /* NDK modules */
67 var Global = xdc.useModule('ti.ndk.config.Global');
68 var Ip = xdc.useModule('ti.ndk.config.Ip');
69 var Tcp = xdc.useModule('ti.ndk.config.Tcp');
70 var Udp = xdc.useModule('ti.ndk.config.Udp');
71 var Telnet = xdc.useModule('ti.ndk.config.Telnet');
72 /*
73 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
74 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
75 */
77 Ecm.eventGroupHwiNum[0] = 6;
78 Ecm.eventGroupHwiNum[1] = 7;
79 Ecm.eventGroupHwiNum[2] = 8;
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; */
87 /* System stack size (used by ISRs and Swis) */
88 Program.stack = 0x10000;
90 /*
91 * Uncomment this line to globally disable Asserts.
92 * All modules inherit the default from the 'Defaults' module. You
93 * can override these defaults on a per-module basis using Module.common$.
94 * Disabling Asserts will save code space and improve runtime performance.
95 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
96 */
98 /*
99 * Uncomment this line to keep module names from being loaded on the target.
100 * The module name strings are placed in the .const section. Setting this
101 * parameter to false will save space in the .const section. Error and
102 * Assert messages will contain an "unknown module" prefix instead
103 * of the actual module name.
104 Defaults.common$.namedModule = false;
105 */
107 /*
108 * Minimize exit handler array in System. The System module includes
109 * an array of functions that are registered with System_atexit() to be
110 * called by System_exit().
111 */
112 System.maxAtexitHandlers = 4;
114 /*
115 * Uncomment this line to disable the Error print function.
116 * We lose error information when this is disabled since the errors are
117 * not printed. Disabling the raiseHook will save some code space if
118 * your app is not using System_printf() since the Error_print() function
119 * calls System_printf().
120 Error.raiseHook = null;
121 */
123 /*
124 * Uncomment this line to keep Error, Assert, and Log strings from being
125 * loaded on the target. These strings are placed in the .const section.
126 * Setting this parameter to false will save space in the .const section.
127 * Error, Assert and Log message will print raw ids and args instead of
128 * a formatted message.
129 Text.isLoaded = false;
130 */
132 /*
133 * Uncomment this line to disable the output of characters by SysMin
134 * when the program exits. SysMin writes characters to a circular buffer.
135 * This buffer can be viewed using the SysMin Output view in ROV.
136 SysMin.flushAtExit = false;
137 */
139 /*
140 * Create and install logger for the whole system
141 */
142 var loggerBufParams = new LoggerBuf.Params();
143 loggerBufParams.numEntries = 16;
144 var logger0 = LoggerBuf.create(loggerBufParams);
145 Defaults.common$.logger = logger0;
146 Main.common$.diags_INFO = Diags.ALWAYS_ON;
148 System.SupportProxy = SysMin;
149 /* Circular buffer size for System_printf() */
150 SysMin.bufSize = 0x200;
152 /* ================ BIOS configuration ================ */
154 var BIOS = xdc.useModule('ti.sysbios.BIOS');
155 /*
156 * Build a custom SYS/BIOS library from sources.
157 */
158 BIOS.libType = BIOS.LibType_Custom;
159 BIOS.logsEnabled = true;
161 /*
162 * The BIOS module will create the default heap for the system.
163 * Specify the size of this default heap.
164 */
165 BIOS.heapSize = 0xA0000;
167 if (enableStaticIP)
168 {
169 /* Settings for static IP configuration */
170 Ip.ResolveIP = false;
171 Ip.CallByIP = false;
172 Ip.autoIp = false;
173 if (mode == "master")
174 {
175 Ip.address = "192.168.3.100";
176 }
177 else
178 {
179 Ip.address = "192.168.3.4";
180 }
181 Ip.mask = "255.255.255.0";
182 Ip.gatewayIpAddr = "192.168.3.1";
183 }
184 else
185 {
186 Ip.dhcpClientMode = Ip.CIS_FLG_IFIDXVALID;
187 }
189 Global.ndkTickPeriod = 100;
190 Global.kernTaskPriLevel = 11;
191 Global.serviceReportHook = null;
192 Global.IPv6 = false;
194 Task.defaultStackSize = 4096;
195 Task.idleTaskStackSize = 4096;
197 /* ================ Driver configuration ================ */
198 var socType = "am574x";
199 /*use CSL package*/
200 var Csl = xdc.loadPackage('ti.csl');
201 Csl.Settings.deviceType = socType;
203 /* Load the OSAL package */
204 var osType = "tirtos";
205 var Osal = xdc.useModule('ti.osal.Settings');
206 Osal.osType = osType;
208 /* Load Profiling package */
209 var Utils = xdc.loadPackage('ti.utils.profiling');
210 var Uart = xdc.loadPackage('ti.drv.uart');
211 var I2c = xdc.loadPackage('ti.drv.i2c');
213 var Board = xdc.loadPackage('ti.board');
214 Board.Settings.boardName = "idkAM574x";
216 /* Load the PRUSS package */
217 var Pruss = xdc.loadPackage('ti.drv.pruss');
218 Pruss.Settings.socType = socType;
221 var Gpio = xdc.loadPackage('ti.drv.gpio');
223 var Icss_Emac = xdc.loadPackage('ti.drv.icss_emac');
224 Icss_Emac.Settings.socType = socType;
226 var Nimu_Icss = xdc.loadPackage('ti.transport.ndk.nimu_icss');
228 /* ================ Memory sections configuration ================ */
229 Program.sectMap[".text"] = "APP_CODE_MEM";
230 Program.sectMap[".const"] = "APP_CACHED_DATA_MEM";
231 Program.sectMap[".plt"] = "APP_CACHED_DATA_MEM";
232 Program.sectMap[".fardata"] = "APP_CACHED_DATA_BLK1_MEM";
233 Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
234 Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
235 Global.netSchedulerPri = Global.NC_PRIORITY_HIGH;