]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/i2c/test/eeprom_read/am335x/armv7/bios/i2c_arm_icev2am335x.cfg
i2c-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / i2c / test / eeprom_read / am335x / armv7 / bios / i2c_arm_icev2am335x.cfg
1 /**
2  *  \file   i2c_arm_icev2am335x.cfg
3  *
4  *  \brief  Sysbios config file for i2c test project on AM335x ICEV2 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  
43 var Defaults = xdc.useModule('xdc.runtime.Defaults');
44 var Diags = xdc.useModule('xdc.runtime.Diags');
45 var Error = xdc.useModule('xdc.runtime.Error');
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 Timer = xdc.useModule('ti.sysbios.hal.Timer');
57 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
58 var SemihostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
60 /*
61  * Program.argSize sets the size of the .args section.
62  * The examples don't use command line args so argSize is set to 0.
63  */
64 Program.argSize = 0x0;
66 /* System stack size (used by ISRs and Swis) */
67 Program.stack = 0x4000;
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  */
76 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 = true;
141 Hwi.dispatcherTaskSupport = true;
142 Hwi.dispatcherAutoNestingSupport = true;
144 Task.enableIdleTask = false;
145 Task.initStackFlag = false;
146 Task.checkStackFlag = false;
148 /* ================ Driver configuration ================ */
150 /* Load the OSAL package */
151 var osType = "tirtos";
152 var Osal = xdc.useModule('ti.osal.Settings');
153 Osal.osType = osType;
155 /*use CSL package*/
156 var socType           = "am335x";
157 var Csl = xdc.loadPackage('ti.csl');
158 Csl.Settings.deviceType = socType;
160 /* Load the board package */
161 var Board = xdc.loadPackage('ti.board');
162 Board.Settings.boardName = "icev2AM335x";
164 /* Load the uart package */
165 var UartPackage = xdc.loadPackage('ti.drv.uart');
167 /* Load Profiling package */
168 var Utils = xdc.loadPackage('ti.utils.profiling');
170 /* Load the i2c package */
171 var I2CPackage = xdc.loadPackage('ti.drv.i2c');
172 I2CPackage.Settings.enableProfiling = true;
175 /* ================ Cache and MMU configuration ================ */
177 var Cache = xdc.useModule('ti.sysbios.family.arm.a8.Cache');
178 Cache.enableCache = true; 
180 var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
181 Mmu.enableMMU = true;
183 /* Force peripheral section to be NON cacheable strongly-ordered memory */
184 var peripheralAttrs = {
185     type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
186     tex: 0,
187     bufferable : false,                // bufferable
188     cacheable  : false,                // cacheable
189     shareable  : false,                // shareable
190     noexecute  : true,                 // not executable
191 };
193 /* Define the base address of the 1 Meg page the peripheral resides in. */
194 var peripheralBaseAddr = 0x44e00400;;
196 /* Configure the corresponding MMU page descriptor accordingly */
197 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
198                           peripheralBaseAddr,
199                           peripheralAttrs);
202 /* Define the base address of the 1 Meg page the peripheral resides in. */
203 var peripheralBaseAddr = 0x481a6000;
205 /* Configure the corresponding MMU page descriptor accordingly */
206 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
207                           peripheralBaseAddr,
208                           peripheralAttrs);
211 /* ================ Task configuration ================ */
212 /* Define and add one Task Hook Set */
213 Task.addHookSet({
214         registerFxn: '&TaskRegisterId',
215         switchFxn: '&mySwitch',
216 });