]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/transport/ndk/nimu/example/helloWorld/omapl137/c674/bios/helloWorld.cfg
transport: add to PDK
[processor-sdk/pdk.git] / packages / ti / transport / ndk / nimu / example / helloWorld / omapl137 / c674 / bios / helloWorld.cfg
1 /*
2  * helloWorld.cfg
3  *
4  * Memory Map and Program intiializations for the helloWorld example Utility
5  *
6  * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/ 
7  *  
8  *  Redistribution and use in source and binary forms, with or without 
9  *  modification, are permitted provided that the following conditions 
10  *  are met:
11  *
12  *    Redistributions of source code must retain the above copyright 
13  *    notice, this list of conditions and the following disclaimer.
14  *
15  *    Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the 
17  *    documentation and/or other materials provided with the   
18  *    distribution.
19  *
20  *    Neither the name of Texas Instruments Incorporated nor the names of
21  *    its contributors may be used to endorse or promote products derived
22  *    from this software without specific prior written permission.
23  *
24  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
25  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
26  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
28  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
29  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
30  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
33  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
34  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35  *
36 */
38 /*
39  *   @file  helloWorld.cfg
40  *
41  *   @brief   
42  *      Memory Map and Program intiializations for the hello world NDK unit test.
43  *
44  */
45  
46 /********************************************************************************************************************
47 *  Specify all needed RTSC MOudles and ocnfigure them.                                                                                                                          *
48 ********************************************************************************************************************/
50 var Memory  =   xdc.useModule('xdc.runtime.Memory');
52 var BIOS    =   xdc.useModule('ti.sysbios.BIOS');
54 var Task    =   xdc.useModule('ti.sysbios.knl.Task');
56 var HeapBuf =   xdc.useModule('ti.sysbios.heaps.HeapBuf');
58 var Log     =   xdc.useModule('xdc.runtime.Log');
60 /*
61 ** Allow storing of task names. By default if you name a task with a friendly display name it will not be saved
62 ** to conserve RAM. This must be set to true to allow it. We use friendly names on the Task List display.
63 */
64 Task.common$.namedInstance = true;
66 var Clock   =   xdc.useModule ('ti.sysbios.knl.Clock');
68 /* Use this for BIOS 6.30 plus to get the IPC module */
69 var Sem = xdc.useModule ('ti.sysbios.knl.Semaphore');
71 var Hwi = xdc.useModule ('ti.sysbios.hal.Hwi');
73 var Ecm = xdc.useModule ('ti.sysbios.family.c64p.EventCombiner');
75 var Diags       = xdc.useModule('xdc.runtime.Diags');
77 var socType                                     =       "omapl137";
79 /* Load the CSL package */
80 var devType                                     =       "omapl137";
81 var Csl                                             =   xdc.useModule('ti.csl.Settings');
82 Csl.deviceType                                  =       devType;
83 Csl.useCSLIntcLib                               =       true;
85 /* Load the OSAL package */
86 var osType = "tirtos"
87 var Osal = xdc.useModule('ti.osal.Settings');
88 Osal.osType = osType;
89 Osal.socType = devType;
91 /* Load the Board package and set the board name */
92 var Board = xdc.loadPackage('ti.board');
93 Board.Settings.boardName = "evmOMAPL137";
95 /* Load the uart package */
96 var Uart = xdc.loadPackage('ti.drv.uart');
97 Uart.Settings.socType = devType;
99 /* Load the i2c package */
100 var i2c = xdc.loadPackage('ti.drv.i2c');
101 i2c.Settings.socType = devType;
103 /* Load EMAC package */
104 var EmacLLD = xdc.loadPackage('ti.drv.emac');
105 EmacLLD.Settings.socType = devType;
106 EmacLLD.Settings.enableProfiling = false;
108 var Nimu                = xdc.loadPackage('ti.transport.ndk.nimu');
109 Nimu.Settings.socType  = socType;
111 /* 
112 ** Sets up the exception log so you can read it with ROV in CCS 
113 */
114 var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
115 var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
116 Exc.common$.logger = LoggerBuf.create();
117 Exc.enablePrint = true; /* prints exception details to the CCS console */
120 /*
121 ** Use this load to configure NDK 2.2 and above using RTSC. In previous versions of
122 ** the NDK RTSC configuration was not supported and you should comment this out.
123 */
124 var Ndk       = xdc.loadPackage('ti.ndk.config');
125 var Global       = xdc.useModule('ti.ndk.config.Global');
127 /* 
128 ** This allows the heart beat (poll function) to be created but does not generate the stack threads 
129 **
130 ** Look in the cdoc (help files) to see what CfgAddEntry items can be configured. We tell it NOT
131 ** to create any stack threads (services) as we configure those ourselves in our Main Task
132 ** thread hpdspuaStart.
133 */  
134 Global.enableCodeGeneration = false;
137 var Startup     =   xdc.useModule('xdc.runtime.Startup');
139 var System      =   xdc.useModule('xdc.runtime.System');
141 /*
142 ** Create a Heap. 
143 */
144 var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
145 var heapMemParams = new HeapMem.Params();
146 heapMemParams.size = 0x8000;
147 heapMemParams.sectionName = "systemHeap";
148 Program.global.heap0 = HeapMem.create(heapMemParams);
150 /* This is the default memory heap. */
151 Memory.defaultHeapInstance  =   Program.global.heap0;
152 Program.sectMap["sharedL2"] = "SDRAM"; 
153 Program.sectMap["systemHeap"] = "SDRAM";
154 Program.sectMap[".sysmem"]  = "SDRAM";
155 Program.sectMap[".args"]    = "SDRAM";
156 Program.sectMap[".cio"]     = "SDRAM";
157 Program.sectMap[".far"]         =       "SDRAM";
158 Program.sectMap[".rodata"]      =       "SDRAM";
159 Program.sectMap[".neardata"]    =       "SDRAM";
160 Program.sectMap[".cppi"]        =       "SDRAM";
161 Program.sectMap[".init_array"]  =       "SDRAM";
162 Program.sectMap[".qmss"]        =       "SDRAM";
163 Program.sectMap[".cinit"]       =       "SDRAM";
164 Program.sectMap[".bss"]         =       "SDRAM";
165 Program.sectMap[".const"]       =       "SDRAM";
166 Program.sectMap[".text"]        =       "SDRAM";
167 Program.sectMap[".code"]        =       "SDRAM";
168 Program.sectMap[".switch"]      =       "SDRAM";
169 Program.sectMap[".data"]        =       "SDRAM";
170 Program.sectMap[".fardata"] =   "SDRAM";
171 Program.sectMap[".args"]        =       "SDRAM";
172 Program.sectMap[".cio"]         =       "SDRAM";
173 Program.sectMap[".vecs"]        =       "SDRAM";
175 Program.sectMap["emacComm"]          = "SDRAM"
178 Program.sectMap[".far:taskStackSection"] = "SDRAM";
179 Program.sectMap[".stack"]       =       "SDRAM";
180 Program.sectMap[".far:IMAGEDATA"] = {loadSegment: "SDRAM", loadAlign: 8};
181 Program.sectMap[".far:NDK_OBJMEM"] = {loadSegment: "SDRAM", loadAlign: 8};
182 Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "SDRAM", loadAlign: 128};
184 /* Required if using System_printf to output on the console */
185 SysStd                          =   xdc.useModule('xdc.runtime.SysStd');
186 System.SupportProxy     =   SysStd;
188 /********************************************************************************************************************
189 * Define hooks and static tasks  that will always be running.                                                                                           *
190  ********************************************************************************************************************/
192 /* 
193 ** Create the stack Thread Task for our application.
194 */
195 var tskNdkStackTest             =   Task.create("&StackTest");
196 tskNdkStackTest.stackSize       =       0x1400;
197 tskNdkStackTest.priority    =   0x5;
199 /* 
200 ** If you are using RTSC configuration with NDK 2.2 and above, this is done by default, else
201 ** register hooks so that the stack can track all Task creation 
202 Task.common$.namedInstance  =   true;
203 Task.addHookSet ({ registerFxn: '&NDK_hookInit', createFxn: '&NDK_hookCreate', });
205 /* Enable BIOS Task Scheduler */
206 BIOS.taskEnabled                        =   true;