]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/mmcsd/example/fatfs_console/k2g/armv7/bios/mmcsd_evm.cfg
sd-mmc: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / mmcsd / example / fatfs_console / k2g / armv7 / bios / mmcsd_evm.cfg
1 var Defaults = xdc.useModule('xdc.runtime.Defaults');
2 var Diags = xdc.useModule('xdc.runtime.Diags');
3 var Error = xdc.useModule('xdc.runtime.Error');
4 var Log = xdc.useModule('xdc.runtime.Log');
5 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
6 var Main = xdc.useModule('xdc.runtime.Main');
7 var Memory = xdc.useModule('xdc.runtime.Memory')
8 var SysMin = xdc.useModule('xdc.runtime.SysMin');
9 var System = xdc.useModule('xdc.runtime.System');
10 var Text = xdc.useModule('xdc.runtime.Text');
12 var BIOS = xdc.useModule('ti.sysbios.BIOS');
13 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
14 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
15 var Task = xdc.useModule('ti.sysbios.knl.Task');
16 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
17 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
18 var ti_sysbios_family_arm_gic_Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
19 var Cache = xdc.useModule('ti.sysbios.hal.Cache');
20 var CpIntc                      =   xdc.useModule('ti.sysbios.family.arm.a15.tci66xx.CpIntc');
21 var devType = "k2g"
23 var socType           = "k2g";
25 /*use CSL package*/
26 var Csl = xdc.loadPackage('ti.csl');
27 Csl.Settings.deviceType = socType;
29 /* Load the OSAL package */
30 var osType = "tirtos"
31 var Osal = xdc.useModule('ti.osal.Settings');
32 Osal.osType = osType;
33 Osal.socType = devType;
35 /* Load Profiling package */
36 var Utils = xdc.loadPackage('ti.utils.profiling');
38 /* Load the MMCSD package */
39 var Mmcsd = xdc.loadPackage('ti.drv.mmcsd');
40 Mmcsd.Settings.enableProfiling = true;
41 Mmcsd.Settings.socType = "k2g";
43 var Fatfs = xdc.loadPackage('ti.fs.fatfs');
45 /* Load the GPIO package */
46 var GPIO = xdc.loadPackage('ti.drv.gpio');
48 /* Load the UART package */
49 var UART = xdc.loadPackage('ti.drv.uart');    
50 UART.Settings.socType = devType;  
52 /* Load the I2C package */
53 var I2c                         = xdc.loadPackage('ti.drv.i2c');
54 I2c.Settings.socType = devType;
56 /* Load the Board package and set the board name */
57 var Board = xdc.loadPackage('ti.board');
58 Board.Settings.boardName = "evmK2G";
60 /*var Clock.TimerProxy = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');*/
61 /*
62  * Program.argSize sets the size of the .args section.
63  * The examples don't use command line args so argSize is set to 0.
64  */
65 Program.argSize = 0x0;
67 /*
68  * Uncomment this line to globally disable Asserts.
69  * All modules inherit the default from the 'Defaults' module.  You
70  * can override these defaults on a per-module basis using Module.common$.
71  * Disabling Asserts will save code space and improve runtime performance.
72 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
73  */
75 /*
76  * Uncomment this line to keep module names from being loaded on the target.
77  * The module name strings are placed in the .const section. Setting this
78  * parameter to false will save space in the .const section.  Error and
79  * Assert messages will contain an "unknown module" prefix instead
80  * of the actual module name.
81 Defaults.common$.namedModule = false;
82  */
84 /*
85  * Minimize exit handler array in System.  The System module includes
86  * an array of functions that are registered with System_atexit() to be
87  * called by System_exit().
88  */
89 System.maxAtexitHandlers = 4;
91 /*
92  * Uncomment this line to disable the Error print function.
93  * We lose error information when this is disabled since the errors are
94  * not printed.  Disabling the raiseHook will save some code space if
95  * your app is not using System_printf() since the Error_print() function
96  * calls System_printf().
97 Error.raiseHook = null;
98  */
100 /*
101  * Uncomment this line to keep Error, Assert, and Log strings from being
102  * loaded on the target.  These strings are placed in the .const section.
103  * Setting this parameter to false will save space in the .const section.
104  * Error, Assert and Log message will print raw ids and args instead of
105  * a formatted message.
106 Text.isLoaded = false;
107  */
109 /*
110  * Uncomment this line to disable the output of characters by SysMin
111  * when the program exits.  SysMin writes characters to a circular buffer.
112  * This buffer can be viewed using the SysMin Output view in ROV.
113 SysMin.flushAtExit = false;
114  */
117 /* No runtime stack checking is performed */
118 Task.checkStackFlag = false;
121 /* Reduce the number of task priorities */
122 Task.numPriorities = 4;
126 //var exception                                 =       xdc.useModule('ti.sysbios.family.arm.gic');
127 //exception.enablePrint = true;
131 /*
132  * The BIOS module will create the default heap for the system.
133  * Specify the size of this default heap.
134  */
135 BIOS.heapSize = 0x30000;
137 /*
138  * Build a custom SYS/BIOS library from sources.
139  */
140 BIOS.libType = BIOS.LibType_Custom;
142 /* System stack size (used by ISRs and Swis) */
143 Program.stack = 0x20000;
145 /* Circular buffer size for System_printf() */
146 SysMin.bufSize = 0x200;
148 /*
149  * Create and install logger for the whole system
150  */
151 var loggerBufParams = new LoggerBuf.Params();
152 loggerBufParams.numEntries = 16;
153 var logger0 = LoggerBuf.create(loggerBufParams);
154 Defaults.common$.logger = logger0;
155 Main.common$.diags_INFO = Diags.ALWAYS_ON;
157 System.SupportProxy = SysMin;
160 //var Cache = xdc.useModule('ti.sysbios.hal.Cache');
161 //Cache.CacheProxy = xdc.useModule('ti.sysbios.hal.CacheNull');
163 var Cache1  = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
164 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
166 /* Enable the cache                                                           */
167 Cache1.enableCache = true;
169 /* Enable the MMU (Required for L1 data caching)                              */
170 Mmu.enableMMU = true;
172 // Configure the corresponding MMU page descriptor accordingly
173 var attrs = new Mmu.DescriptorAttrs();
174 Mmu.initDescAttrsMeta(attrs);
175 attrs.type = Mmu.DescriptorType_BLOCK;// BLOCK descriptor
176 attrs.noExecute = true;// not executable
177 attrs.accPerm = 0;// read/write at PL1
178 attrs.attrIndx = 1;// MAIR0 Byte1 describes
179                    // memory attributes for
180                    // each BLOCK MMU entry
183 // Define the base address of the 2 MB page
184 // the peripheral resides in.
185 var peripheralBaseAddrs = [ 
186   { base: 0x4ae00000, size: 0x00100000 },  // PRM
187   { base: 0x023000000, size: 0x00000400 },  // MMCHS 0 regs
188   { base: 0x023100000, size: 0x00000400 }   // MMCHS 1 regs
189 ];
191 // Configure the corresponding MMU page descriptor accordingly
192 for (var i =0; i < peripheralBaseAddrs.length; i++)
194       var addr = peripheralBaseAddrs[i].base;
195       Mmu.setSecondLevelDescMeta(addr, addr, attrs);
196   }
199 /* Set IO Delay configuration areas as non-cache */
200 /* Mmu.setSecondLevelDescMeta(0x4844a000, 0x4844a000, attrs);
201    Mmu.setSecondLevelDescMeta(0x4ae07d00, 0x4ae07d00, attrs);
202 */
204 if (Program.build.target.$name.match(/gnu/)) {
205     if (Program.build.target.$name.match(/A8F/) ||
206         Program.build.target.$name.match(/A9F/) ||
207         Program.build.target.$name.match(/A15F/)) {
208         var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
209     }