多核编程,使用IPC做核间通信,因为用到了emac需要一个很大的systemHeap,.cfg如下
var heapMemParams1 = new HeapMem.Params;
heapMemParams1.size = 8192 * 30;
heapMemParams1.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams1);
使得l2空间不足不得不把.text段放到SL2或DDR中,.cfg代码如下
Program.sectMap[".text"] = "MSMCSRAM";
Program.sectMap[".const"] = "MSMCSRAM";
Program.sectMap[".qmss"] = "L2SRAM";
Program.sectMap[".cppi"] = "L2SRAM";
//new
Program.sectMap[".data"] = "MSMCSRAM";
Program.sectMap[".vecs"] = "L2SRAM";
Program.sectMap[".cio"] = "L2SRAM";
Program.sectMap[".sysmem"] = "MSMCSRAM";//
Program.sectMap[".stack"] = "L2SRAM";
Program.sectMap[".init_array"] = "L2SRAM"; //systemHeap
Program.sectMap["systemHeap"] = "L2SRAM"; //
Program.sectMap[".exram"] = "DDR3"; //
Program.sectMap[".msram"] = "MSMCSRAM"; //
Program.sectMap[".l2ram"] = "L2SRAM";
编译可以通过.map中:
MEMORY CONFIGURATION
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
L2SRAM 00800000 00080000 000477f6 0003880a RW X
MSMCSRAM 0c000000 00400000 002957c8 0016a838 RW X
DDR3 80000000 20000000 0a1ac810 15e537f0 RWIX
但是运行后会出现很多问题包括:
明明调用了 一个函数在运行时却单步运行进入不了函数直接跳过,运行结果也完全不对
有时候执行到了那个函数,但是发现传递的参数完全不对,比如我传递的是8,函数内却是另一个数
有时候BIOS无法进入,中断也不能进入,还有很多类似的错误,请问我应该如何去解决?十分感谢!