[processor-sdk/pdk.git] / packages / ti / drv / i2c / test / master_slave / omapl138 / c674 / bios / i2c_c674_omapl138_slave.cfg
1 /**
2 * \file i2c_c674_omapl138_slave.cfg
3 *
4 * \brief Sysbios config file for I2C master-salve test project on
5 * OMAPL138 LCDK.
6 *
7 */
9 /*
10 * Copyright (C) 2017-2018 Texas Instruments Incorporated - http://www.ti.com/
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 *
19 * Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the
22 * distribution.
23 *
24 * Neither the name of Texas Instruments Incorporated nor the names of
25 * its contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 */
42 /* Load all required BIOS/XDC runtime packages */
43 var Memory = xdc.useModule('xdc.runtime.Memory');
44 var BIOS = xdc.useModule('ti.sysbios.BIOS');
45 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
46 var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
47 var Log = xdc.useModule('xdc.runtime.Log');
48 var Task = xdc.useModule('ti.sysbios.knl.Task');
49 var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
50 var Hwi = xdc.useModule('ti.sysbios.family.c64p.Hwi');
51 var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
52 var core = xdc.useModule('ti.sysbios.hal.Core');
53 var cache = xdc.useModule ("ti.sysbios.hal.Cache");
55 var devType = "omapl138"
57 /* Load the OSAL package */
58 var osType = "tirtos"
59 var Osal = xdc.useModule('ti.osal.Settings');
60 Osal.osType = osType;
61 Osal.socType = devType;
63 /*use CSL package*/
64 var Csl = xdc.loadPackage('ti.csl');
65 Csl.Settings.deviceType = devType;
67 /* Load the Board package and set the board name */
68 var Board = xdc.loadPackage('ti.board');
69 Board.Settings.boardName = "lcdkOMAPL138";
71 /* Load Profiling package */
72 /*var Utils = xdc.loadPackage('ti.utils.profiling');*/
74 /* Load the i2c package */
75 var I2c = xdc.loadPackage('ti.drv.i2c');
76 I2c.Settings.enableProfiling = false;
78 /* Load the uart package */
79 var Uart = xdc.useModule('ti.drv.uart.Settings');
80 Uart.socType = devType;
82 var System = xdc.useModule('xdc.runtime.System');
83 SysStd = xdc.useModule('xdc.runtime.SysStd');
84 System.SupportProxy = SysStd;
86 /* Load and use the CSL packages */
87 var Csl = xdc.useModule('ti.csl.Settings');
88 Csl.deviceType = devType;
90 /* Create a default system heap using ti.bios.HeapMem. */
91 var heapMemParams1 = new HeapMem.Params;
92 heapMemParams1.size = 8192 * 25;
93 heapMemParams1.sectionName = "systemHeap";
94 Program.global.heap0 = HeapMem.create(heapMemParams1);
97 /* No runtime stack checking is performed */
98 Task.checkStackFlag = false;
101 /* Reduce the number of task priorities */
102 Task.numPriorities = 4;
104 /* ================ Task configuration ================ */
105 var task0Params = new Task.Params();
106 task0Params.instance.name = "echo";
107 task0Params.stackSize = 0x1000;
108 Program.global.echo = Task.create("&slaveTaskFxn", task0Params);
110 /* This is the default memory heap. */
111 Memory.defaultHeapInstance = Program.global.heap0;
113 Program.sectMap["systemHeap"] = Program.platform.stackMemory;
114 Program.sectMap[".fardata:benchmarking"] = "APP_CACHED_DATA_BLK1_MEM";
116 /* Enable BIOS Task Scheduler */
117 BIOS.taskEnabled = true;
119 /*
120 * Enable Event Groups here and registering of ISR for specific GEM INTC is done
121 * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
122 */
123 var exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
124 exception.enablePrint = true;
126 /*Entry point Memory alignment*/
127 Program.sectMap[".text:_c_int00"] = new Program.SectionSpec();
128 Program.sectMap[".text:_c_int00"].loadSegment = "APP_CACHED_DATA_BLK1_MEM";
130 /*
131 * @(#) ti.sysbios.genx; 2, 0, 0, 0,275; 4-29-2009 15:45:06; /db/vtree/library/trees/avala/avala-k25x/src/
132 */
134 /* Define and add one Task Hook Set */
135 /*Task.addHookSet({
136 registerFxn: '&TaskRegisterId',
137 switchFxn: '&mySwitch',
138 });*/