[processor-sdk/pdk.git] / packages / ti / drv / mmcsd / example / fatfs_console / k2g / armv7 / bios / mmcsddma_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 Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
19 var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
20 var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
22 var ti_sysbios_family_arm_gic_Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
23 var Cache = xdc.useModule('ti.sysbios.hal.Cache');
24 var CpIntc = xdc.useModule('ti.sysbios.family.arm.a15.tci66xx.CpIntc');
25 var devType = "k2g"
27 var socType = "k2g";
29 /*use CSL package*/
30 var Csl = xdc.loadPackage('ti.csl');
31 Csl.Settings.deviceType = socType;
33 /* Load the OSAL package */
34 var osType = "tirtos"
35 var Osal = xdc.useModule('ti.osal.Settings');
36 Osal.osType = osType;
37 Osal.socType = devType;
39 /* Load Profiling package */
40 var Utils = xdc.loadPackage('ti.utils.profiling');
42 /* Load the MMCSD package */
43 var Mmcsd = xdc.loadPackage('ti.drv.mmcsd');
44 Mmcsd.Settings.enableProfiling = true;
45 Mmcsd.Settings.socType = "k2g";
46 Mmcsd.Settings.useDma = "true";
48 var Fatfs = xdc.loadPackage('ti.fs.fatfs');
50 /* Load the GPIO package */
51 var GPIO = xdc.loadPackage('ti.drv.gpio');
53 /* Load the UART package */
54 var UART = xdc.loadPackage('ti.drv.uart');
55 UART.Settings.socType = devType;
57 /* Load the I2C package */
58 var I2c = xdc.loadPackage('ti.drv.i2c');
59 I2c.Settings.socType = devType;
61 /* Load the Board package and set the board name */
62 var Board = xdc.loadPackage('ti.board');
63 Board.Settings.boardName = "evmK2G";
65 /*var Clock.TimerProxy = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');*/
66 /*
67 * Program.argSize sets the size of the .args section.
68 * The examples don't use command line args so argSize is set to 0.
69 */
70 Program.argSize = 0x0;
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 /* No runtime stack checking is performed */
123 Task.checkStackFlag = false;
126 /* Reduce the number of task priorities */
127 Task.numPriorities = 4;
130 //var exception = xdc.useModule('ti.sysbios.family.arm.gic');
131 //exception.enablePrint = true;
135 /*
136 * The BIOS module will create the default heap for the system.
137 * Specify the size of this default heap.
138 */
139 BIOS.heapSize = 0x30000;
141 /*
142 * Build a custom SYS/BIOS library from sources.
143 */
144 BIOS.libType = BIOS.LibType_Custom;
146 /* System stack size (used by ISRs and Swis) */
147 Program.stack = 0x20000;
149 /* Circular buffer size for System_printf() */
150 SysMin.bufSize = 0x200;
152 /*
153 * Create and install logger for the whole system
154 */
155 var loggerBufParams = new LoggerBuf.Params();
156 loggerBufParams.numEntries = 16;
157 var logger0 = LoggerBuf.create(loggerBufParams);
158 Defaults.common$.logger = logger0;
159 Main.common$.diags_INFO = Diags.ALWAYS_ON;
161 System.SupportProxy = SysMin;
165 //var Cache = xdc.useModule('ti.sysbios.hal.Cache');
166 //Cache.CacheProxy = xdc.useModule('ti.sysbios.hal.CacheNull');
168 var Cache1 = xdc.useModule('ti.sysbios.family.arm.a15.Cache');
169 var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
171 /* Enable the cache */
172 Cache1.enableCache = true;
174 /* Enable the MMU (Required for L1 data caching) */
175 Mmu.enableMMU = true;
177 // Configure the corresponding MMU page descriptor accordingly
178 var attrs = new Mmu.DescriptorAttrs();
179 Mmu.initDescAttrsMeta(attrs);
180 attrs.type = Mmu.DescriptorType_BLOCK;// BLOCK descriptor
181 attrs.noExecute = true;// not executable
182 attrs.accPerm = 0;// read/write at PL1
183 attrs.attrIndx = 1;// MAIR0 Byte1 describes
184 // memory attributes for
185 // each BLOCK MMU entry
188 // Define the base address of the 2 MB page
189 // the peripheral resides in.
190 var peripheralBaseAddrs = [
191 { base: 0x4ae00000, size: 0x00100000 }, // PRM
192 { base: 0x023000000, size: 0x00000400 }, // MMCHS 0 regs
193 { base: 0x023100000, size: 0x00000400 } // MMCHS 1 regs
194 ];
196 // Configure the corresponding MMU page descriptor accordingly
197 for (var i =0; i < peripheralBaseAddrs.length; i++)
198 {
199 var addr = peripheralBaseAddrs[i].base;
200 Mmu.setSecondLevelDescMeta(addr, addr, attrs);
201 }
204 /* Set IO Delay configuration areas as non-cache */
205 /* Mmu.setSecondLevelDescMeta(0x4844a000, 0x4844a000, attrs);
206 Mmu.setSecondLevelDescMeta(0x4ae07d00, 0x4ae07d00, attrs);
207 */
209 if (Program.build.target.$name.match(/gnu/)) {
210 if (Program.build.target.$name.match(/A8F/) ||
211 Program.build.target.$name.match(/A9F/) ||
212 Program.build.target.$name.match(/A15F/)) {
213 var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
214 }
215 }
217 /* Define and add one Task Hook Set */
218 Task.addHookSet({
219 registerFxn: '&TaskRegisterId',
220 switchFxn: '&mySwitch',
221 });