[processor-sdk/pdk.git] / packages / ti / osal / test / am437x / armv7 / bios / am437x_app_evmam437x.cfg
1 /**
2 * \file am437x_app_evmam437x.cfg
3 *
4 * \brief Sysbios config file for OSAL test project on AM437x GP EVM.
5 *
6 */
8 /*
9 * Copyright (C) 2016 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 Main = xdc.useModule('xdc.runtime.Main');
45 var Memory = xdc.useModule('xdc.runtime.Memory')
46 var SysMin = xdc.useModule('xdc.runtime.SysMin');
47 var System = xdc.useModule('xdc.runtime.System');
48 var Text = xdc.useModule('xdc.runtime.Text');
49 var Clock = xdc.useModule('ti.sysbios.knl.Clock');
50 var Swi = xdc.useModule('ti.sysbios.knl.Swi');
51 var Task = xdc.useModule('ti.sysbios.knl.Task');
52 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
53 var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
54 var Timer = xdc.useModule('ti.sysbios.hal.Timer');
55 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
56 var SemihostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
58 /*
59 * Program.argSize sets the size of the .args section.
60 * The examples don't use command line args so argSize is set to 0.
61 */
62 Program.argSize = 0x0;
64 /* System stack size (used by ISRs and Swis) */
65 Program.stack = 0x20000;
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 */
74 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
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 */
85 Defaults.common$.namedModule = false;
87 /*
88 * Minimize exit handler array in System. The System module includes
89 * an array of functions that are registered with System_atexit() to be
90 * called by System_exit().
91 */
92 System.maxAtexitHandlers = 4;
94 /*
95 * Uncomment this line to disable the Error print function.
96 * We lose error information when this is disabled since the errors are
97 * not printed. Disabling the raiseHook will save some code space if
98 * your app is not using System_printf() since the Error_print() function
99 * calls System_printf().
100 Error.raiseHook = null;
101 */
102 Error.raiseHook = null;
103 /*
104 * Uncomment this line to keep Error, Assert, and Log strings from being
105 * loaded on the target. These strings are placed in the .const section.
106 * Setting this parameter to false will save space in the .const section.
107 * Error, Assert and Log message will print raw ids and args instead of
108 * a formatted message.
109 Text.isLoaded = false;
110 */
112 /*
113 * Uncomment this line to disable the output of characters by SysMin
114 * when the program exits. SysMin writes characters to a circular buffer.
115 * This buffer can be viewed using the SysMin Output view in ROV.
116 SysMin.flushAtExit = false;
117 */
118 SysMin.flushAtExit = false;
121 /* ================ BIOS configuration ================ */
123 var BIOS = xdc.useModule('ti.sysbios.BIOS');
125 /*
126 * Build a custom SYS/BIOS library from sources.
127 */
128 BIOS.libType = BIOS.LibType_Custom;
129 BIOS.customCCOpts = BIOS.customCCOpts.replace(" -g ","");
130 BIOS.assertsEnabled = false;
131 BIOS.logsEnabled = false;
133 /*
134 * The BIOS module will create the default heap for the system.
135 * Specify the size of this default heap.
136 */
137 BIOS.heapSize = 0x8000;
139 Swi.common$.namedInstance = true;
140 Program.sectionsExclude = ".*";
142 Clock.tickPeriod = 1000;
143 Hwi.dispatcherTaskSupport = true;
144 Hwi.dispatcherAutoNestingSupport = true;
145 Hwi.initStackFlag = false;
146 Hwi.checkStackFlag = false;
147 /* ================ Task configuration ================ */
149 /* No runtime stack checking is performed */
150 Task.checkStackFlag = false;
152 /* Reduce the number of task priorities */
153 Task.numPriorities = 4;
156 var task0Params = new Task.Params();
157 task0Params.instance.name = "echo";
158 task0Params.stackSize = 0x1000;
159 Program.global.echo = Task.create("&osal_test", task0Params);
161 /* Define and add one Task Hook Set */
162 Task.addHookSet({
163 registerFxn: '&TaskRegisterId',
164 switchFxn: '&mySwitch',
165 });
167 /* ================ Driver configuration ================ */
169 var devType = "am437x"
171 /* Load the OSAL package */
172 var osType = "tirtos";
173 var Osal = xdc.useModule('ti.osal.Settings');
174 Osal.osType = osType;
175 Osal.socType = devType;
176 Osal.libProfile = "release";
178 /*use CSL package*/
179 var Csl = xdc.loadPackage('ti.csl');
180 Csl.Settings.deviceType = devType;
182 /* Load Profiling package */
183 var Utils = xdc.loadPackage('ti.utils.profiling');
185 /* Load the uart package */
186 var Uart = xdc.useModule('ti.drv.uart.Settings');
187 Uart.socType = devType;
189 /* Load the uart package */
190 var I2C = xdc.useModule('ti.drv.i2c.Settings');
191 I2C.socType = devType;
193 /* Load the Board package and set the board name */
194 var Board = xdc.loadPackage('ti.board');
195 Board.Settings.boardName = "evmAM437x";
197 /* ================ Cache and MMU configuration ================ */
199 var Cache = xdc.useModule('ti.sysbios.family.arm.a9.Cache');
200 Cache.enableCache = true;
201 Cache.configureL2Sram = false;//DDR build
203 var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
204 Mmu.enableMMU = true;
206 /* Force peripheral section to be NON cacheable strongly-ordered memory */
207 var peripheralAttrs = {
208 type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
209 tex: 0,
210 bufferable : false, // bufferable
211 cacheable : false, // cacheable
212 shareable : false, // shareable
213 noexecute : true, // not executable
214 };
216 /* Define the base address of the 1 Meg page the peripheral resides in. */
217 var peripheralBaseAddr = 0x44DF2800;
219 /* Configure the corresponding MMU page descriptor accordingly */
220 Mmu.setFirstLevelDescMeta(peripheralBaseAddr,
221 peripheralBaseAddr,
222 peripheralAttrs);