index 104aa744b84e5acf2f775d3801af447b5c67b154..cd64a7b6b256761ab6dde7beea73f1e52a71d25d 100644 (file)
/*
-Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
All rights reserved.
* Redistribution and use in source and binary forms, with or without
var Text = xdc.useModule('xdc.runtime.Text');
var BIOS = xdc.useModule('ti.sysbios.BIOS');
+var GateAll = xdc.useModule('ti.sysbios.gates.GateAll'); // Added for PFP
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var Timer = xdc.useModule('ti.sysbios.hal.Timer');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
+var Idle = xdc.useModule('ti.sysbios.knl.Idle');
+var Swi = xdc.useModule('ti.sysbios.knl.Swi'); // Added for PFP, no SWIs on ARM
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
xdc.global.SrDDr3Mem_cacheEnable = true;
xdc.global.SrDDr3_2Mem_cacheEnable = false;
xdc.global.procName = "HOST";
-var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_00/pasdk/shared/ipc.cfg.xs");
+var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_04/pasdk/shared/ipc.cfg.xs");
/* select ipc libraries */
var Build = xdc.useModule('ti.sdo.ipc.Build');
/* Add Audio Stream Decode Processing (ASDP) task */
var task0Params = new Task.Params();
task0Params.instance.name = "TaskAsdp";
-task0Params.stackSize = 0x4000;
+task0Params.stackSize = (0x8000+0x1000);
task0Params.stackSection = ".far:taskStackSectionAsdp";
//task0Params.arg0 = 0;
task0Params.arg0 = $externPtr("asdp_params_PA" + topo);
/* Add MSMC SRAM heap */ // formerly L3RAM
var heapMem1Params = new HeapMem.Params();
heapMem1Params.instance.name = "heapMemMsmcSram";
-heapMem1Params.size = 224*1024; //128*1024
+heapMem1Params.size = (224-4)*1024; //128*1024
heapMem1Params.sectionName = ".msmcSramHeap";
Program.global.heapMemMsmcSram = HeapMem.create(heapMem1Params);
Program.sectMap[".msmcSramHeap"] = "HOST_MSMC";
/* Add DDR3 heap */ // formerly SDRAM
var heapMem2Params = new HeapMem.Params();
heapMem2Params.instance.name = "heapMemDdr3";
-heapMem2Params.size = 3350528;
+heapMem2Params.size = 5350528+ (3*1024*1024); // Added 3 MB for DTS decoder;//4350528;
heapMem2Params.sectionName = ".ddr3Heap";
Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
Program.sectMap[".ddr3Heap"] = "HOST_DDR3";
//Program.sectMap[".globalSectionPafAstConfig"] = "COMMON_DDR3";
//Program.sectMap[".globalSectionAcpStdBetaTable"] = "COMMON_DDR3";
+
+/* Define HWI Hook Set for PFP */
+Hwi.addHookSet({
+ registerFxn: '&pfpHwiRegister',
+ createFxn: '&pfpHwiCreate',
+ beginFxn: '&pfpHwiBegin',
+ endFxn: '&pfpHwiEnd',
+ deleteFxn: null,
+});
+
+/* Define SWI Hook Set for PFP */
+Swi.addHookSet({
+ registerFxn: '&pfpSwiRegister', // need this for Id for Hook context
+ createFxn: '&pfpSwiCreate', // malloc context storage space
+ readyFxn: '&pfpSwiReady',
+ beginFxn: '&pfpSwiBegin',
+ endFxn: '&pfpSwiEnd',
+ deleteFxn: null,
+});
+
+/* Define Task Hook Set for PFP */
+Task.addHookSet({
+ registerFxn: '&pfpTaskRegister',
+ createFxn: '&pfpTaskCreate',
+ readyFxn: '&pfpTaskReady',
+ switchFxn: '&pfpTaskSwitch',
+ exitFxn: null,
+ deleteFxn: null,
+});
+
+/* Added for PFP, not necessary */
+Hwi.common$.namedInstance=true;
+Swi.common$.namedInstance=true;
+Task.common$.namedInstance=true;