[processor-sdk/pdk.git] / packages / ti / drv / i2c / example / eeprom_read / k2l / c66 / bios / i2c_test.cfg
1 /*
2 * Copyright 2015 by Texas Instruments Incorporated.
3 *
4 * All rights reserved. Property of Texas Instruments Incorporated.
5 * Restricted rights to use, duplicate or disclose this code are
6 * granted through contract.
7 *
8 */
10 /* THIS FILE WAS GENERATED BY ti.sysbios.genx */
12 /*
13 * ======== i2c_test.cfg ========
14 *
15 */
17 /* Load all required BIOS/XDC runtime packages */
18 var Memory = xdc.useModule('xdc.runtime.Memory');
19 var BIOS = xdc.useModule('ti.sysbios.BIOS');
20 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
21 var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
22 var Log = xdc.useModule('xdc.runtime.Log');
23 var Task = xdc.useModule('ti.sysbios.knl.Task');
24 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
25 var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
26 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
27 var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
28 var core = xdc.useModule('ti.sysbios.hal.Core');
30 var devType = "k2l"
32 /* Load the OSAL package */
33 var osType = "tirtos"
34 var Osal = xdc.useModule('ti.osal.Settings');
35 Osal.osType = osType;
36 Osal.socType = devType;
38 /*use CSL package*/
39 var Csl = xdc.loadPackage('ti.csl');
40 Csl.Settings.deviceType = devType;
42 /* Load the Board package and set the board name */
43 var Board = xdc.loadPackage('ti.board');
44 Board.Settings.boardName = "evmK2L";
46 /* Load Profiling package */
47 var Utils = xdc.loadPackage('ti.utils.profiling');
49 /* Load the i2c package */
50 var I2c = xdc.loadPackage('ti.drv.i2c');
51 I2c.Settings.enableProfiling = true;
52 I2c.Settings.socType = devType;
54 /* Load the uart package */
55 var Uart = xdc.useModule('ti.drv.uart.Settings');
56 Uart.socType = devType;
58 var System = xdc.useModule('xdc.runtime.System');
59 SysStd = xdc.useModule('xdc.runtime.SysStd');
60 System.SupportProxy = SysStd;
62 /* Load and use the CSL packages */
63 var Csl = xdc.useModule('ti.csl.Settings');
64 Csl.deviceType = devType;
66 /* Create a default system heap using ti.bios.HeapMem. */
67 var heapMemParams1 = new HeapMem.Params;
68 heapMemParams1.size = 8192 * 25;
69 heapMemParams1.sectionName = "systemHeap";
70 Program.global.heap0 = HeapMem.create(heapMemParams1);
73 /* No runtime stack checking is performed */
74 Task.checkStackFlag = false;
77 /* Reduce the number of task priorities */
78 Task.numPriorities = 4;
80 /* ================ Task configuration ================ */
81 var task0Params = new Task.Params();
82 task0Params.instance.name = "echo";
83 task0Params.stackSize = 0x1000;
84 Program.global.echo = Task.create("&i2c_test", task0Params);
86 /* This is the default memory heap. */
87 Memory.defaultHeapInstance = Program.global.heap0;
89 Program.sectMap["systemHeap"] = Program.platform.stackMemory;
90 Program.sectMap[".fardata:benchmarking"] = "DDR3";
92 /****** IPC - Shared Memory Settings ********/
93 /* IPC packages */
95 var memmap = Program.cpu.memoryMap;
97 /*Startup = xdc.useModule('xdc.runtime.Startup');
98 Startup.firstFxns.$add('&myStartupFxn');*/
101 /* Enable BIOS Task Scheduler */
102 BIOS.taskEnabled = true;
104 /*
105 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
106 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
107 */
108 var exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
109 exception.enablePrint = true;
111 /*
112 * @(#) ti.sysbios.genx; 2, 0, 0, 0,275; 4-29-2009 15:45:06; /db/vtree/library/trees/avala/avala-k25x/src/
113 */
115 /* Define and add one Task Hook Set */
116 Task.addHookSet({
117 registerFxn: '&TaskRegisterId',
118 switchFxn: '&mySwitch',
119 });