]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/gpio/test/led_blink/c6657/c66/bios/gpio_test.cfg
gpio-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / gpio / test / led_blink / c6657 / c66 / bios / gpio_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 /*
11  *  ======== gpio_test.cfg ========
12  *
13  */
15 /* Load all required BIOS/XDC runtime packages */
16 var Memory                      =   xdc.useModule('xdc.runtime.Memory');
17 var BIOS                        =   xdc.useModule('ti.sysbios.BIOS');
18 var HeapMem                     =   xdc.useModule('ti.sysbios.heaps.HeapMem');
19 var HeapBuf                     =   xdc.useModule('ti.sysbios.heaps.HeapBuf');
20 var Log                         =   xdc.useModule('xdc.runtime.Log');
21 var Task                        =   xdc.useModule('ti.sysbios.knl.Task');
22 var Semaphore                   =   xdc.useModule('ti.sysbios.knl.Semaphore');
23 var CpIntc                      =   xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
24 var Hwi                         =   xdc.useModule('ti.sysbios.family.c64p.Hwi');
25 var ECM                         =   xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
26 var core                        =   xdc.useModule('ti.sysbios.hal.Core');
28 var devType = "c6657"
30 /* Load the OSAL package */ 
31 var osType = "tirtos"
32 var Osal = xdc.useModule('ti.osal.Settings');
33 Osal.osType = osType;
34 Osal.socType = devType;
36 /*use CSL package*/
37 var Csl = xdc.loadPackage('ti.csl');
38 Csl.Settings.deviceType = devType;
40 /* Load the Board package and set the board name */
41 var Board = xdc.loadPackage('ti.board');
42 Board.Settings.boardName = "evmC6657";
44 /* Load Profiling package */
45 var Utils = xdc.loadPackage('ti.utils.profiling');
47 /* Load the gpio package */
48 var Gpio = xdc.loadPackage('ti.drv.gpio');
49 Gpio.Settings.enableProfiling = true;    
50 Gpio.Settings.socType = devType;
52 /* Load the uart package */
53 var Uart = xdc.useModule('ti.drv.uart.Settings');
54 Uart.socType = devType;
56 var System                      =   xdc.useModule('xdc.runtime.System');
57 SysStd                          =   xdc.useModule('xdc.runtime.SysStd');
58 System.SupportProxy             =   SysStd;
60 /* Load and use the CSL packages */
61 var Csl                         = xdc.useModule('ti.csl.Settings');
62 Csl.deviceType                  = devType;
64 /* Create a default system heap using ti.bios.HeapMem. */
65 var heapMemParams1              =   new HeapMem.Params;
66 heapMemParams1.size             =   8192 * 25;
67 heapMemParams1.sectionName      =   "systemHeap";
68 Program.global.heap0            =   HeapMem.create(heapMemParams1);
71 /* No runtime stack checking is performed */
72 Task.checkStackFlag             = false;
75 /* Reduce the number of task priorities */
76 Task.numPriorities              = 4;
78 /* ================ Task configuration ================ */
79 var task0Params                 = new Task.Params();
80 task0Params.instance.name       = "echo";
81 task0Params.stackSize           = 0x1000;
82 Program.global.echo             = Task.create("&gpio_test", task0Params);
84 /* This is the default memory heap. */
85 Memory.defaultHeapInstance      =   Program.global.heap0;
87 Program.sectMap["systemHeap"]   =   Program.platform.stackMemory;
89 Program.sectMap[".fardata:benchmarking"] = "DDR3";
91 /****** IPC - Shared Memory Settings ********/
92 /* IPC packages */
94 var memmap                      = Program.cpu.memoryMap;
96 /*Startup = xdc.useModule('xdc.runtime.Startup');
97 Startup.firstFxns.$add('&myStartupFxn');*/
99 /* Enable BIOS Task Scheduler */
100 BIOS.taskEnabled                =   true;
102 /*
103  * Enable Event Groups here and registering of ISR for specific GEM INTC is done
104  * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
105  */
106 var exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
107 exception.enablePrint = true;
109 /* Define and add one Task Hook Set */
110 Task.addHookSet({
111         registerFxn: '&TaskRegisterId',
112         switchFxn: '&mySwitch',
113 });