This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

6678 NDK helloworld应用于多核处理时空间分配

Other Parts Discussed in Thread: SYSBIOS

最近在调试6678网口与多核通信,采用helloworld例程进行修改,所有任务均改在main函数中动态创建,主核中创建多核通信task与网络NDKtask,从核创建通信task1,高度过程中发现多核一跑便会乱掉,有时主核通信task会跑到从核task1中,并且有时跑着跑着感觉程序跑飞了,直接终止

问题1:该跑飞情况如何观察跑飞原因?

经分析感觉是helloworld的cfg中地址分配不对,如果全在L2时则运行正常,但由于网口本身的堆较大无法均放至L2

问题2:教针对于网络使用与多核通信情况下,相关地址如何分配?

如下为例程中地址空间分配情况:

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);

/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;
Program.sectMap["sharedL2"] = "DDR3";
Program.sectMap["systemHeap"] = "DDR3";
Program.sectMap[".sysmem"] = "DDR3";
Program.sectMap[".args"] = "DDR3";
Program.sectMap[".cio"] = "DDR3";
Program.sectMap[".far"] = "DDR3";
Program.sectMap[".rodata"] = "DDR3";
Program.sectMap[".neardata"] = "DDR3";
Program.sectMap[".cppi"] = "DDR3";
Program.sectMap[".init_array"] = "DDR3";
Program.sectMap[".qmss"] = "DDR3";
Program.sectMap[".cinit"] = "DDR3";
Program.sectMap[".bss"] = "DDR3";
Program.sectMap[".const"] = "DDR3";
Program.sectMap[".text"] = "DDR3";
Program.sectMap[".code"] = "DDR3";
Program.sectMap[".switch"] = "DDR3";
Program.sectMap[".data"] = "DDR3";
Program.sectMap[".fardata"] = "DDR3";
Program.sectMap[".args"] = "DDR3";
Program.sectMap[".cio"] = "DDR3";
Program.sectMap[".vecs"] = "DDR3";
Program.sectMap["platform_lib"] = "DDR3";
Program.sectMap[".far:taskStackSection"] = "L2SRAM";
Program.sectMap[".stack"] = "L2SRAM";
Program.sectMap[".nimu_eth_ll2"] = "L2SRAM";
Program.sectMap[".resmgr_memregion"] = {loadSegment: "L2SRAM", loadAlign:128}; /* QMSS descriptors region */
Program.sectMap[".resmgr_handles"] = {loadSegment: "L2SRAM", loadAlign:16}; /* CPPI/QMSS/PA Handles */
Program.sectMap[".resmgr_pa"] = {loadSegment: "L2SRAM", loadAlign:8}; /* PA Memory */
Program.sectMap[".far:IMAGEDATA"] = {loadSegment: "L2SRAM", loadAlign: 8};
Program.sectMap[".far:NDK_OBJMEM"] = {loadSegment: "L2SRAM", loadAlign: 8};
Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "L2SRAM", loadAlign: 128};

问题3:在常用的多核通信工程中的地址分配需要注意哪些?

多谢~