Thread 中讨论的其他器件: SYSBIOS
AM5728:向 IPC 项目添加 OpenMP
您好!
我正在尝试向在 AM5728 EVM 上运行的 CCS6项目添加 OpenMP。 此项目使用 IPC 并由 CortexA15/Linux 加载
使用 downloads.ti.com/mctools/esd/docs/openmp-dsp/configuring_runtime.html 中的文档并将工程 cfg 与中示例中的 omp_config.cfg 合并
OpenMP* DSP_am57xx_2_05_00_00/packages/examples/hello_with _make 我在链接时遇到错误
警告#10247-D:在不使用 SECTIONS 规范的情况下创建输出段".tdata"
警告#10247-D:在没有 SECTIONS 规范的情况下创建输出段".tbss"
"configPkg/linker.cmd"、第158行:错误#10099-D:程序不能放入可用内存中。 ".localfar"大小0x84203的段定位失败。 可用存储器范围:
L2SRAM 大小:0x20000 未使用:0x12a57 最大空洞:0x12a57
但请求的最大器件可用容量为0x84203时、L2SRAM 为288 KB (0x48000)。
您是否有解决此问题的建议?
这是我的 cfg:
/*
* ==== Dsp1.cfg ===========
*平台:DRA7XX_Linux_elf
* 目标:TI.targets.elf.c66
*
/*配置对象模型的根*/
VAR 计划= xdc.useModule('xdc.cfg.Program');
/*应用程序使用以下模块和软件包*/
xdc.useModule('xdc.runtime.Assert');
xdc.useModule('xdc.runtime.Diags');
xdc.useModule('xdc.runtime.Error');
xdc.useModule('xdc.runtime.Log');
xdc.useModule('xdc.runtime.Registry');
xdc.useModule('ti.sysbios.knl.Semaphore');
xdc.useModule('ti.sysbios.knl.Task');
/*
* ==== IPC 配置====
*
xdc.useModule('ti.ipc.ipcmgr.IpcMgr');
/*加载跨内核共享的配置 */
Program.global.procName ="DSP1";
var ipc_cfg = xdc.loadCapsule ("../shared/ipc.cfg.xs);
VAR BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.addUserStartupFunction ('&IpcMgr_ipcStartup');
/*覆盖默认资源表以添加 SR0 */
VAR 资源= xdc.useModule('ti.ipc.remoteproc.Resource');
resource.customTable = true;
/*
* ==== SYS/BIOS 配置====
*
if (Program.build.profile =>"debug"){
BIOS.libType = BIOS.LibType_Debug;
}否则{
BIOS.libType = BIOS.LibType_Custom;
}
/*无 RTS 堆*/
program.argSize = 100; /*最小大小*/
program.stack = 0x1000;
VAR 任务= xdc.useModule('ti.sysbios.knl.Task');
Task.common$.namedInstance = true;
/*默认内存堆*/
VAR 内存= xdc.useModule('xdc.runtime.Memory');
VAR HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x8000;
Memory.defaultHeapInstance = HeapMem.create (heapMemParams);
/*为 MessageQ 消息创建堆*/
VAR HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var params = new HeapBuf.Params;
params.align = 8;
params.blocksize = 512;
params.numBlocks = 256;
var msgHeap = HeapBuf.create (params);
VAR MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
MessageQ.registerHeapMeta (msgHeap、0);
/*设置 MessageQ 传输*/
VAR VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
MessageQ.SetupTransportProxy = VirtioSetup;
/*安装名称服务器远程代理*/
var nameserver = xdc.useModule("ti.sdo.utils.NameServer");
VAR NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
nameserver.SetupProxy = NsRemote;
/*启用在 BIOS 资源表上运行的内存转换模块*/
VAR 资源= xdc.useModule('ti.ipc.remoteproc.Resource');
resource.loadSegment ="EXT_CODE";
/* 使用 SysMin、因为 Linux/QNX 需要跟踪缓冲区地址
* 跟踪调试驱动程序、加提供更好的性能。
*
VAR 系统= xdc.useModule('xdc.runtime.System');
VAR SysMin = xdc.useModule('ti.trace.SysMin');
System.SupportProxy = SysMin;
SysMin。bufSize = 0x8000;
Program.sectMap[".tracebuf"]="trace_BUF";
Program.sectMap[".errorbuf"]="EXC_DATA";
Program.sectMap[".fxDelayMem"]="DDR3";
Program.sectMap[".busses"]="DDR3";
Program.sectMap[".sharedMem"]="OCMC_RAM2";
Program.sectMap[".audioIoMem"]="OCMC_RAM2";
Program.sectMap["intRegs"]="L2SRAM";
Program.sectMap[".perfMem"]="OCMC_RAM2";
Program.sectMap[".fxCoefIntMem"]="OCMC_RAM2";
Program.sectMap[".fxFastMem"]="OCMC_RAM2";
Program.sectMap["l2sram"]="OCMC_RAM2";
Program.sectMap["scratchMem"]="L2SRAM";
/*-------------------- 勾选---------------------------------------- *
VAR 时钟= xdc.useModule('ti.sysbios.knl.Clock');
clock.tickSource = Clock.tickSource_NULL;
//Clock.tickSource = Clock.tickSource_user;
/*将 BIOS 时钟源配置为 GPTimer5 */
//Clock.timerId = 0;
VAR 计时器= xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
/*跳过计时器频率验证检查。 需要稍后删除*
Timer.checkFrequency = false;
/*将其与提供 dmTimers 的 SYS_CLK 频率相匹配。
*一旦 SYS/BIOS 系列设置被更新、就不需要。 *
Timer.intFreq.hi = 0;
Timer.intFreq.lo = 19200000;
//var timerParams = new Timer.Params ();
//timerParams.period = Clock.tickPeriod;
//timerParams.periodType = Timer.piodType_microsecs;
/*关闭软件重置以使以下设置生效*/
//timerParams.tiocpCfg.softreset = 0x0;
/*智能空闲唤醒功能模式*/
//timerParams.tiocpCfg.idlemode = 0x3;
/*溢出唤醒生成*/
//timerParams.twer.OVF WUP_ENA = 0x1;
//Timer.create (Clock.timerId、Clock.doTick、timerParams);
VAR 空闲= xdc.useModule('ti.sysbios.knl.Idle');
VAR Deh = xdc.useModule('ti.deh.Deh');
/*必须置于电源管理之前*/
idle.addFunc ('&ti_deh_deh_idleBegin');
/*
* ==== 仪表配置====
*
/*系统记录器*/
VAR LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
VAR LoggerSysParams = new LoggerSys.Params();
VAR 默认值= xdc.useModule('xdc.runtime.Defaults');
Defaults.common$.logger = LoggerSys.create (LoggerSysParams);
/*为非 XDC 规范模块启用运行时 Diags_setMask()*/
VAR 诊断= xdc.useModule('xdc.runtime.Diags');
Diags.setMaskEnabled = true;
/*覆盖选定模块的诊断掩码*/
xdc.useModule('xdc.runtime.Main');
Diags.setMaskMeta("xdc.runtime.Main"、
diags.entry | Diags.exit | Diags.info、Diags.RUNTIME_ON);
VAR 注册表= xdc.useModule('xdc.runtime.Registry');
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
Registry.common$.diags_LIFECYCLE = Diags.RUNTIME_OFF;
Registry.common$.diags_STATUS = Diags.RUNTIME_OFF;
VAR Main = xdc.useModule('xdc.runtime.Main');
Main.common$.diags_ASSERT = Diags.always_on;
Main.common$.diags_INTERNAL = Diags.always_on;
/******** /
/* OpenMP 运行时配置*/
/******** /
//在构建中包含 OMP 运行时
变量 ompSettings = xdc.useModule("ti.runtime.openmp.Settings");
//如果应用程序使用或依赖 BIOS 组件,则设置为 true
ompSettings.usingRtsc = true;
如果(ompSettings.usingRtsc)
{
/*为 BIOS 配置 OpenMP
*- OpenMP* configureCores (masterCoreId、numberofCoresInRuntime)
* 配置主内核的 ID 和内核数
* 可供运行时使用。
*
VAR OpenMP = xdc.useModule('ti.runtime.ompbios.OpenMP');
//配置主内核的索引和可用内核的数量
//到运行时。 内核是连续的。
OpenMP*主 CoreIdx = 0;
OpenMP*= 2;
//拉入 Platform.XDC 中描述的内存范围以配置运行时
VAR DDR3 = Program.cpu.memoryMap["DDR3"];
VAR DDR3_NC = Program.cpu.memoryMap["DDR3_NC";
//使用内存范围信息初始化运行时间
OpenMP*分配堆栈= true;
OpenMP*分配堆栈 FromHeapSize = 0x010000;
OpenMP* HASMsmc =错误;
OpenMP*版 NoCacheBase = DDR3_NC.base;
OpenMP*版 NoCacheSize = DDR3_NC.len;
OpenMP* ddrBase = ddr3.base;
OpenMP* ddrSize = ddr3.len;
//使用 HeapOMP 配置内存分配
// HeapOMP 句柄
//- BIOS 组件发出的内存分配请求(内核本地内存)
//-使用 IPC 模块启用共享内存分配
// 从同一堆中分配内存的多个内核-由 malloc 使用
OpenMP.useIpcSharedHeap = false;
OpenMP*分配本地 HeapSize = 0x8000
OpenMP*分配共享 HeapSize = 0x00800000
VAR 启动= xdc.useModule('xdc.runtime.Startup');
startup.lastFxns.$add ("&_TI_omp_initialize_rtsc_mode");
}
其他
{
/*调整堆的大小。 必须将其放置在共享存储器中*
program.heap = sharedHeapSize;
}