]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/gpio/test/led_blink/am572x/c66/bios/gpio_test_idkAM572x.cfg
gpio-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / gpio / test / led_blink / am572x / c66 / bios / gpio_test_idkAM572x.cfg
1 /**
2  *  \file   gpio_test_idkAM572x.cfg
3  *
4  *  \brief  Sysbios config file for gpio C66X test project on AM572X IDK EVM.
5  *
6  */
8 /*
9  * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
10  *
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions
13  * are met:
14  *
15  * Redistributions of source code must retain the above copyright
16  * notice, this list of conditions and the following disclaimer.
17  *
18  * Redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the
21  * distribution.
22  *
23  * Neither the name of Texas Instruments Incorporated nor the names of
24  * its contributors may be used to endorse or promote products derived
25  * from this software without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  *
39  */
40 /* ================ General configuration ================ */
41 var Memory                      =   xdc.useModule('xdc.runtime.Memory');
42 var HeapMem                     =   xdc.useModule('ti.sysbios.heaps.HeapMem');
43 var HeapBuf                     =   xdc.useModule('ti.sysbios.heaps.HeapBuf');
44 var Log                         =   xdc.useModule('xdc.runtime.Log');
45 var Task                        =   xdc.useModule('ti.sysbios.knl.Task');
46 var Semaphore                   =   xdc.useModule('ti.sysbios.knl.Semaphore');
47 var Hwi                         = xdc.useModule('ti.sysbios.family.c64p.Hwi');
48 var ECM                         =   xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
49 var System                      =   xdc.useModule('xdc.runtime.System');
50 SysStd                          =   xdc.useModule('xdc.runtime.SysStd');
52 System.SupportProxy             =   SysStd;
54 /* Create a default system heap using ti.bios.HeapMem. */
55 var heapMemParams1              =   new HeapMem.Params;
56 heapMemParams1.size             =   8192 * 25;
57 heapMemParams1.sectionName      =   "systemHeap";
58 Program.global.heap0            =   HeapMem.create(heapMemParams1);
60 /* This is the default memory heap. */
61 Memory.defaultHeapInstance      =   Program.global.heap0;
62 Program.sectMap["systemHeap"]   =   Program.platform.stackMemory;
64 /*
65  * Enable Event Groups here and registering of ISR for specific GEM INTC is done
66  * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
67  */
68 var exception                                   =       xdc.useModule('ti.sysbios.family.c64p.Exception');
69 exception.enablePrint = true;
71 /* ================ BIOS configuration ================ */
72 var BIOS                        =   xdc.useModule('ti.sysbios.BIOS');
74 /* Enable BIOS Task Scheduler */
75 BIOS.taskEnabled                        =   true;
77 /* ================ Task configuration ================ */
79 /* No runtime stack checking is performed */
80 Task.checkStackFlag = false;
83 /* Reduce the number of task priorities */
84 Task.numPriorities = 4;
86 var task0Params = new Task.Params();
87 task0Params.instance.name = "echo";
88 task0Params.stackSize = 0x1000;
89 Program.global.echo = Task.create("&gpio_test", task0Params);
92 /* Define and add one Task Hook Set */
93 Task.addHookSet({
94         registerFxn: '&TaskRegisterId',
95         switchFxn: '&mySwitch',
96 });
98 /* ================ Driver configuration ================ */
100 /* Load the OSAL package */ 
101 var osType = "tirtos"
102 var Osal = xdc.useModule('ti.osal.Settings');
103 Osal.osType = osType;
105 /*use CSL package*/
106 var socType           = "am572x";
107 var Csl = xdc.loadPackage('ti.csl');
108 Csl.Settings.deviceType = socType;
110 /* Load Profiling package */
111 var Utils = xdc.loadPackage('ti.utils.profiling');
113 /* Load the gpio package */
114 var Gpio = xdc.loadPackage('ti.drv.gpio');
115 Gpio.Settings.enableProfiling = true;  
117 /* Load the GPIO package */
118 var Gpio = xdc.loadPackage('ti.drv.uart');     
120 /* Load the I2C package */
121 var I2c = xdc.loadPackage('ti.drv.i2c');
122 I2c.Settings.socType = socType;
124 /* Load the SPI package */
125 var Spi = xdc.loadPackage('ti.drv.spi');
127 /* Load the Board package and set the board name */
128 var Board = xdc.loadPackage('ti.board');
129 Board.Settings.boardName = "idkAM572x";
131 /* ================ Memory sections configuration ================ */
132 Program.sectMap[".text"] = "EXT_RAM";
133 Program.sectMap[".const"] = "EXT_RAM";
134 Program.sectMap[".plt"] = "EXT_RAM";
135 Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
136 Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";