]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - processor_audio_sdk_1_00_00_00/pasdk/test_arm/application/app.cfg
Fix syntax error in ARM sys/bios config file
[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_arm / application / app.cfg
1 /*
2 Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
3 All rights reserved.
5 * Redistribution and use in source and binary forms, with or without 
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
15 * distribution.
16 *
17 * Neither the name of Texas Instruments Incorporated nor the names of
18 * its contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 */
36 /*
37  *  ======== app.cfg ========
38  *  Platform: 66AK2G_bios_elf
39  *  Target: gnu.targets.arm.A15F
40  */
42 /* root of the configuration object model */
43 var Program = xdc.useModule('xdc.cfg.Program');
44 var cfgArgs = Program.build.cfgArgs;
45 var RB = (cfgArgs.profile == "release" ? true : false);
47 /* application uses the following modules and packages */
48 var Defaults        = xdc.useModule('xdc.runtime.Defaults');
49 var Diags           = xdc.useModule('xdc.runtime.Diags');
50 var Error           = xdc.useModule('xdc.runtime.Error');
51 var Log             = xdc.useModule('xdc.runtime.Log');
52 var Main            = xdc.useModule('xdc.runtime.Main');
53 var Memory          = xdc.useModule('xdc.runtime.Memory')
54 var SysMin          = xdc.useModule('xdc.runtime.SysMin');
55 var System          = xdc.useModule('xdc.runtime.System');
56 var Text            = xdc.useModule('xdc.runtime.Text');
58 var BIOS            = xdc.useModule('ti.sysbios.BIOS');
59 var Hwi             = xdc.useModule('ti.sysbios.hal.Hwi');
60 var Timer           = xdc.useModule('ti.sysbios.hal.Timer');
61 var Clock           = xdc.useModule('ti.sysbios.knl.Clock');
62 var Task            = xdc.useModule('ti.sysbios.knl.Task');
63 var Semaphore       = xdc.useModule('ti.sysbios.knl.Semaphore');
64 var HeapMem         = xdc.useModule('ti.sysbios.heaps.HeapMem');
65 var Load            = xdc.useModule('ti.sysbios.utils.Load');
67 var LoggingSetup    = xdc.useModule('ti.uia.sysbios.LoggingSetup');
69 xdc.useModule('ti.sdo.utils.MultiProc');
72 /*
73  *  ======== IPC Configuration ========
74  */
75 xdc.global.SR0_cacheEnable = true;
76 xdc.global.SrMsmcMem_cacheEnable = true;
77 xdc.global.SrDDr3Mem_cacheEnable = true;
78 xdc.global.procName = "HOST";
79 var ipc_cfg = xdc.loadCapsule("../../shared/ipc.cfg.xs");
81 /* select ipc libraries */
82 var Build = xdc.useModule('ti.sdo.ipc.Build');
83 Build.libType = (RB ? Build.LibType_NonInstrumented : Build.LibType_Debug);
84 Build.assertsEnabled = (RB ? false : true);
85 Build.logsEnabled = (RB ? false : true);
88 /*
89  * Uncomment this line to globally disable Asserts.
90  * All modules inherit the default from the 'Defaults' module.  You
91  * can override these defaults on a per-module basis using Module.common$. 
92  * Disabling Asserts will save code space and improve runtime performance.
93 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
94  */
96 /*
97  * Uncomment this line to keep module names from being loaded on the target.
98  * The module name strings are placed in the .const section. Setting this
99  * parameter to false will save space in the .const section.  Error and
100  * Assert messages will contain an "unknown module" prefix instead
101  * of the actual module name.
102 Defaults.common$.namedModule = false;
103  */
105 /*
106  * Minimize exit handler array in System.  The System module includes
107  * an array of functions that are registered with System_atexit() to be
108  * called by System_exit().
109  */
110 System.maxAtexitHandlers = 4;       
112 /* 
113  * Uncomment this line to disable the Error print function.  
114  * We lose error information when this is disabled since the errors are
115  * not printed.  Disabling the raiseHook will save some code space if
116  * your app is not using System_printf() since the Error_print() function
117  * calls System_printf().
118 Error.raiseHook = null;
119  */
121 /* 
122  * Uncomment this line to keep Error, Assert, and Log strings from being
123  * loaded on the target.  These strings are placed in the .const section.
124  * Setting this parameter to false will save space in the .const section.
125  * Error, Assert and Log message will print raw ids and args instead of
126  * a formatted message.
127 Text.isLoaded = false;
128  */
130 /*
131  * Uncomment this line to disable the output of characters by SysMin
132  * when the program exits.  SysMin writes characters to a circular buffer.
133  * This buffer can be viewed using the SysMin Output view in ROV.
134 SysMin.flushAtExit = false;
135  */
137 /*
138  * The BIOS module will create the default heap for the system.
139  * Specify the size of this default heap.
140  */
141 //BIOS.heapSize = 0x1000; // initial setting
142 BIOS.heapSize = 0x2000; // from pa.cfg
143 BIOS.heapSection = ".systemHeap";
144 Program.sectMap[".systemHeap"] = "HOST_DDR3";
146 /*
147  * Build a custom SYS/BIOS library from sources.
148  */
149 BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);
150 // BIOS.libType = BIOS.LibType_Custom;
151 // BIOS.libType = BIOS.LibType_Debug;
153 /* System stack size (used by ISRs and Swis) */
154 Program.stack = 0x2000;
155 Program.sectMap[".stack"] = "HOST_MSMC";
157 /* Circular buffer size for System_printf() */
158 SysMin.bufSize = 0x200;
160 System.SupportProxy = SysMin;
162 /* ------ */
163 /* Set CPU frequency to 600 MHz */
164 BIOS.cpuFreq.lo = 600000000;
165 BIOS.cpuFreq.hi = 0;
167 /* Set Sysclock period (usec.) */
168 Clock.tickPeriod = 1000; // FL: measured period ~852 usec.??
170 /* Configure Logging */
171 LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
172 LoggingSetup.sysbiosTaskLogging = false; //true;
173 LoggingSetup.sysbiosHwiLogging = false; //true;
174 //LoggingSetup.sysbiosLoggerSize = 16384;
175 LoggingSetup.loadLogging = false; //true;
176 LoggingSetup.mainLoggingRuntimeControl = false;
177 LoggingSetup.mainLoggerSize = 81960;
179 /* Configure Load Logging */ // FL: doesn't work
180 //Load.taskEnabled = true;
181 //Load.hwiEnabled = true;
182 //Load.common$.diags_USER4 = Diags.ALWAYS_ON;
184 //Task.common$.diags_USER1 = Diags.ALWAYS_ON;
185 Task.common$.diags_INFO = Diags.ALWAYS_ON;
187 /* Disallow nested hardware interrupts */
188 Hwi.dispatcherAutoNestingSupport = false;
190 var ProjName = environment["ProjName"];
191 var topo = ProjName.replace( /pa_([a-z])[0-9]+_.*/, "$1");
192 var AudioClockSim = environment["AudioClockSim"];
193 var acSimBuild = (AudioClockSim == "1" ? true : false);
195 if (acSimBuild == true)
197     // 
198     // IPC simulation
199     // 
201     /* Add timer to simulate Rx audio IPC message */
202     var timer0Params = new Timer.Params();
203     timer0Params.instance.name = "timerRxAudio";
204     timer0Params.period = 5330;
205     timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
206     Program.global.timerRxAudio = Timer.create(1, null, timer0Params);
208     /* Add timer to simulate Tx audio IPC message */
209     var timer1Params = new Timer.Params();
210     timer1Params.instance.name = "timerTxAudio";
211     timer1Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
212     timer1Params.period = 5330;
213     Program.global.timerTxAudio = Timer.create(2, null, timer1Params);
215     /* Add semaphore for Rx audio DMA */
216     var semaphore0Params = new Semaphore.Params();
217     semaphore0Params.instance.name = "semaphoreRxAudio";
218     Program.global.semaphoreRxAudio = Semaphore.create(null, semaphore0Params);
220     /* Add semaphore for Tx audio DMA */
221     var semaphore1Params = new Semaphore.Params();
222     semaphore1Params.instance.name = "semaphoreTxAudio";
223     Program.global.semaphoreTxAudio = Semaphore.create(null, semaphore1Params);
226 /* Set default stack size for tasks */
227 Task.defaultStackSize = 2048;
229 /* Set size of idle task stack */
230 Task.idleTaskStackSize = 2048;
232 /* Add Audio Stream Decode Processing (ASDP) task */
233 var task0Params = new Task.Params();
234 task0Params.instance.name = "TaskAsdp";
235 task0Params.stackSize = 0x4000;
236 task0Params.stackSection = ".far:taskStackSectionAsdp";
237 //task0Params.arg0 = 0;
238 task0Params.arg0 = $externPtr("asdp_params_PA" + topo);
239 task0Params.arg1 = $externPtr("asdp_patchs_PA" + topo);
240 task0Params.priority = -1; //3;
241 Program.global.TaskAsdp = Task.create("&taskAsdpFxn", task0Params);
242 Program.sectMap[".far:taskStackSectionAsdp"] = "HOST_MSMC";
244 /* Add System Initialization task */
245 var task1Params = new Task.Params();
246 task1Params.instance.name = "TaskSysInit";
247 task1Params.stackSize   = 0x1000;
248 task1Params.stackSection = ".far:taskStackSectionSysInit";
249 task1Params.priority = 4;
250 Program.global.TaskSysInit = Task.create("&taskSysInitFxn", task1Params);
251 Program.sectMap[".far:taskStackSectionSysInit"] = "HOST_DDR3";
253 Program.sectMap[".far:taskStackSection"] = "HOST_DDR3"; // SDRAM in pa.cfg
255 // Dec ip circular buffer will be in MSMC, size~=180 kB.
256 // Dec op circular buffer will be in MSMC, size~=192 kB.
257 // However, both buffers will be in Shared Region MSMC.
258 // So this is heap is for other use local to ARM (e.g. Dec chain). Set to 128 kB for now.
259 /* Add MSMC SRAM heap */ // formerly L3RAM
260 var heapMem1Params = new HeapMem.Params();
261 heapMem1Params.instance.name = "heapMemMsmcSram";
262 heapMem1Params.size = 224*1024; //128*1024
263 heapMem1Params.sectionName = ".msmcSramHeap";
264 Program.global.heapMemMsmcSram = HeapMem.create(heapMem1Params);
265 Program.sectMap[".msmcSramHeap"] = "HOST_MSMC";
267 /* Add DDR3 heap */ // formerly SDRAM
268 var heapMem2Params = new HeapMem.Params();
269 heapMem2Params.instance.name = "heapMemDdr3";
270 heapMem2Params.size = 3350528;
271 heapMem2Params.sectionName = ".ddr3Heap";
272 Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
273 Program.sectMap[".ddr3Heap"] = "HOST_DDR3";
275 Program.global.heapMemL2Sram = Program.global.heapMemMsmcSram;
277 //Program.sectMap[".globalSectionPafAstConfig"] = "COMMON_DDR3";
278 //Program.sectMap[".globalSectionAcpStdBetaTable"] = "COMMON_DDR3";