]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/mmcsd/example/fatfs_console/am437x/armv7/bios/mmcsd_skam437x.cfg
sd-mmc: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / mmcsd / example / fatfs_console / am437x / armv7 / bios / mmcsd_skam437x.cfg
1 /**
2  *  \file   mmcsd_skam437x.cfg
3  *
4  *  \brief  Sysbios config file for MMCSD example project on AM437x SK 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  */
41 /* ================ General configuration ================ */
42 var Defaults = xdc.useModule('xdc.runtime.Defaults');
43 var Diags = xdc.useModule('xdc.runtime.Diags');
44 var Error = xdc.useModule('xdc.runtime.Error');
45 var Main = xdc.useModule('xdc.runtime.Main');
46 var Memory = xdc.useModule('xdc.runtime.Memory')
47 var SysMin = xdc.useModule('xdc.runtime.SysMin');
48 var System = xdc.useModule('xdc.runtime.System');
49 var Text = xdc.useModule('xdc.runtime.Text');
50 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
51 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
52 var Task = xdc.useModule('ti.sysbios.knl.Task');
53 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
54 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
55 var Timer = xdc.useModule('ti.sysbios.hal.Timer');
56 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
57 var SemihostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
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;
65 /* System stack size (used by ISRs and Swis) */
66 Program.stack = 0x4000;
68 /*
69  * Uncomment this line to globally disable Asserts.
70  * All modules inherit the default from the 'Defaults' module.  You
71  * can override these defaults on a per-module basis using Module.common$. 
72  * Disabling Asserts will save code space and improve runtime performance.
73 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
74  */
75 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
78 /*
79  * Uncomment this line to keep module names from being loaded on the target.
80  * The module name strings are placed in the .const section. Setting this
81  * parameter to false will save space in the .const section.  Error and
82  * Assert messages will contain an "unknown module" prefix instead
83  * of the actual module name.
84 Defaults.common$.namedModule = false;
85  */
86 Defaults.common$.namedModule = false;
88 /*
89  * Minimize exit handler array in System.  The System module includes
90  * an array of functions that are registered with System_atexit() to be
91  * called by System_exit().
92  */
93 System.maxAtexitHandlers = 4;
95 /* 
96  * Uncomment this line to disable the Error print function.  
97  * We lose error information when this is disabled since the errors are
98  * not printed.  Disabling the raiseHook will save some code space if
99  * your app is not using System_printf() since the Error_print() function
100  * calls System_printf().
101 Error.raiseHook = null;
102  */
103 Error.raiseHook = null;
104 /* 
105  * Uncomment this line to keep Error, Assert, and Log strings from being
106  * loaded on the target.  These strings are placed in the .const section.
107  * Setting this parameter to false will save space in the .const section.
108  * Error, Assert and Log message will print raw ids and args instead of
109  * a formatted message.
110 Text.isLoaded = false;
111  */
112 Text.isLoaded = false;
113 /*
114  * Uncomment this line to disable the output of characters by SysMin
115  * when the program exits.  SysMin writes characters to a circular buffer.
116  * This buffer can be viewed using the SysMin Output view in ROV.
117  */
118 SysMin.flushAtExit = false;
121 /* ================ BIOS configuration ================ */
123 var BIOS = xdc.useModule('ti.sysbios.BIOS');
124 BIOS.libType = BIOS.LibType_Custom;
125 BIOS.customCCOpts = BIOS.customCCOpts.replace(" -g ","");
126 BIOS.assertsEnabled = false;
127 BIOS.logsEnabled = false;
128 BIOS.swiEnabled = false;
130 /*
131  * The BIOS module will create the default heap for the system.
132  * Specify the size of this default heap.
133  */
134 BIOS.heapSize = 32000;
136 Swi.common$.namedInstance = true;
137 Program.sectionsExclude = ".*";
139 Clock.tickPeriod = 1000;
140 Hwi.dispatcherSwiSupport = false;
141 Hwi.dispatcherTaskSupport = true;
142 Hwi.dispatcherAutoNestingSupport = true;
143 Hwi.initStackFlag = false;
144 Hwi.checkStackFlag = false;
146 Task.enableIdleTask = false;
147 Task.initStackFlag = false;
148 Task.checkStackFlag = false;
149 BIOS.cpuFreq.lo = 600000000;
152 /* ================ Driver configuration ================ */
153 var socType           = "am437x";
154 /*use CSL package*/
155 var Csl = xdc.loadPackage('ti.csl');
156 Csl.Settings.deviceType = socType;
159 /* Load the Osal package */
160 var osType           = "tirtos";
161 var Osal             = xdc.loadPackage('ti.osal');
162 Osal.Settings.osType = osType;
163 Osal.Settings.socType = socType;
164 /* Load the I2C package */
166 var I2C = xdc.loadPackage('ti.drv.i2c');
167 I2C.Settings.socType  = socType;
169 /* Load the mmcsd package */
170 var socType           = "am437x";
171 var Mmcsd             = xdc.loadPackage('ti.drv.mmcsd');
172 Mmcsd.Settings.socType = socType;
175 /* Load the i2c package */
176 var I2C               = xdc.loadPackage('ti.drv.i2c');
177 I2C.Settings.socType  = socType;
179 /* Load the board package */
180 var Board = xdc.loadPackage('ti.board');
181 Board.Settings.boardName = "skAM437x";
184 /* Load the fatfs package */
185 var Fatfs = xdc.loadPackage('ti.fs.fatfs');
187 /* Load the GPIO package */
188 var GPIO = xdc.loadPackage('ti.drv.gpio');
190 var UARTPackage = xdc.loadPackage('ti.drv.uart');
193 /* ================ Cache and MMU configuration ================ */
195 var Cache = xdc.useModule('ti.sysbios.family.arm.a9.Cache');
196 Cache.enableCache = true;
197 Cache.configureL2Sram = false;//DDR build
199 var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
200 Mmu.enableMMU = true;
202 /* Force peripheral section to be NON cacheable strongly-ordered memory */
203 var peripheralAttrs = {
204     type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
205     tex: 0,
206     bufferable : false,                // bufferable
207     cacheable  : false,                // cacheable
208     shareable  : false,                // shareable
209     noexecute  : true,                 // not executable
210 };
212 /* Define the base address of the 1 Meg page the peripheral resides in. */
213 var peripheralBaseAddr = 0x44DF2800;
215 /* Configure the corresponding MMU page descriptor accordingly */
216 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
217                           peripheralBaseAddr,
218                           peripheralAttrs);
219                           
220 var peripheralBaseAddr = 0x44e0b000;
222 /* Configure the corresponding MMU page descriptor accordingly */
223 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
224                           peripheralBaseAddr,
225                           peripheralAttrs);