123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- /*
- * Copyright 2011 by Texas Instruments Incorporated.
- *
- * All rights reserved. Property of Texas Instruments Incorporated.
- * Restricted rights to use, duplicate or disclose this code are
- * granted through contract.
- *
- */
- environment['xdc.cfg.check.fatal'] = 'false';
-
- /********************************************************************
- ************************** BIOS Modules ****************************
- ********************************************************************/
- var Defaults = xdc.useModule('xdc.runtime.Defaults');
- var Error = xdc.useModule('xdc.runtime.Error');
- var System = xdc.useModule('xdc.runtime.System');
- var Text = xdc.useModule('xdc.runtime.Text');
- var Memory = xdc.useModule('xdc.runtime.Memory');
- var SysStd = xdc.useModule('xdc.runtime.SysStd');
-
- var BIOS = xdc.useModule('ti.sysbios.BIOS');
- var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
- var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
- var Task = xdc.useModule('ti.sysbios.knl.Task');
- var Idle = xdc.useModule('ti.sysbios.knl.Idle');
- var SEM = xdc.useModule('ti.sysbios.knl.Semaphore');
- var Event = xdc.useModule('ti.sysbios.knl.Event');
- var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
- var EventCombiner = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
- var Load = xdc.useModule('ti.sysbios.utils.Load');
-
- System.SupportProxy = SysStd;
-
- /* Default Heap Creation: Local L2 memory */
- var heapMemParams = new HeapMem.Params();
- heapMemParams.size = 11*1024;
- heapMemParams.sectionName = "systemHeap";
- Program.global.heap0 = HeapMem.create(heapMemParams);
- Memory.defaultHeapInstance = Program.global.heap0;
- /*
- * Enable Event Groups here and registering of ISR for specific GEM INTC is done
- * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
- */
- EventCombiner.eventGroupHwiNum[0] = 7;
- EventCombiner.eventGroupHwiNum[1] = 8;
- EventCombiner.eventGroupHwiNum[2] = 9;
- EventCombiner.eventGroupHwiNum[3] = 10;
-
- /* Enable BIOS Task Scheduler */
- BIOS.taskEnabled = true;
-
- /* System stack size (used by ISRs and Swis) */
- Program.stack = 0x800;
-
- Task.idleTaskStackSize = 800;
-
- /* do not call update for load - Application will call it at inter-frame boundary */
- Load.updateInIdle = false;
-
- /* Install idle function to sleep. Note above
- Load.updateInIdle is false which allows to sleep in idle.
- Also, no other book-keeping etc functions should be installed in the idle thread */
- Idle.addFunc('&Pcount3DDemo_sleep');
-
- /*
- * Build a custom BIOS library. The custom library will be smaller than the
- * pre-built "instrumented" (default) and "non-instrumented" libraries.
- *
- * The BIOS.logsEnabled parameter specifies whether the Logging is enabled
- * within BIOS for this custom build. These logs are used by the RTA and
- * UIA analysis tools.
- *
- * The BIOS.assertsEnabled parameter specifies whether BIOS code will
- * include Assert() checks. Setting this parameter to 'false' will generate
- * smaller and faster code, but having asserts enabled is recommended for
- * early development as the Assert() checks will catch lots of programming
- * errors (invalid parameters, etc.)
- */
- BIOS.libType = BIOS.LibType_Custom;
- BIOS.logsEnabled = false;
- BIOS.assertsEnabled = true;
-
- /* Make sure libraries are built with 32-bit enum types to be compatible with DSP enum types*/
- BIOS.includeXdcRuntime = true;
- BIOS.customCCOpts += " --enum_type=int ";
-
- /********************************************************************
- * Enabling DebugP Log Support
- ********************************************************************/
- var Log = xdc.useModule('xdc.runtime.Log');
- var Main = xdc.useModule('xdc.runtime.Main');
- var Diags = xdc.useModule('xdc.runtime.Diags');
- var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
-
- /* Configure the Logger Buffer: */
- var loggerBufParams = new LoggerBuf.Params();
- loggerBufParams.bufType = LoggerBuf.BufType_CIRCULAR;
- loggerBufParams.exitFlush = false;
- loggerBufParams.instance.name = "_logInfo";
- loggerBufParams.numEntries = 200;
-
- /* Create the Logger and attach this to the application */
- MyAppLogger = LoggerBuf.create(loggerBufParams);
- Main.common$.logger = MyAppLogger;
- Main.common$.diags_USER1 = Diags.RUNTIME_ON;
- //Task.common$.diags_USER1 = Diags.RUNTIME_ON;
- Task.common$.diags_USER1 = Diags.ALWAYS_ON;
- Task.common$.diags_USER2 = Diags.ALWAYS_ON;
|