|
我要用c6678做fft的以太网传输,现在,我的程序编译是通过的,但运行有问题,只实现了fft功能,以太网功能实现不了。如所图所示,图中显示有两个问题,一个是cio ,一个是heap的内存分配问题,源于heap内存,我不断加大内存,但还是不够,这是为什么呢。我觉得程序在NC_NetStart( hCfg, NetworkOpen, NetworkClose, NetworkIPAddr )语句中就退出了(以太网传输用了socket)。请各大神指教!以下是我的cfg文件内容。
/*use modules*/
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');
//////////////////////////////////add/////////////////////////////////////////////////////////////////////////////////////////////
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');
/* Load the CSL package */
var Csl = xdc.useModule('ti.csl.Settings');
/* Load the CPPI package */
var Cppi = xdc.loadPackage('ti.drv.cppi');
/* Load the QMSS package */
var Qmss = xdc.loadPackage('ti.drv.qmss');
/* Load the PA package */
var Pa = xdc.useModule('ti.drv.pa.Settings');
/* Load the Platform/NDK Transport packages */
var PlatformLib = xdc.loadPackage('ti.platform.evmc6678l');
var NdkTransport = xdc.loadPackage('ti.transport.ndk');
/*
** Sets up the exception log so you can read it with ROV in CCS
*/
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 */
/*
** Give the Load module it's own LoggerBuf to make sure the
** events are not overwritten.
*/
/* var loggerBufParams = new LoggerBuf.Params();
loggerBufParams.exitFlush = true;
loggerBufParams.numEntries = 64;
Load.common$.logger = LoggerBuf.create(loggerBufParams);
*/
/*
** Use this load to configure NDK 2.2 and above using RTSC. In previous versions of
** the NDK RTSC configuration was not supported and you should comment this out.
*/
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;
/* Enable BIOS Task Scheduler */
BIOS.taskEnabled = true;
////////////////////////////////////////////////add/////////////////////////////////////////////////////////////////////////////////////
ECM.eventGroupHwiNum[0] = 7;
ECM.eventGroupHwiNum[1] = 8;
ECM.eventGroupHwiNum[2] = 9;
ECM.eventGroupHwiNum[3] = 10;
/* Shared Memory base address and length */
var SHAREDMEM = 0x0C000000;
var SHAREDMEMSIZE = 0x00200000;
/*var SHAREDMEMSIZE = 0x00200000;*/
/*
* 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.
*/
var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3", "CORE4", "CORE5", "CORE6", "CORE7"]);
/*
* 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');
/*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"};*/
/*
* Need to define the shared region. The IPC modules use this
* to make portable pointers. All processors need to add this
* call with their base address of the shared memory region.
* If the processor cannot access the memory, do not add it.
*/
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";
/*
* @(#) ti.sdo.ipc.examples.multicore.evm667x; 1, 0, 0, 0,22; 1-20-2011 10:15:37; /db/vtree/library/trees/ipc/ipc.git/src/ ipc-f23
*/
|
|