index c9ab5466aca45e8f38ce21186fff432eeb9c0a14..1efc084bbeeb002041b009a1a2a62fa2911f085e 100644 (file)
xdc.global.SrDDr3Mem_cacheEnable = true;
xdc.global.SrDDr3_2Mem_cacheEnable = false;
xdc.global.procName = "CORE0";
-var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_03/pasdk/shared/ipc.cfg.xs");
+/* var ipc_cfg = xdc.loadCapsule("C:/ti/processor_sdk_audio_1_01_00_01/pasdk/shared/ipc.cfg.xs"); */
+var ipc_cfg = xdc.loadCapsule("../../shared/ipc.cfg.xs");
+
/* select ipc libraries */
var Build = xdc.useModule('ti.sdo.ipc.Build');
/*
* Build a custom SYS/BIOS library from sources.
*/
-BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);
-// BIOS.libType = BIOS.LibType_Custom;
-// BIOS.libType = BIOS.LibType_Debug;
-
+
+var HsDevBuild = environment["HsDevBuild"];
+var hsDevBuild = (HsDevBuild == "1" ? true : false);
+if (HsDevBuild == true)
+{
+ /* HS device build */
+ /* Added per recommendation from CATAPPS-171 */
+ BIOS.useSK = true;
+ BIOS.setupSecureContext = true;
+ BIOS.libType = BIOS.LibType_Custom;
+}
+else
+{
+ /* GP device build */
+ BIOS.libType = (RB ? BIOS.LibType_NonInstrumented : BIOS.LibType_Instrumented);
+ //BIOS.libType = BIOS.LibType_Custom;
+ //BIOS.libType = BIOS.LibType_Debug;
+}
+
/* System stack size (used by ISRs and Swis) */
Program.stack = 0x2000;
Program.sectMap[".stack"] = "L2SRAM"
var ProjName = environment["ProjName"];
var topo = ProjName.replace( /pa_([a-z])[0-9]+_.*/, "$1");
-var RxAlphaSim = environment["RxAlphaSim"];
-var rxAlphaSimBuild = (RxAlphaSim == "1" ? true : false);
var drv = xdc.loadPackage('ti.sdo.edma3.drv');
var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
-if (rxAlphaSimBuild == false)
-{
- var devType = "k2g"
-
- var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
-
- /* Load the OSAL package */
- var osType = "tirtos";
- var Osal = xdc.useModule('ti.osal.Settings');
- Osal.osType = osType;
- Osal.socType = devType;
-
- /* Load the uart package */
- var Uart = xdc.loadPackage('ti.drv.uart');
- Uart.Settings.enableProfiling = false;
- Uart.Settings.socType = devType;
- Uart.Settings.useDma = "true";
-
- /* Load the spi package */
- var Spi = xdc.loadPackage('ti.drv.spi');
- Spi.Settings.enableProfiling = false;
- Spi.Settings.socType = devType;
-
- /* Load the i2c package */
- var I2c = xdc.loadPackage('ti.drv.i2c');
- I2c.Settings.enableProfiling = false;
- I2c.Settings.socType = devType;
-
- /* Load and use the CSL packages */
- var Csl = xdc.useModule('ti.csl.Settings');
- Csl.deviceType = devType;
-}
-else
-{
- //
- // Rx alpha commands simulation
- //
-
- /* Add clock for Rx alpha commands DMA */
- var clock0Params = new Clock.Params();
- clock0Params.instance.name = "clockRxAlpha";
- Program.global.clockRxAlpha = Clock.create("&clockRxAlphaFxn", 0, clock0Params);
-
- /* Add semaphore for Rx alpha commands DMA */
- var semaphore2Params = new Semaphore.Params();
- semaphore2Params.instance.name = "semaphoreRxAlpha";
- Program.global.semaphoreRxAlpha = Semaphore.create(null, semaphore2Params);
-}
+var devType = "k2g"
+
+var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
+
+/* Load the OSAL package */
+var osType = "tirtos";
+var Osal = xdc.useModule('ti.osal.Settings');
+Osal.osType = osType;
+Osal.socType = devType;
+
+/* Load the uart package */
+var Uart = xdc.loadPackage('ti.drv.uart');
+Uart.Settings.enableProfiling = false;
+Uart.Settings.socType = devType;
+Uart.Settings.useDma = "true";
+
+/* Load the spi package */
+var Spi = xdc.loadPackage('ti.drv.spi');
+Spi.Settings.enableProfiling = false;
+Spi.Settings.socType = devType;
+
+/* Load the i2c package */
+var I2c = xdc.loadPackage('ti.drv.i2c');
+I2c.Settings.enableProfiling = false;
+I2c.Settings.socType = devType;
+
+/* Load and use the CSL packages */
+var Csl = xdc.useModule('ti.csl.Settings');
+Csl.deviceType = devType;
/* Set default stack size for tasks */
Task.defaultStackSize = 2048;
task1Params.arg0 = 0;
task1Params.priority = -1; //2;
Program.global.TaskAip = Task.create("&taskAipFxn", task1Params);
-Program.sectMap[".far:taskStackSectionAip"] = "CORE0_MSMC"; // L3RAM in pa.cfg
+Program.sectMap[".far:taskStackSectionAip"] = "CORE0_DDR3"; // L3RAM in pa.cfg
/* Add Audio Stream Input Processing (ASIP) task */
var task2Params = new Task.Params();
task2Params.arg1 = $externPtr("asip_patchs_PA" + topo);
task2Params.priority = -1; //3;
Program.global.TaskAsip = Task.create("&taskAsipFxn", task2Params);
-Program.sectMap[".far:taskStackSectionAsip"] = "CORE0_MSMC";
+Program.sectMap[".far:taskStackSectionAsip"] = "CORE0_DDR3";
/* Add Audio Stream Output Processing (ASOP) task */
var task3Params = new Task.Params();
task3Params.arg1 = $externPtr("asop_patchs_PA" + topo);
task3Params.priority = -1; //3;
Program.global.TaskAsop = Task.create("&taskAsopFxn", task3Params);
-Program.sectMap[".far:taskStackSectionAsop"] = "CORE0_MSMC";
+Program.sectMap[".far:taskStackSectionAsop"] = "CORE0_DDR3";
/* Add System Initialization task */
var task4Params = new Task.Params();
@@ -337,12 +333,17 @@ Program.global.TaskSystemStream = Task.create("&taskSystemStreamFxn", task5Param
Program.sectMap[".far:taskStackSectionAudioStream"] = "CORE0_DDR3";
/* Add idle functions */
-Idle.idleFxns[0] = "&SAP_watchDog"; // Idle function for DSP watchdog; formerly DAP_watchDog()
-// Remark: Moved idleAudioStream (idle function) to taskSystemStreamFxn (task)
+// Remark: original idle functions
+//Idle.idleFxns[0] = "&SAP_watchDog"; // Idle function for DSP watchdog; formerly DAP_watchDog()
//Idle.idleFxns[1] = "&idleAudioStream"; // Idle function for audio stream; formerly audioStream1Idle()
//Idle.idleFxns[2] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
-Idle.idleFxns[1] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
-Idle.idleFxns[2] = "&idleDebug" // Idle function for debug code
+// Remark: Moved idleAudioStream (idle function) to taskSystemStreamFxn (task)
+//Idle.idleFxns[0] = "&SAP_watchDog"; // Idle function for DSP watchdog; formerly DAP_watchDog()
+//Idle.idleFxns[1] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
+//Idle.idleFxns[2] = "&idleDebug" // Idle function for debug code
+// Remark: Removed SAP watch dog
+Idle.idleFxns[0] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC)
+Idle.idleFxns[1] = "&idleDebug" // Idle function for debug code
/* Add L2 SRAM heap */ // formerly IRAM
var heapMem0Params = new HeapMem.Params();
heapMem1Params.size = 128*1024;
heapMem1Params.sectionName = ".msmcSramHeap";
Program.global.heapMemMsmcSram = HeapMem.create(heapMem1Params);
-Program.sectMap[".msmcSramHeap"] = "CORE0_MSMC";
+Program.sectMap[".msmcSramHeap"] = "CORE0_DDR3";
/* Add DDR3 heap */ // formerly SDRAM
var heapMem2Params = new HeapMem.Params();
heapMem2Params.instance.name = "heapMemDdr3";
-heapMem2Params.size = 4350528;
+heapMem2Params.size = 4350528 + (3*1024*1024); // Added 3 MB for DTS PARMA
heapMem2Params.sectionName = ".ddr3Heap";
Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
Program.sectMap[".ddr3Heap"] = "CORE0_DDR3";
/* For DCS7, dcs7_cfg.c */
Program.global.Heap = Program.global.heapMemDdr3;
-Program.sectMap["platform_lib"] = "L2SRAM";
//Program.sectMap[".stack"] = "L2SRAM";
+/* Map C66x INTC Event Combiner EVT 0-3 to HWI numbers */
ECM.eventGroupHwiNum[0] = 7;
-ECM.eventGroupHwiNum[1] = 8; // FL: conflict w/ UART LLD (intr-callback)
+ECM.eventGroupHwiNum[1] = 8; // FL: conflict w/ UART LLD, intr-callback mode
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
-//Clock.tickPeriod = 100; // FL: UART LLD (intr-callback) unresponsive
+
/* Define HWI Hook Set for PFP */
Hwi.addHookSet({