各位工程师好
想请教个问题,现在我用c6678做开发,8个核使用同一个image文件,通过代码判断当前运行的coreid来做分支。
现在的问题是我感觉程序不稳定,打出来的log我我想的不太一样,我觉得是有些变量的值可能是八个核一起动作的时候相互影响,存在冲突。
我看了有很多地方可以设定数据存放位置,编译的时候有个链接选项可以连接一个*.cmd文件,但是这个我觉得改了没效果,还有就是*.cfg文件里也可以指定,
我想知道到底什数据放在什么地方比较好呢?
下面是我的*.cfg文件的指定内容:
/* 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"] = "MSMCSRAM";
Program.sectMap[".cio"] = "MSMCSRAM";
Program.sectMap[".far"] = "DDR3";
Program.sectMap[".rodata"] = "DDR3";
Program.sectMap[".neardata"] = "DDR3";
Program.sectMap[".cppi"] = "DDR3";
Program.sectMap[".init_array"] = "L2SRAM";
Program.sectMap[".qmss"] = "DDR3";
Program.sectMap[".cinit"] = "MSMCSRAM";
Program.sectMap[".bss"] = "DDR3";
Program.sectMap[".const"] = "MSMCSRAM";
Program.sectMap[".text"] = "MSMCSRAM";
Program.sectMap[".code"] = "MSMCSRAM";
Program.sectMap[".switch"] = "MSMCSRAM";
Program.sectMap[".data"] = "L2SRAM";
Program.sectMap[".fardata"] = "L2SRAM";
Program.sectMap[".args"] = "DDR3";
Program.sectMap[".cio"] = "DDR3";
Program.sectMap[".vecs"] = "L2SRAM";
//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};
Andy Yin1:
堆栈、及各核的私有变量必须放在私有memory,其他的数据和代码可以根据需要放在共享或私有,具体可参考多核编程指南中关于数据段的说明http://www.ti.com/litv/pdf/sprab27b