diff options
author | Sinthu Raja M | 2017-11-15 09:44:18 -0600 |
---|---|---|
committer | Pratap Reddy | 2017-11-15 13:45:52 -0600 |
commit | b5b48a330279f84b0f47a580515770c11f0418b8 (patch) | |
tree | 14bda534dea0f99dda4eddbc8f8cf5f4a0d04465 | |
parent | 2ad512d9bba991e1bfa20e4ddd071edfbca072b9 (diff) | |
download | pruss-lld-b5b48a330279f84b0f47a580515770c11f0418b8.tar.gz pruss-lld-b5b48a330279f84b0f47a580515770c11f0418b8.tar.xz pruss-lld-b5b48a330279f84b0f47a580515770c11f0418b8.zip |
PRSDK-3190 Add cfg file of sorte example for AM574
Added cfg file of sorte example for AM574x
Signed-off-by: Pratap Reddy <x0257344@ti.com>
-rw-r--r-- | example/apps/sorte/src/sorte_idkAM574x_app.cfg | 204 |
1 files changed, 204 insertions, 0 deletions
diff --git a/example/apps/sorte/src/sorte_idkAM574x_app.cfg b/example/apps/sorte/src/sorte_idkAM574x_app.cfg new file mode 100644 index 0000000..692f6da --- /dev/null +++ b/example/apps/sorte/src/sorte_idkAM574x_app.cfg | |||
@@ -0,0 +1,204 @@ | |||
1 | /* ================ General configuration ================ */ | ||
2 | var Defaults = xdc.useModule('xdc.runtime.Defaults'); | ||
3 | var Diags = xdc.useModule('xdc.runtime.Diags'); | ||
4 | var Error = xdc.useModule('xdc.runtime.Error'); | ||
5 | var Log = xdc.useModule('xdc.runtime.Log'); | ||
6 | var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf'); | ||
7 | var Main = xdc.useModule('xdc.runtime.Main'); | ||
8 | var Memory = xdc.useModule('xdc.runtime.Memory') | ||
9 | var System = xdc.useModule('xdc.runtime.System'); | ||
10 | var Text = xdc.useModule('xdc.runtime.Text'); | ||
11 | var Clock = xdc.useModule('ti.sysbios.knl.Clock'); | ||
12 | var Swi = xdc.useModule('ti.sysbios.knl.Swi'); | ||
13 | var Task = xdc.useModule('ti.sysbios.knl.Task'); | ||
14 | var Mailbox = xdc.useModule('ti.sysbios.knl.Mailbox'); | ||
15 | var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore'); | ||
16 | var ti_sysbios_hal_Hwi = xdc.useModule('ti.sysbios.hal.Hwi'); | ||
17 | var SemiHostSupport = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport'); | ||
18 | var Program = xdc.useModule("xdc.cfg.Program"); | ||
19 | var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer'); | ||
20 | /* | ||
21 | * Program.argSize sets the size of the .args section. | ||
22 | * The examples don't use command line args so argSize is set to 0. | ||
23 | */ | ||
24 | Program.argSize = 0x0; | ||
25 | Program.heap = 0x10000; | ||
26 | |||
27 | /* System stack size (used by ISRs and Swis) */ | ||
28 | Program.stack = 0x10000; | ||
29 | |||
30 | /* | ||
31 | * Uncomment this line to globally disable Asserts. | ||
32 | * All modules inherit the default from the 'Defaults' module. You | ||
33 | * can override these defaults on a per-module basis using Module.common$. | ||
34 | * Disabling Asserts will save code space and improve runtime performance. | ||
35 | Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF; | ||
36 | */ | ||
37 | |||
38 | /* | ||
39 | * Uncomment this line to keep module names from being loaded on the target. | ||
40 | * The module name strings are placed in the .const section. Setting this | ||
41 | * parameter to false will save space in the .const section. Error and | ||
42 | * Assert messages will contain an "unknown module" prefix instead | ||
43 | * of the actual module name. | ||
44 | Defaults.common$.namedModule = false; | ||
45 | */ | ||
46 | |||
47 | /* | ||
48 | * Minimize exit handler array in System. The System module includes | ||
49 | * an array of functions that are registered with System_atexit() to be | ||
50 | * called by System_exit(). | ||
51 | */ | ||
52 | /*System.maxAtexitHandlers = 4;*/ | ||
53 | |||
54 | /* | ||
55 | * Uncomment this line to disable the Error print function. | ||
56 | * We lose error information when this is disabled since the errors are | ||
57 | * not printed. Disabling the raiseHook will save some code space if | ||
58 | * your app is not using System_printf() since the Error_print() function | ||
59 | * calls System_printf(). | ||
60 | Error.raiseHook = null; | ||
61 | */ | ||
62 | |||
63 | /* | ||
64 | * Uncomment this line to keep Error, Assert, and Log strings from being | ||
65 | * loaded on the target. These strings are placed in the .const section. | ||
66 | * Setting this parameter to false will save space in the .const section. | ||
67 | * Error, Assert and Log message will print raw ids and args instead of | ||
68 | * a formatted message. | ||
69 | Text.isLoaded = false; | ||
70 | */ | ||
71 | |||
72 | /* | ||
73 | * Create and install logger for the whole system | ||
74 | */ | ||
75 | var loggerBufParams = new LoggerBuf.Params(); | ||
76 | loggerBufParams.numEntries = 16; | ||
77 | var logger0 = LoggerBuf.create(loggerBufParams); | ||
78 | Defaults.common$.logger = logger0; | ||
79 | Main.common$.diags_INFO = Diags.ALWAYS_ON; | ||
80 | SysStd = xdc.useModule('xdc.runtime.SysStd'); | ||
81 | System.SupportProxy = SysStd; | ||
82 | |||
83 | /* ================ BIOS configuration ================ */ | ||
84 | |||
85 | var BIOS = xdc.useModule('ti.sysbios.BIOS'); | ||
86 | /* | ||
87 | * Build a custom SYS/BIOS library from sources. | ||
88 | */ | ||
89 | BIOS.libType = BIOS.LibType_Custom; | ||
90 | BIOS.assertsEnabled = true; | ||
91 | BIOS.logsEnabled = true; | ||
92 | /* | ||
93 | * The BIOS module will create the default heap for the system. | ||
94 | * Specify the size of this default heap. | ||
95 | */ | ||
96 | BIOS.heapSize = 0xA0000; | ||
97 | |||
98 | Semaphore.supportsEvents = false; | ||
99 | Defaults.common$.diags_INTERNAL = Diags.ALWAYS_ON; | ||
100 | |||
101 | Task.defaultStackSize = 4096; | ||
102 | Task.idleTaskStackSize = 4096; | ||
103 | BIOS.cpuFreq.lo = 500000000; | ||
104 | |||
105 | Program.sectMap[".c_int00"] = new Program.SectionSpec(); | ||
106 | Program.sectMap[".c_int00"].loadAddress = 0x80000000; | ||
107 | |||
108 | |||
109 | /* ================ Task configuration ================ */ | ||
110 | |||
111 | /* Define and add one Task Hook Set */ | ||
112 | Task.addHookSet({ | ||
113 | registerFxn: '&TaskRegisterId', | ||
114 | switchFxn: '&mySwitch', | ||
115 | }); | ||
116 | |||
117 | /* ================ Driver configuration ================ */ | ||
118 | |||
119 | /* Load the OSAL package */ | ||
120 | var osType = "tirtos" | ||
121 | var Osal = xdc.useModule('ti.osal.Settings'); | ||
122 | Osal.osType = osType; | ||
123 | |||
124 | |||
125 | /* Load the CSL Package */ | ||
126 | var deviceType = "am574x"; | ||
127 | var socType = deviceType; | ||
128 | /* Load the CSL package */ | ||
129 | var Csl = xdc.loadPackage('ti.csl'); | ||
130 | Csl.Settings.deviceType = deviceType; | ||
131 | |||
132 | /* Load the UART package */ | ||
133 | var Uart = xdc.loadPackage('ti.drv.uart'); | ||
134 | /* Load the I2c package */ | ||
135 | var I2c = xdc.loadPackage('ti.drv.i2c'); | ||
136 | /* Load the PRUSS package */ | ||
137 | var Pruss = xdc.loadPackage('ti.drv.pruss'); | ||
138 | Pruss.Settings.socType = socType; | ||
139 | |||
140 | /* Load Profiling package */ | ||
141 | var Utils = xdc.loadPackage('ti.utils.profiling'); | ||
142 | |||
143 | var socType = "am574x"; | ||
144 | |||
145 | /* Load the board package */ | ||
146 | var Board = xdc.loadPackage('ti.board'); | ||
147 | Board.Settings.boardName = "idkAM574x"; | ||
148 | |||
149 | /* ================ Cache and MMU configuration ================ */ | ||
150 | |||
151 | var Cache1 = xdc.useModule('ti.sysbios.family.arm.a15.Cache'); | ||
152 | Cache1.enableCache = true; | ||
153 | |||
154 | /*********************************************** | ||
155 | * MMU Configuration * | ||
156 | ***********************************************/ | ||
157 | var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu'); | ||
158 | Mmu.enableMMU = true; | ||
159 | |||
160 | /****************************************************************************** | ||
161 | * | ||
162 | * SYS/BIOS assigns the following defaults to MAIR0 ATTR0, ATTR1 and ATTR2: | ||
163 | * | ||
164 | * ATTR0 -> 0x44 (mark memory region as non-cacheable normal memory) | ||
165 | * ATTR1 -> 0x04 (mark memory region as device memory, i.e. strongly | ||
166 | * ordered and non-cacheable) | ||
167 | * ATTR2 -> 0xFF (mark memory region as normal memory, RW cacheable and | ||
168 | * RW allocate) | ||
169 | ****************************************************************************** | ||
170 | */ | ||
171 | |||
172 | |||
173 | // descriptor attribute structure | ||
174 | var attrs0 = new Mmu.DescriptorAttrs(); | ||
175 | |||
176 | Mmu.initDescAttrsMeta(attrs0); | ||
177 | attrs0.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor | ||
178 | attrs0.shareable = 2; // sharerable | ||
179 | attrs0.attrIndx = 1; // Non-cache, device memory | ||
180 | |||
181 | // Set the descriptor for each entry in the address range | ||
182 | for (var i=0x40000000; i < 0x60000000; i = i + 0x00200000) { | ||
183 | // Each 'BLOCK' descriptor entry spans a 2MB address range | ||
184 | Mmu.setSecondLevelDescMeta(i, i, attrs0); | ||
185 | } | ||
186 | |||
187 | // descriptor attribute structure | ||
188 | var attrs1 = new Mmu.DescriptorAttrs(); | ||
189 | |||
190 | Mmu.initDescAttrsMeta(attrs1); | ||
191 | attrs1.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor | ||
192 | attrs1.shareable = 2; // sharerable | ||
193 | attrs1.attrIndx = 2; // Cached, normal memory | ||
194 | |||
195 | // Set the descriptor for each entry in the address range | ||
196 | for (var i=0x80000000; i < 0xA0000000; i = i + 0x00200000) { | ||
197 | // Each 'BLOCK' descriptor entry spans a 2MB address range | ||
198 | Mmu.setSecondLevelDescMeta(i, i, attrs1); | ||
199 | } | ||
200 | |||
201 | |||
202 | /* ================ Memory sections configuration ================ */ | ||
203 | Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1"; | ||
204 | Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1"; | ||