[processor-sdk/pdk.git] / packages / ti / drv / pcie / example / sample / am571x / armv7 / bios / pcie_sample_wSoCFile.cfg
1 /**
2 * \file pcie_sample_wSoCFile.cfg
3 *
4 * \brief Sysbios config file for pcie example project on AM571X IDK EVM.
5 *
6 */
8 /*
9 * Copyright (C) 2015 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 Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
42 var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
43 var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
44 var Defaults = xdc.useModule('xdc.runtime.Defaults');
45 var Diags = xdc.useModule('xdc.runtime.Diags');
46 var Error = xdc.useModule('xdc.runtime.Error');
47 var Log = xdc.useModule('xdc.runtime.Log');
48 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
49 var Main = xdc.useModule('xdc.runtime.Main');
50 var Memory = xdc.useModule('xdc.runtime.Memory')
51 var SysMin = xdc.useModule('xdc.runtime.SysMin');
52 var System = xdc.useModule('xdc.runtime.System');
53 var Text = xdc.useModule('xdc.runtime.Text');
54 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
55 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
56 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
57 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
58 var InitXbar = xdc.useModule("ti.sysbios.family.shared.vayu.IntXbar");
59 var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
60 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
61 var Task = xdc.useModule('ti.sysbios.knl.Task');
62 var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
63 /*
64 * Program.argSize sets the size of the .args section.
65 * The examples don't use command line args so argSize is set to 0.
66 */
67 Program.argSize = 0x0;
69 /* System stack size (used by ISRs and Swis) */
70 Program.stack = 0x20000;
72 /*
73 * Uncomment this line to globally disable Asserts.
74 * All modules inherit the default from the 'Defaults' module. You
75 * can override these defaults on a per-module basis using Module.common$.
76 * Disabling Asserts will save code space and improve runtime performance.
77 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
78 */
80 /*
81 * Uncomment this line to keep module names from being loaded on the target.
82 * The module name strings are placed in the .const section. Setting this
83 * parameter to false will save space in the .const section. Error and
84 * Assert messages will contain an "unknown module" prefix instead
85 * of the actual module name.
86 Defaults.common$.namedModule = false;
87 */
89 /*
90 * Minimize exit handler array in System. The System module includes
91 * an array of functions that are registered with System_atexit() to be
92 * called by System_exit().
93 */
94 System.maxAtexitHandlers = 4;
96 /*
97 * Uncomment this line to disable the Error print function.
98 * We lose error information when this is disabled since the errors are
99 * not printed. Disabling the raiseHook will save some code space if
100 * your app is not using System_printf() since the Error_print() function
101 * calls System_printf().
102 Error.raiseHook = null;
103 */
105 /*
106 * Uncomment this line to keep Error, Assert, and Log strings from being
107 * loaded on the target. These strings are placed in the .const section.
108 * Setting this parameter to false will save space in the .const section.
109 * Error, Assert and Log message will print raw ids and args instead of
110 * a formatted message.
111 Text.isLoaded = false;
112 */
114 /*
115 * Uncomment this line to disable the output of characters by SysMin
116 * when the program exits. SysMin writes characters to a circular buffer.
117 * This buffer can be viewed using the SysMin Output view in ROV.
118 SysMin.flushAtExit = false;
119 */
122 /* Circular buffer size for System_printf() */
123 SysMin.bufSize = 0x400;
124 System.SupportProxy = SysMin;
127 /*
128 * Create and install logger for the whole system
129 */
130 var loggerBufParams = new LoggerBuf.Params();
131 loggerBufParams.numEntries = 32;
132 var logger0 = LoggerBuf.create(loggerBufParams);
133 Defaults.common$.logger = logger0;
134 Main.common$.diags_INFO = Diags.ALWAYS_ON;
136 /* ================ BIOS configuration ================ */
138 var BIOS = xdc.useModule('ti.sysbios.BIOS');
139 /*
140 * Build a custom SYS/BIOS library from sources.
141 */
142 BIOS.libType = BIOS.LibType_Custom;
144 /*
145 * The BIOS module will create the default heap for the system.
146 * Specify the size of this default heap.
147 */
148 BIOS.heapSize = 0x10000;
150 /* ================ Task configuration ================ */
152 /* Define and add one Task Hook Set */
153 Task.addHookSet({
154 registerFxn: '&TaskRegisterId',
155 switchFxn: '&mySwitch',
156 });
158 /* ================ Driver configuration ================ */
159 /* Load the osal package -- required by board & interrupt example */
160 var osType = "tirtos"
161 var Osal = xdc.loadPackage('ti.osal');
162 Osal.Settings.osType = osType;
164 var socType = "am571x";
165 /*use CSL package*/
166 var Csl = xdc.loadPackage('ti.csl');
167 Csl.Settings.deviceType = socType;
170 /* Load Profiling package */
171 var Utils = xdc.loadPackage('ti.utils.profiling');
173 /* Load and use the PCIE packages */
175 var Pcie = xdc.loadPackage('ti.drv.pcie');
176 Pcie.Settings.enableProfiling = true;
177 /* Enable only if soc-specific library should be used */
178 /* Pcie.Settings.socType = socType; */ /* use soc/am571x/src/pcie_soc.c */
180 /* Load the I2C package - required by board */
181 var I2c = xdc.loadPackage('ti.drv.i2c');
182 I2c.Settings.socType = socType;
184 /* Load the uart package -- required by board */
185 var Uart = xdc.loadPackage('ti.drv.uart');
186 Uart.Settings.socType = socType;
188 /* Load the Board package and set the board name */
189 var Board = xdc.loadPackage('ti.board');
190 Board.Settings.boardName = "idkAM571x";
192 /* ================ Cache and MMU configuration ================ */
194 var Cache = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
195 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
197 // Enable the cache
198 Cache.enableCache = true;
200 // Enable the MMU (Required for L1/L2 data caching)
201 Mmu.enableMMU = true;
203 // descriptor attribute structure
204 var attrs0 = new Mmu.DescriptorAttrs();
205 Mmu.initDescAttrsMeta(attrs0);
206 attrs0.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor
207 attrs0.shareable = 2; // sharerable
208 attrs0.attrIndx = 1; // Non-cache, device memory
210 // Set the descriptor for each entry in the address range
211 for (var i=0x20000000; i < 0x60000000; i = i + 0x00200000) {
212 // Each 'BLOCK' descriptor entry spans a 2MB address range
213 Mmu.setSecondLevelDescMeta(i, i, attrs0);
214 }
216 // descriptor attribute structure
217 var attrs1 = new Mmu.DescriptorAttrs();
219 Mmu.initDescAttrsMeta(attrs1);
220 attrs1.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor
221 attrs1.shareable = 2; // sharerable
222 attrs1.attrIndx = 2; // Cached, normal memory
224 // Set the descriptor for each entry in the address range
225 for (var i=0x80000000; i < 0xA0000000; i = i + 0x00200000) {
226 // Each 'BLOCK' descriptor entry spans a 2MB address range
227 Mmu.setSecondLevelDescMeta(i, i, attrs1);
228 }
230 /* ================ Memory sections configuration ================ */
231 Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
232 Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";