我要用c6678做fft的以太网传输,现在,我的程序编译是通过的,但运行有问题,只实现了fft功能,以太网功能实现不了。如所图所示,图中显示有两个问题,一个是cio ,一个是heap的内存分配问题,源于heap内存,我不断加大内存,但还是不够,这是为什么呢。我觉得程序在NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr )语句中就退出了(以太网传输用了socket)。请各大神指教!以下是我的cfg文件内容。
var BIOS = xdc.useModule ("ti.sysbios.BIOS");
var Task = xdc.useModule ("ti.sysbios.knl.Task");
var ECM = xdc.useModule ("ti.sysbios.family.c64p.EventCombiner");
var C64_Hwi = xdc.useModule ("ti.sysbios.family.c64p.Hwi");
var Startup = xdc.useModule ("xdc.runtime.Startup");
var System = xdc.useModule ("xdc.runtime.System");
var Log = xdc.useModule ("xdc.runtime.Log");
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Cache = xdc.useModule('ti.sysbios.hal.Cache');
var CpIntc = xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Memory = xdc.useModule('xdc.runtime.Memory');
var Sem = xdc.useModule ('ti.sysbios.knl.Semaphore');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Csl = xdc.useModule('ti.csl.Settings');
var Cppi = xdc.loadPackage('ti.drv.cppi');
var Qmss = xdc.loadPackage('ti.drv.qmss');
var Pa = xdc.useModule('ti.drv.pa.Settings');
var PlatformLib = xdc.loadPackage('ti.platform.evmc6678l');
var NdkTransport = xdc.loadPackage('ti.transport.ndk');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Exc = xdc.useModule('ti.sysbios.family.c64p.Exception');
Exc.common$.logger = LoggerBuf.create();
Exc.enablePrint = true; /* prints exception details to the CCS console */
/* ar loggerBufParams = new LoggerBuf.Params();
loggerBufParams.exitFlush = true;
loggerBufParams.numEntries = 64;
Load.common$.logger = LoggerBuf.create(loggerBufParams);
*/
var Global = xdc.useModule('ti.ndk.config.Global');
Global.enableCodeGeneration = false;
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x300000;
heapMemParams.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams);
SysStd = xdc.useModule('xdc.runtime.SysStd');
System.SupportProxy = SysStd;
BIOS.taskEnabled = true;
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
/*var SHAREDMEMSIZE = 0x00200000;*/
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);
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');
/*var tsk0 = Task.create('&tsk0_func');*/
/*tsk0.instance.name = "tsk0";*/
/* Synchronize all processors (this will be done in Ipc_start) */
Ipc.procSync = Ipc.ProcSync_ALL;
/* enable fast message Q */
/*var MessageQ = xdc.module('ti.sdo.ipc.MessageQ');
var Notify = xdc.module('ti.sdo.ipc.Notify');
Notify.SetupProxy = xdc.module('ti.sdo.ipc.family.c647x.NotifyCircSetup');
MessageQ.SetupTransportProxy = xdc.module('ti.sdo.ipc.transports.TransportShmNotifySetup');*/
/* data section */
Program.sectMap[".internalMEM"]={runSegment: "L2SRAM_1"};
Program.sectMap[".externalMEM"]={runSegment: "DDR_1"};
Program.sectMap[".sharedMEM"]={runSegment: "MSMCSRAM_2"};
Program.sectMap[".text"]={runSegment: "MSMCSRAM_1"};
Program.sectMap[".vecs"]={runSegment: "MSMCSRAM_1"};
Program.sectMap[".cio"]={runSegment: "DDR"};
Program.sectMap[".switch"]={runSegment: "DDR"};
Program.sectMap[".cinit"]={runSegment: "DDR"}
Program.sectMap[".init_array"]={runSegment: "DDR"};
Program.sectMap[".const"]={runSegment: "DDR"};
Program.sectMap[".args"] = "DDR";
Program.sectMap[".cppi"] = "DDR";
Program.sectMap[".qmss"] = "DDR";
Program.sectMap["platform_lib"] = "DDR";
Program.sectMap[".nimu_eth_ll2"] = "DDR";
Program.sectMap[".resmgr_memregion"] = {loadSegment: "DDR", loadAlign:128}; /* QMSS descriptors region */
Program.sectMap[".resmgr_handles"] = {loadSegment: "DDR", loadAlign:16}; /* CPPI/QMSS/PA Handles */
Program.sectMap[".resmgr_pa"] = {loadSegment: "DDR", loadAlign:8}; /* PA Memory */
Program.sectMap[".bss"] = "L2SRAM_1";
Program.sectMap[".rodata"] = "L2SRAM_1";
Program.sectMap[".neardata"] = "L2SRAM_1";
Program.sectMap[".far:IMAGEDATA"] = {loadSegment: "DDR", loadAlign: 8};
Program.sectMap[".far:NDK_OBJMEM"] = {loadSegment: "DDR", loadAlign: 8};
Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "DDR", loadAlign: 128};
Program.sectMap["systemHeap"] = "DDR";
Program.sectMap[".sysmem"] = "DDR";
/*Program.sectMap[".internalL1SRAMMEM"]={runSegment: "L1SRAM"};*/
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
SharedRegion.setEntryMeta(0,
{ base: SHAREDMEM,
len: SHAREDMEMSIZE,
ownerProcId: 0,
isValid: true,
name: "MSMC RAM",
});
/* Reset function initialize HW */
var Reset = xdc.useModule("xdc.runtime.Reset");
Reset.fxns[Reset.fxns.length++] = "&vlfft_system_reset";
|