我现在已经实现了 SPI NOR FLASH的固化启动,使用的是每个core一个工程,但8核共用一份源码,编译后用工具生成.dat文件的方法。
现在想MessageQ示例工程的功能移植到我的工程里,参照示例工程的cfg文件在我的core0工程里增加cfg文件,编译就出现错误"../LedTest.cmd", line 7: error #10264: DDR3 memory range overlaps existing”,可是找不到问题所在,附上CMD文件和cfg文件,请大神帮忙分析一下。
另外,请问每个core的项目是否都要添加cfg文件?还是只在core0增加就行呢?麻烦指点迷津,谢谢!
========================================================================================================================
CMD文件如下:
-stack 0x1000
-heap 0x400
MEMORY
{
//CORE0
//DDR3 : o = 0x80000000, l = 0x01000000
BOOT_CORE0 : o = 0x10800000, l = 0x000000c0
L2 : o = 0x108000c0, l = 0x0007FF40
}
SECTIONS
{
.text > L2
.DDRText{MulticoreBoot.obj(.text)}>L2
.stack > L2
.cio > DDR3
.bss > DDR3
.const > DDR3
.far > DDR3
.fardata > DDR3
.neardata > DDR3
.switch > DDR3
.sysmem > DDR3
platform_lib > DDR3
.cinit > DDR3
.myboot
{
*.*<boot.obj>(.text)
} > BOOT_CORE0
}
======================================================================================================================
cfg文件如下:
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
/*
* Get the list of names that the build device supports.
* I.e. ["CORE0", "CORE1", "CORE2" … ]
*/
var nameList = MultiProc.getDeviceProcNames();
/* * Since this is a single-image example, we don't (at build-time) which * processor we're building for. We therefore supply 'null' * as the local procName and allow IPC to set the local procId at runtime.
*/
MultiProc.setConfig(null, nameList);
/* * The SysStd System provider is a good one to use for debugging * but does not have the best performance. Use xdc.runtime.SysMin
* for better performance.
*/
var System = xdc.useModule('xdc.runtime.System');
var SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
/* Modules explicitly used in the application */
var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
var HeapBufMP = xdc.useModule('ti.sdo.ipc.heaps.HeapBufMP');
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
/* BIOS/XDC modules */
var BIOS = xdc.useModule('ti.sysbios.BIOS');
BIOS.heapSize = 0x8000;
var Task = xdc.useModule('ti.sysbios.knl.Task');
/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;
/* Shared Memory base address and length */
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00100000;
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM, len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "DDR2 RAM",
});
Jane Lu:
Michael,
如果每个核都要跑messageQ代码或者BIOS代码,需要每个核的工程都添加cfg文件。 MCSDK 安装包里syslib模块下有多核的例子。路径为 syslib_xxxxxxxxx\packages\ti\runtime\msgcom\test
Michael Fassbender:
回复 Jane Lu:
非常感谢您的回复!想再问一个问题,添加了一个空的cfg文件系统是不是依然会对DDR3的空间有所配置,问什么我的cfg文件是空的单编译时依然提示“error #10264: DDR3 memory range overlaps existing”?