]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/mmcsd/test/am572x/armv7/bios/mmcsd_evm.cfg
sd-mmc: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / mmcsd / test / am572x / armv7 / bios / mmcsd_evm.cfg
1 /**
2  *  \file   mmcsd_evm.cfg
3  *
4  *  \brief  Sysbios config file for mmcsd test project on AM572X GP EVM.
5  *
6  */
8 /*
9  * Copyright (C) 2015-2019 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 Defaults = xdc.useModule('xdc.runtime.Defaults');
42 var Diags = xdc.useModule('xdc.runtime.Diags');
43 var Error = xdc.useModule('xdc.runtime.Error');
44 var Log = xdc.useModule('xdc.runtime.Log');
45 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
46 var Main = xdc.useModule('xdc.runtime.Main');
47 var Memory = xdc.useModule('xdc.runtime.Memory')
48 var SysMin = xdc.useModule('xdc.runtime.SysMin');
49 var System = xdc.useModule('xdc.runtime.System');
50 var Text = xdc.useModule('xdc.runtime.Text');
51 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
52 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
53 var Task = xdc.useModule('ti.sysbios.knl.Task');
54 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
55 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
56 var ti_sysbios_family_arm_gic_Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
57 var IntXbar    = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
59 /*
60  * Program.argSize sets the size of the .args section.
61  * The examples don't use command line args so argSize is set to 0.
62  */
63 Program.argSize = 0x0;
66 /* System stack size (used by ISRs and Swis) */
67 Program.stack = 0x20000;
69 /*
70  * Uncomment this line to globally disable Asserts.
71  * All modules inherit the default from the 'Defaults' module.  You
72  * can override these defaults on a per-module basis using Module.common$.
73  * Disabling Asserts will save code space and improve runtime performance.
74 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
75  */
77 /*
78  * Uncomment this line to keep module names from being loaded on the target.
79  * The module name strings are placed in the .const section. Setting this
80  * parameter to false will save space in the .const section.  Error and
81  * Assert messages will contain an "unknown module" prefix instead
82  * of the actual module name.
83 Defaults.common$.namedModule = false;
84  */
86 /*
87  * Minimize exit handler array in System.  The System module includes
88  * an array of functions that are registered with System_atexit() to be
89  * called by System_exit().
90  */
91 System.maxAtexitHandlers = 4;
92 System.extendedFormats += "%f";
93 /*
94  * Uncomment this line to disable the Error print function.
95  * We lose error information when this is disabled since the errors are
96  * not printed.  Disabling the raiseHook will save some code space if
97  * your app is not using System_printf() since the Error_print() function
98  * calls System_printf().
99 Error.raiseHook = null;
100  */
102 /*
103  * Uncomment this line to keep Error, Assert, and Log strings from being
104  * loaded on the target.  These strings are placed in the .const section.
105  * Setting this parameter to false will save space in the .const section.
106  * Error, Assert and Log message will print raw ids and args instead of
107  * a formatted message.
108 Text.isLoaded = false;
109  */
111 /*
112  * Uncomment this line to disable the output of characters by SysMin
113  * when the program exits.  SysMin writes characters to a circular buffer.
114  * This buffer can be viewed using the SysMin Output view in ROV.
115 SysMin.flushAtExit = false;
116  */
118 /* Circular buffer size for System_printf() */
119 SysMin.bufSize = 0x200;
120 System.SupportProxy = SysMin;
122 /*
123  * Create and install logger for the whole system
124  */
125 var loggerBufParams = new LoggerBuf.Params();
126 loggerBufParams.numEntries = 16;
127 var logger0 = LoggerBuf.create(loggerBufParams);
128 Defaults.common$.logger = logger0;
129 Main.common$.diags_INFO = Diags.ALWAYS_ON;
131 if (Program.build.target.$name.match(/gnu/)) {
132     if (Program.build.target.$name.match(/A8F/) ||
133         Program.build.target.$name.match(/A9F/) ||
134         Program.build.target.$name.match(/A15F/)) {
135         var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
136     }
139 /* ================ BIOS configuration ================ */
141 var BIOS = xdc.useModule('ti.sysbios.BIOS');
143 var smpCfg;
144 /* Enable SMP mode */
145 if (Program.build.cfgArgs !=  null)
147     smpCfg = Program.build.cfgArgs.SMP;
148     if(smpCfg == 'enable')
149     {
150         xdc.print("Enabling BIOS SMP mode");
151         BIOS.smpEnabled = true;
152         var Cache = xdc.module("ti.sysbios.hal.Cache");
153     }
156 /*
157  * Build a custom SYS/BIOS library from sources.
158  */
159 BIOS.libType = BIOS.LibType_Custom;
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 = 0x1000;
167 /* No runtime stack checking is performed */
168 Task.checkStackFlag = false;
171 /* Reduce the number of task priorities */
172 Task.numPriorities = 4;
175 /* ================ Task configuration ================ */
177 /* Define and add one Task Hook Set */
178 Task.addHookSet({
179         registerFxn: '&TaskRegisterId',
180         switchFxn: '&mySwitch',
181 });
184 /* ================ Driver configuration ================ */
185 var socType           = "am572x";
186 /*use CSL package*/
187 var Csl = xdc.loadPackage('ti.csl');
188 Csl.Settings.deviceType = socType;
190 /* Load the OSAL package */
191 var osType = "tirtos"
192 var Osal = xdc.useModule('ti.osal.Settings');
193 Osal.osType = osType;
194 Osal.socType = socType;
196 /* Load Profiling package */
197 var Utils = xdc.loadPackage('ti.utils.profiling');
199 /* Load the MMCSD package */
200 var Mmcsd = xdc.loadPackage('ti.drv.mmcsd');
201 Mmcsd.Settings.enableProfiling = true;
202 var Fatfs = xdc.loadPackage('ti.fs.fatfs');
204 /* Load the GPIO package */
205 var GPIO = xdc.loadPackage('ti.drv.gpio');
207 /* Load the UART package */
208 var UART = xdc.loadPackage('ti.drv.uart');    
210 /* Load the I2C package */
211 var I2C = xdc.loadPackage('ti.drv.i2c');    
212 I2C.Settings.socType = socType;
214 /* Load the PM package */
215 var pm = xdc.loadPackage('ti.drv.pm');    
216 pm.Settings.socType="am572x";
218 /* Load the Board package and set the board name */
219 var Board = xdc.loadPackage('ti.board');
220 Board.Settings.boardName = "evmAM572x";
222 /* ================ Cache and MMU configuration ================ */
224 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
226 /* Enable the cache */
227 if(smpCfg == null || smpCfg == '')
229     var Cache  = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
230     Cache.enableCache = true;
233 /* Enable the MMU (Required for L1 data caching)                              */
234 Mmu.enableMMU = true;
236 /* Map MMC1 regs in MMU */
237 var peripheralAttrs = new Mmu.DescriptorAttrs();
238 Mmu.initDescAttrsMeta(peripheralAttrs);
239 peripheralAttrs.type = Mmu.DescriptorType_BLOCK;  // BLOCK descriptor
240 peripheralAttrs.noExecute = true;                 // not executable
241 peripheralAttrs.accPerm = 0;                      // read/write at PL1
242 peripheralAttrs.attrIndx = 1;                     // MAIR0 Byte1 describes
243                                                   // memory attributes for
244                                                   // each BLOCK MMU entry
245 var peripheralBaseAddr = 0x4ae00000;
246 // Configure the corresponding MMU page descriptor accordingly
247 Mmu.setSecondLevelDescMeta(peripheralBaseAddr,
248                            peripheralBaseAddr,
249                            peripheralAttrs);
251 var attrs = new Mmu.DescriptorAttrs();
252 Mmu.initDescAttrsMeta(attrs);
253 attrs.type = Mmu.DescriptorType_BLOCK;
254 attrs.noExecute = true;
255 attrs.accPerm = 0;
256 attrs.attrIndx = 1;
258 /* Set IO Delay configuration areas as non-cache */
259 Mmu.setSecondLevelDescMeta(0x4844a000, 0x4844a000, attrs);
260 Mmu.setSecondLevelDescMeta(0x4ae07d00, 0x4ae07d00, attrs);
262 /* Make PBAIS register in the controller module accessible */
263 Mmu.setSecondLevelDescMeta(0x4a002da0, 0x4a002da0, attrs);
266 /* ================ Memory sections configuration ================ */
267 Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
268 Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
269 Program.sectMap[".bss:.tx_buf"] = "EXT_RAM";
270 Program.sectMap[".bss:.rx_buf"] = "EXT_RAM";