]> 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
Update test_arm and test_dsp projects for new locations of IPC and PDK eng
[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');
68 var UIAEvt          = xdc.useModule('ti.uia.events.UIAEvt');
70 xdc.useModule('ti.sdo.utils.MultiProc');
73 /*
74  *  ======== IPC Configuration ========
75  */
76 xdc.global.SR0_cacheEnable = true;
77 xdc.global.SrMsmcMem_cacheEnable = true;
78 xdc.global.SrDDr3Mem_cacheEnable = true;
79 xdc.global.procName = "HOST";
80 var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_00/pasdk/shared/ipc.cfg.xs");
82 /* select ipc libraries */
83 var Build = xdc.useModule('ti.sdo.ipc.Build');
84 Build.libType = (RB ? Build.LibType_NonInstrumented : Build.LibType_Debug);
85 Build.assertsEnabled = (RB ? false : true);
86 Build.logsEnabled = (RB ? false : true);
89 /*
90  * Uncomment this line to globally disable Asserts.
91  * All modules inherit the default from the 'Defaults' module.  You
92  * can override these defaults on a per-module basis using Module.common$. 
93  * Disabling Asserts will save code space and improve runtime performance.
94 Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
95  */
97 /*
98  * Uncomment this line to keep module names from being loaded on the target.
99  * The module name strings are placed in the .const section. Setting this
100  * parameter to false will save space in the .const section.  Error and
101  * Assert messages will contain an "unknown module" prefix instead
102  * of the actual module name.
103 Defaults.common$.namedModule = false;
104  */
106 /*
107  * Minimize exit handler array in System.  The System module includes
108  * an array of functions that are registered with System_atexit() to be
109  * called by System_exit().
110  */
111 System.maxAtexitHandlers = 4;       
113 /* 
114  * Uncomment this line to disable the Error print function.  
115  * We lose error information when this is disabled since the errors are
116  * not printed.  Disabling the raiseHook will save some code space if
117  * your app is not using System_printf() since the Error_print() function
118  * calls System_printf().
119 Error.raiseHook = null;
120  */
122 /* 
123  * Uncomment this line to keep Error, Assert, and Log strings from being
124  * loaded on the target.  These strings are placed in the .const section.
125  * Setting this parameter to false will save space in the .const section.
126  * Error, Assert and Log message will print raw ids and args instead of
127  * a formatted message.
128 Text.isLoaded = false;
129  */
131 /*
132  * Uncomment this line to disable the output of characters by SysMin
133  * when the program exits.  SysMin writes characters to a circular buffer.
134  * This buffer can be viewed using the SysMin Output view in ROV.
135 SysMin.flushAtExit = false;
136  */
138 /*
139  * The BIOS module will create the default heap for the system.
140  * Specify the size of this default heap.
141  */
142 //BIOS.heapSize = 0x1000; // initial setting
143 BIOS.heapSize = 0x2000; // from pa.cfg
144 BIOS.heapSection = ".systemHeap";
145 Program.sectMap[".systemHeap"] = "HOST_DDR3";
147 /*
148  * Build a custom SYS/BIOS library from sources.
149  */
150 BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);
151 // BIOS.libType = BIOS.LibType_Custom;
152 // BIOS.libType = BIOS.LibType_Debug;
154 /* System stack size (used by ISRs and Swis) */
155 Program.stack = 0x2000;
156 Program.sectMap[".stack"] = "HOST_MSMC";
158 /* Circular buffer size for System_printf() */
159 SysMin.bufSize = 0x200;
161 System.SupportProxy = SysMin;
163 /* ------ */
164 /* Set CPU frequency to 600 MHz */
165 BIOS.cpuFreq.lo = 600000000;
166 BIOS.cpuFreq.hi = 0;
168 /* Set Sysclock period (usec.) */
169 Clock.tickPeriod = 1000; // FL: measured period ~852 usec.??
171 /* Configure Logging */
172 LoggingSetup.loggerType = LoggingSetup.LoggerType_STOPMODE;
173 LoggingSetup.sysbiosTaskLogging = false; //true;
174 LoggingSetup.sysbiosSwiLogging = false; // no Swi's in system
175 LoggingSetup.sysbiosHwiLogging = false; //true;
176 //LoggingSetup.sysbiosLoggerSize = 16384;
177 LoggingSetup.loadLogging = false; //true;
178 LoggingSetup.mainLogging = true; // false;
179 LoggingSetup.mainLoggingRuntimeControl = false;
180 LoggingSetup.mainLoggerSize = 81960;
181 //LoggingSetup.memorySectionName = "HOST_DDR3"; //"HOST_MSMC";
184 /* Configure Load Logging */ // FL: doesn't work
185 //Load.taskEnabled = true;
186 //Load.hwiEnabled = true;
187 //Load.common$.diags_USER4 = Diags.ALWAYS_ON;
189 //Task.common$.diags_USER1 = Diags.ALWAYS_ON;
190 Task.common$.diags_INFO = Diags.ALWAYS_ON;
192 /* Disallow nested hardware interrupts */
193 Hwi.dispatcherAutoNestingSupport = false;
195 var ProjName = environment["ProjName"];
196 var topo = ProjName.replace( /pa_([a-z])[0-9]+_.*/, "$1");
197 var AudioClockSim = environment["AudioClockSim"];
198 var acSimBuild = (AudioClockSim == "1" ? true : false);
200 if (acSimBuild == true)
202     // 
203     // IPC simulation
204     // 
206     /* Add timer to simulate Rx audio IPC message */
207     var timer0Params = new Timer.Params();
208     timer0Params.instance.name = "timerRxAudio";
209     timer0Params.period = 5330;
210     timer0Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
211     Program.global.timerRxAudio = Timer.create(1, null, timer0Params);
213     /* Add timer to simulate Tx audio IPC message */
214     var timer1Params = new Timer.Params();
215     timer1Params.instance.name = "timerTxAudio";
216     timer1Params.startMode = xdc.module("ti.sysbios.interfaces.ITimer").StartMode_USER;
217     timer1Params.period = 5330;
218     Program.global.timerTxAudio = Timer.create(2, null, timer1Params);
220     /* Add semaphore for Rx audio DMA */
221     var semaphore0Params = new Semaphore.Params();
222     semaphore0Params.instance.name = "semaphoreRxAudio";
223     Program.global.semaphoreRxAudio = Semaphore.create(null, semaphore0Params);
225     /* Add semaphore for Tx audio DMA */
226     var semaphore1Params = new Semaphore.Params();
227     semaphore1Params.instance.name = "semaphoreTxAudio";
228     Program.global.semaphoreTxAudio = Semaphore.create(null, semaphore1Params);
231 /* Set default stack size for tasks */
232 Task.defaultStackSize = 2048;
234 /* Set size of idle task stack */
235 Task.idleTaskStackSize = 2048;
237 /* Add Audio Stream Decode Processing (ASDP) task */
238 var task0Params = new Task.Params();
239 task0Params.instance.name = "TaskAsdp";
240 task0Params.stackSize = 0x4000;
241 task0Params.stackSection = ".far:taskStackSectionAsdp";
242 //task0Params.arg0 = 0;
243 task0Params.arg0 = $externPtr("asdp_params_PA" + topo);
244 task0Params.arg1 = $externPtr("asdp_patchs_PA" + topo);
245 task0Params.priority = -1; //3;
246 Program.global.TaskAsdp = Task.create("&taskAsdpFxn", task0Params);
247 Program.sectMap[".far:taskStackSectionAsdp"] = "HOST_MSMC";
249 /* Add System Initialization task */
250 var task1Params = new Task.Params();
251 task1Params.instance.name = "TaskSysInit";
252 task1Params.stackSize   = 0x1000;
253 task1Params.stackSection = ".far:taskStackSectionSysInit";
254 task1Params.priority = 4;
255 Program.global.TaskSysInit = Task.create("&taskSysInitFxn", task1Params);
256 Program.sectMap[".far:taskStackSectionSysInit"] = "HOST_DDR3";
258 Program.sectMap[".far:taskStackSection"] = "HOST_DDR3"; // SDRAM in pa.cfg
260 // Dec ip circular buffer will be in MSMC, size~=180 kB.
261 // Dec op circular buffer will be in MSMC, size~=192 kB.
262 // However, both buffers will be in Shared Region MSMC.
263 // So this is heap is for other use local to ARM (e.g. Dec chain). Set to 128 kB for now.
264 /* Add MSMC SRAM heap */ // formerly L3RAM
265 var heapMem1Params = new HeapMem.Params();
266 heapMem1Params.instance.name = "heapMemMsmcSram";
267 heapMem1Params.size = 224*1024; //128*1024
268 heapMem1Params.sectionName = ".msmcSramHeap";
269 Program.global.heapMemMsmcSram = HeapMem.create(heapMem1Params);
270 Program.sectMap[".msmcSramHeap"] = "HOST_MSMC";
272 /* Add DDR3 heap */ // formerly SDRAM
273 var heapMem2Params = new HeapMem.Params();
274 heapMem2Params.instance.name = "heapMemDdr3";
275 heapMem2Params.size = 3350528;
276 heapMem2Params.sectionName = ".ddr3Heap";
277 Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
278 Program.sectMap[".ddr3Heap"] = "HOST_DDR3";
280 Program.global.heapMemL2Sram = Program.global.heapMemMsmcSram;
282 //Program.sectMap[".globalSectionPafAstConfig"] = "COMMON_DDR3";
283 //Program.sectMap[".globalSectionAcpStdBetaTable"] = "COMMON_DDR3";