/*
 *  ======== evmc6657.cfg ========
 *
 */

var Memory       = xdc.useModule('xdc.runtime.Memory');
var BIOS         = xdc.useModule('ti.sysbios.BIOS');
var Task         = xdc.useModule('ti.sysbios.knl.Task');
var Clock        = xdc.useModule ('ti.sysbios.knl.Clock');
var Hwi          = xdc.useModule ('ti.sysbios.hal.Hwi');
var HeapMem   = xdc.useModule('ti.sysbios.heaps.HeapMem');


/* Load and use the System Package */
var System       = xdc.useModule('xdc.runtime.System');
var SysStd       = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;

/* Register startup function handler with BIOS */
var Startup      = xdc.useModule('xdc.runtime.Startup');
Startup.firstFxns.$add('&myStartupFxn');

var EmacLLD = xdc.loadPackage('ti.drv.emac');

/* Create a Heap. */
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x8000;
heapMemParams.sectionName = "systemHeapMaster";
Program.global.heap0 = HeapMem.create(heapMemParams);
Memory.defaultHeapInstance = Program.global.heap0;

/* This is the default memory heap. */
Program.sectMap["systemHeapMaster"]  = "L2SRAM";
Program.sectMap["emacComm"]          = "L2SRAM";
Program.sectMap["msmc"]				 = "MSMCSRAM";
Program.sectMap[".far:PKTBUF_L2MEM"] = "L2SRAM";
Program.sectMap[".far"]              = "L2SRAM";
Program.sectMap[".cinit"]            = "L2SRAM";
Program.sectMap[".bss"]              = "L2SRAM";
Program.sectMap[".const"]            = "L2SRAM";
Program.sectMap[".text"]             = "L2SRAM";
Program.sectMap[".code"]             = "L2SRAM";
Program.sectMap[".data"]             = "L2SRAM";
Program.sectMap[".far:taskStackSection"] = "L2SRAM";
Program.sectMap[".stack"]            = "L2SRAM";
Program.sectMap[".sysmem"]           = "L2SRAM";
Program.sectMap[".vecs"]             = "L2SRAM";
Program.sectMap[".args"]             = "L2SRAM";
Program.sectMap[".cio"]              = "L2SRAM";
Program.sectMap[".switch"]           = "L2SRAM";

/* Create a Periodic task with 100 ms inverval to handle EMAC polling function */
var prdEmacClkParams         =   new Clock.Params ();
prdEmacClkParams.period      =   100;   
prdEmacClkParams.startFlag   =   true;
Program.global.clockInst1    =   Clock.create("&app_timer", 5, prdEmacClkParams);

/* Enable BIOS Task Scheduler */
BIOS.taskEnabled             =   true;

/*
 *  @(#) ti.sysbios.genx; 2, 0, 0, 0,292; 6-12-2009 18:13:17; /db/vtree/library/trees/avala/avala-l08x/src/
 */
