summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSinthu Raja M2019-05-20 01:16:30 -0500
committerMahesh Radhakrishnan2019-06-08 09:48:56 -0500
commit111fa6b405e4659b90dfe01ccc807d51bf7a9006 (patch)
tree09e504722767f0878d69240df282611dc60927dd
parent4af4d3123730f97ad49d8a4c690f74f0f4d8e576 (diff)
downloadmcasp-lld-111fa6b405e4659b90dfe01ccc807d51bf7a9006.tar.gz
mcasp-lld-111fa6b405e4659b90dfe01ccc807d51bf7a9006.tar.xz
mcasp-lld-111fa6b405e4659b90dfe01ccc807d51bf7a9006.zip
PRSDK-4453 Add SMP enabled support for A53 and A15 core
Update makefile and component makefile to add entry for SMP enabled examples Add project text file and config file to add SMP enabled support for AM572x A15 core
-rw-r--r--example/MCASP_AudioLoopback_TestApp/makefile13
-rw-r--r--example/evmAM572x/armv7/bios/AudioLoopback_smp.cfg295
-rw-r--r--example/evmAM572x/armv7/bios/MCASP_Audio_evmAM572x_SMP_armExampleProject.txt12
-rw-r--r--example/evmAM65xx/a53/mcaspUnitTest_a53.cfg13
-rw-r--r--mcasp_component.mk23
5 files changed, 349 insertions, 7 deletions
diff --git a/example/MCASP_AudioLoopback_TestApp/makefile b/example/MCASP_AudioLoopback_TestApp/makefile
index 6487403..c3c7cce 100644
--- a/example/MCASP_AudioLoopback_TestApp/makefile
+++ b/example/MCASP_AudioLoopback_TestApp/makefile
@@ -1,9 +1,14 @@
1# Makefile for McASP device loopback unit test app 1# Makefile for McASP device loopback unit test app
2include $(PDK_INSTALL_PATH)/ti/build/Rules.make 2include $(PDK_INSTALL_PATH)/ti/build/Rules.make
3export DISABLE_RECURSE_DEPS 3#export DISABLE_RECURSE_DEPS
4 4
5#Name of the directory created under packages/ti/binary/ 5ifeq ($(SMP), enable)
6APP_NAME = MCASP_AudioLoopback_TestApp 6 #Name of the directory created under packages/ti/binary/
7 APP_NAME = MCASP_AudioLoopback_SMP_TestApp
8else
9 #Name of the directory created under packages/ti/binary/
10 APP_NAME = MCASP_AudioLoopback_TestApp
11endif
7 12
8SRCDIR = ../src ../../ 13SRCDIR = ../src ../../
9INCDIR = ../src ../include ../../ 14INCDIR = ../src ../include ../../
diff --git a/example/evmAM572x/armv7/bios/AudioLoopback_smp.cfg b/example/evmAM572x/armv7/bios/AudioLoopback_smp.cfg
new file mode 100644
index 0000000..0f22159
--- /dev/null
+++ b/example/evmAM572x/armv7/bios/AudioLoopback_smp.cfg
@@ -0,0 +1,295 @@
1/**
2 * \file AudiioLoopback_smp.cfg
3 *
4 * \brief Sysbios config file for mmcsd test project on AM572X GP EVM
5 * with SMP enabled.
6 *
7 */
8
9/*
10 * Copyright (C) 2019 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 */
41/* ========================================================================== */
42/* CFG script for the Audio sample */
43/* ========================================================================== */
44var Defaults = xdc.useModule('xdc.runtime.Defaults');
45var Diags = xdc.useModule('xdc.runtime.Diags');
46var Error = xdc.useModule('xdc.runtime.Error');
47var Log = xdc.useModule('xdc.runtime.Log');
48var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
49var Main = xdc.useModule('xdc.runtime.Main');
50var Memory = xdc.useModule('xdc.runtime.Memory')
51var SysMin = xdc.useModule('xdc.runtime.SysMin');
52var System = xdc.useModule('xdc.runtime.System');
53var Text = xdc.useModule('xdc.runtime.Text');
54var Clock = xdc.useModule('ti.sysbios.knl.Clock');
55var Swi = xdc.useModule('ti.sysbios.knl.Swi');
56var Task = xdc.useModule ("ti.sysbios.knl.Task");
57var Sem = xdc.useModule("ti.sysbios.knl.Semaphore");
58var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
59var ti_sysbios_family_arm_gic_Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
60var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
61
62/* load the required files and packages */
63var GIO = xdc.useModule('ti.sysbios.io.GIO');
64var BIOS = xdc.useModule ("ti.sysbios.BIOS");
65var SysStd = xdc.useModule('xdc.runtime.SysStd');
66
67var HeapMem = xdc.useModule ("ti.sysbios.heaps.HeapMem");
68
69var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
70var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
71var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
72
73/* Enable SMP in BIOS */
74BIOS.smpEnabled = true;
75
76var socType = "am572x";
77
78var Csl = xdc.useModule('ti.csl.Settings');
79Csl.deviceType = "am572x";
80
81/* Load the OSAL package */
82var osType = "tirtos"
83var Osal = xdc.useModule('ti.osal.Settings');
84Osal.osType = osType;
85Osal.socType = socType;
86
87/* Load the driver packages, starting with mcasp */
88var McASP = xdc.loadPackage('ti.drv.mcasp');
89McASP.Settings.socType = socType;
90
91/* Load the i2c package */
92var I2C = xdc.loadPackage('ti.drv.i2c');
93I2C.Settings.socType = socType;
94
95/* Load the uart package */
96var Uart = xdc.loadPackage('ti.drv.uart');
97Uart.Settings.socType = socType;
98
99/* Load the Board package and set the board name */
100var Board = xdc.loadPackage('ti.board');
101Board.Settings.boardName = "evmAM572x";
102
103/*
104 * The BIOS module will create the default heap for the system.
105 * Specify the size of this default heap.
106 */
107BIOS.heapSize = 0x2000;
108BIOS.cpuFreq.lo = 1000000000;
109BIOS.libType = BIOS.LibType_Custom;
110
111/* Enable the cache */
112var Cache = xdc.useModule('ti.sysbios.hal.Cache');
113
114
115/* Enable the MMU (Required for L1/L2 caching) */
116
117/***********************************************
118 * MMU Configuration *
119 ***********************************************/
120var Mmu = xdc.useModule('ti.sysbios.family.arm.a15.Mmu');
121Mmu.enableMMU = true;
122
123/******************************************************************************
124 *
125 * SYS/BIOS assigns the following defaults to MAIR0 ATTR0, ATTR1 and ATTR2:
126 *
127 * ATTR0 -> 0x44 (mark memory region as non-cacheable normal memory)
128 * ATTR1 -> 0x04 (mark memory region as device memory, i.e. strongly
129 * ordered and non-cacheable)
130 * ATTR2 -> 0xFF (mark memory region as normal memory, RW cacheable and
131 * RW allocate)
132 ******************************************************************************
133 */
134
135
136// descriptor attribute structure
137var attrs0 = new Mmu.DescriptorAttrs();
138
139Mmu.initDescAttrsMeta(attrs0);
140attrs0.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor
141attrs0.shareable = 2; // sharerable
142attrs0.accPerm=0; // read/write at PL1
143attrs0.noExecute = true;
144attrs0.attrIndx = 1; // Non-cache, device memory
145
146Mmu.setSecondLevelDescMeta(0x4ae00000, 0x4ae00000, attrs0);
147Mmu.setSecondLevelDescMeta(0x4a4E0000, 0x4a4E0000, attrs0);
148
149/* DMA Cross bar config */
150Mmu.setSecondLevelDescMeta(0x4A000000, 0x4A000000, attrs0);
151/*
152// Set the descriptor for each entry in the address range
153for (var i=0x40000000; i < 0x60000000; i = i + 0x00200000) {
154 // Each 'BLOCK' descriptor entry spans a 2MB address range
155 Mmu.setSecondLevelDescMeta(i, i, attrs0);
156}
157*/
158/* edma */
159for (var i=0x43300000; i < 0x43520000; i = i + 0x00200000) {
160 // Each 'BLOCK' descriptor entry spans a 2MB address range
161 Mmu.setSecondLevelDescMeta(i, i, attrs0);
162}
163
164/* I2C */
165for (var i=0x48060000; i < 0x48080000; i = i + 0x00200000) {
166 // Each 'BLOCK' descriptor entry spans a 2MB address range
167 Mmu.setSecondLevelDescMeta(i, i, attrs0);
168}
169
170/* mcasp */
171for (var i=0x45800000; i < 0x47000000; i = i + 0x00200000) {
172 // Each 'BLOCK' descriptor entry spans a 2MB address range
173 Mmu.setSecondLevelDescMeta(i, i, attrs0);
174}
175
176/* mcasp contd */
177for (var i=0x48436000; i < 0x48480000; i = i + 0x00200000) {
178 // Each 'BLOCK' descriptor entry spans a 2MB address range
179 Mmu.setSecondLevelDescMeta(i, i, attrs0);
180}
181
182
183/*
184// descriptor attribute structure
185var attrs1 = new Mmu.DescriptorAttrs();
186
187Mmu.initDescAttrsMeta(attrs1);
188attrs1.type = Mmu.DescriptorType_BLOCK; // BLOCK descriptor
189attrs1.noExecute = true;
190attrs1.accPerm=0; // read/write at PL1
191attrs1.shareable = 2; // sharerable
192attrs1.attrIndx = 2; // Cached, normal memory
193
194
195// Set the descriptor for each entry in the address range
196for (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
202var attrs = new Mmu.DescriptorAttrs();
203Mmu.initDescAttrsMeta(attrs);
204attrs.type = Mmu.DescriptorType_BLOCK;
205attrs.noExecute = true;
206attrs.accPerm = 0;
207attrs.attrIndx = 1;
208/* Set IO Delay configuration areas as non-cache */
209Mmu.setSecondLevelDescMeta(0x4844a000, 0x4844a000, attrs);
210Mmu.setSecondLevelDescMeta(0x4ae07d00, 0x4ae07d00, attrs);
211
212
213/*
214 * Program.argSize sets the size of the .args section.
215 * The examples don't use command line args so argSize is set to 0.
216 */
217Program.argSize = 0x0;
218
219/* System stack size (used by ISRs and Swis) */
220Program.stack = 0x20000;
221
222/*
223 * Minimize exit handler array in System. The System module includes
224 * an array of functions that are registered with System_atexit() to be
225 * called by System_exit().
226 */
227System.maxAtexitHandlers = 4;
228
229/* Circular buffer size for System_printf() */
230SysMin.bufSize = 0x200;
231System.SupportProxy = SysMin;
232
233/*
234 * Create and install logger for the whole system
235 */
236/*
237 * Create and install logger for the whole system
238 */
239var loggerBufParams = new LoggerBuf.Params();
240loggerBufParams.numEntries = 16;
241var logger0 = LoggerBuf.create(loggerBufParams);
242Defaults.common$.logger = logger0;
243Main.common$.diags_INFO = Diags.ALWAYS_ON;
244
245if (Program.build.target.$name.match(/gnu/)) {
246 if (Program.build.target.$name.match(/A8F/) ||
247 Program.build.target.$name.match(/A9F/) ||
248 Program.build.target.$name.match(/A15F/)) {
249 var SemiHost = xdc.useModule('ti.sysbios.rts.gnu.SemiHostSupport');
250 }
251}
252
253
254/* allocate a config-params object */
255var HeapParam = new HeapMem.Params;
256
257/* optionally assign per-instance configs */
258HeapParam.size = 200000;
259//HeapParam.sectionName = "L2SRAM"
260
261/* create an instance-object */
262Program.global.myHeap = HeapMem.create(HeapParam);
263
264var task0Params = new Task.Params();
265task0Params.priority = 5;
266task0Params.instance.name = "task0";
267
268Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);
269
270//Program.sectMap[".text"] = "L2SRAM";
271// chnaging default tick of timer to 100us from default 1000us
272var Clock = xdc.useModule('ti.sysbios.knl.Clock');
273Clock.tickPeriod = 1000;
274
275
276
277var Load = xdc.useModule('ti.sysbios.utils.Load');
278 // Load.common$.logger = loggerBuf0;
279var Diags = xdc.useModule('xdc.runtime.Diags');
280Load.common$.diags_USER4 = Diags.ALWAYS_ON;
281
282
283
284/* No runtime stack checking is performed */
285// Task.checkStackFlag = false;
286
287
288/* Reduce the number of task priorities */
289// Task.numPriorities = 6;
290
291
292
293/* ================ Memory sections configuration ================ */
294Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
295Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";
diff --git a/example/evmAM572x/armv7/bios/MCASP_Audio_evmAM572x_SMP_armExampleProject.txt b/example/evmAM572x/armv7/bios/MCASP_Audio_evmAM572x_SMP_armExampleProject.txt
new file mode 100644
index 0000000..c91f0a7
--- /dev/null
+++ b/example/evmAM572x/armv7/bios/MCASP_Audio_evmAM572x_SMP_armExampleProject.txt
@@ -0,0 +1,12 @@
1-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/src/audioSample_io.c"
2-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/src/audioSample_main.c"
3-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/src/aic3104_if.c"
4-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/src/aic31.c"
5-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/src/codec_if.c"
6-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/evmAM572x/src/audio_evmInit.c"
7-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/evmAM572x/src/mcasp_cfg.c"
8-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/soc/am572x/mcasp_soc.c"
9-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/i2c/soc/am572x/I2C_soc.c"
10-ccs.linkFile "${PDK_INSTALL_PATH}/ti/drv/mcasp/example/evmAM572x/armv7/bios/AudioLoopback_smp.cfg"
11-ccs.setCompilerOptions "-c -mcpu=cortex-a15 -mtune=cortex-a15 -march=armv7-a -marm -mfloat-abi=hard -DMCASP_MASTER -DAIC_CODEC -DSOC_AM572x -DEVM_AM572X -g -gstrict-dwarf -Wall -MMD -MP -I${PDK_INSTALL_PATH} -I${PDK_INSTALL_PATH}/ti/drv/mcasp/example/include -I${PDK_INSTALL_PATH}/ti/drv/mcasp/example/evmAM572x/include -I${PDK_INSTALL_PATH}/ti/drv/mcasp/include -I${PDK_INSTALL_PATH}/ti/drv/mcasp -I${PDK_INSTALL_PATH}/ti/board" -rtsc.enableRtsc
12-ccs.setLinkerOptions "-lrdimon -lgcc -lm -lnosys -nostartfiles -static -Wl,--gc-sections "
diff --git a/example/evmAM65xx/a53/mcaspUnitTest_a53.cfg b/example/evmAM65xx/a53/mcaspUnitTest_a53.cfg
index 37e6f12..5459e05 100644
--- a/example/evmAM65xx/a53/mcaspUnitTest_a53.cfg
+++ b/example/evmAM65xx/a53/mcaspUnitTest_a53.cfg
@@ -1,6 +1,6 @@
1 1
2/* ============================================================================= 2/* =============================================================================
3 * Copyright (c) Texas Instruments Incorporated 2017 3 * Copyright (c) Texas Instruments Incorporated 2017-2019
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -173,7 +173,16 @@ var HeapParam = new HeapMem.Params;
173 173
174/* optionally assign per-instance configs */ 174/* optionally assign per-instance configs */
175HeapParam.size = 200000; 175HeapParam.size = 200000;
176 176
177/* Enable SMP mode in BIOS if SMP is enabled from makefile */
178var smp = java.lang.System.getenv("SMP")
179if(smp == 'enable')
180{
181 xdc.print("Enabling BIOS SMP mode");
182 BIOS.smpEnabled = true;
183 var Cache = xdc.module("ti.sysbios.hal.Cache");
184}
185
177/* create an instance-object */ 186/* create an instance-object */
178Program.global.myHeap = HeapMem.create(HeapParam); 187Program.global.myHeap = HeapMem.create(HeapParam);
179 188
diff --git a/mcasp_component.mk b/mcasp_component.mk
index 635795a..a1231cc 100644
--- a/mcasp_component.mk
+++ b/mcasp_component.mk
@@ -97,7 +97,7 @@ drvmcasp_LIB_LIST = $(mcasp_LIB_LIST)
97# All the tests mentioned in list are built when test target is called 97# All the tests mentioned in list are built when test target is called
98# List below all examples for allowed values 98# List below all examples for allowed values
99############################ 99############################
100mcasp_EXAMPLE_LIST = MCASP_AudioLoopback_TestApp MCASP_DeviceLoopback_TestApp MCASP_DeviceLoopback_Regression_TestApp 100mcasp_EXAMPLE_LIST = MCASP_AudioLoopback_TestApp MCASP_AudioLoopback_SMP_TestApp MCASP_DeviceLoopback_TestApp MCASP_DeviceLoopback_Regression_TestApp
101 101
102# 102#
103# MCASP Modules 103# MCASP Modules
@@ -179,6 +179,27 @@ export MCASP_AudioLoopback_TestApp_BOARDLIST
179MCASP_AudioLoopback_TestApp_$(SOC)_CORELIST = $(drvmcasp_$(SOC)_CORELIST) 179MCASP_AudioLoopback_TestApp_$(SOC)_CORELIST = $(drvmcasp_$(SOC)_CORELIST)
180export MCASP_AudioLoopback_TestApp_$(SOC)_CORELIST 180export MCASP_AudioLoopback_TestApp_$(SOC)_CORELIST
181 181
182
183# McASP Audio Loopback example app with SMP enabled
184MCASP_AudioLoopback_SMP_TestApp_COMP_LIST = MCASP_AudioLoopback_SMP_TestApp
185MCASP_AudioLoopback_SMP_TestApp_RELPATH = ti/drv/mcasp/example/MCASP_AudioLoopback_TestApp
186MCASP_AudioLoopback_SMP_TestApp_PATH = $(PDK_MCASP_COMP_PATH)/example/MCASP_AudioLoopback_TestApp
187MCASP_AudioLoopback_SMP_TestApp_MAKEFILE = -f makefile SMP=enable
188MCASP_AudioLoopback_SMP_TestApp_BOARD_DEPENDENCY = yes
189MCASP_AudioLoopback_SMP_TestApp_CORE_DEPENDENCY = no
190MCASP_AudioLoopback_SMP_TestApp_XDC_CONFIGURO = yes
191export MCASP_AudioLoopback_SMP_TestApp_COMP_LIST
192export MCASP_AudioLoopback_SMP_TestApp_BOARD_DEPENDENCY
193export MCASP_AudioLoopback_SMP_TestApp_CORE_DEPENDENCY
194export MCASP_AudioLoopback_SMP_TestApp_XDC_CONFIGURO
195export MCASP_AudioLoopback_SMP_TestApp_MAKEFILE
196MCASP_AudioLoopback_SMP_TestApp_PKG_LIST = MCASP_AudioLoopback_SMP_TestApp
197MCASP_AudioLoopback_SMP_TestApp_INCLUDE = $(MCASP_AudioLoopback_SMP_TestApp_PATH)
198MCASP_AudioLoopback_SMP_TestApp_BOARDLIST = am65xx_evm am65xx_idk
199export MCASP_AudioLoopback_TestApp_BOARDLIST
200MCASP_AudioLoopback_SMP_TestApp_$(SOC)_CORELIST = mpu1_0
201export MCASP_AudioLoopback_SMP_TestApp_$(SOC)_CORELIST
202
182# McASP sysbios unit test app 203# McASP sysbios unit test app
183MCASP_DeviceLoopback_TestApp_COMP_LIST = MCASP_DeviceLoopback_TestApp 204MCASP_DeviceLoopback_TestApp_COMP_LIST = MCASP_DeviceLoopback_TestApp
184MCASP_DeviceLoopback_TestApp_RELPATH = ti/drv/mcasp/example/MCASP_DeviceLoopback_TestApp 205MCASP_DeviceLoopback_TestApp_RELPATH = ti/drv/mcasp/example/MCASP_DeviceLoopback_TestApp