背景:自己画的6678板子;裸跑时,.text,.const等段均放在片上memory;各项功能运行正常(包括DDR3)。
现象1:新建sysbios工程,部分段分配如下:
Program.sectMap[".text"] = " DDR3";
Program.sectMap[".const"] = " DDR3";
Program.sectMap[".data"] = "DDR3";
Program.sectMap[".vecs"] = " DDR3";
Program.sectMap[".cio"] = " DDR3";
Program.sectMap[".sysmem"] = " DDR3";
Program.sectMap[".stack"] = " DDR3";
Program.sectMap["systemHeap"] = " DDR3";
…
Emulator Debug时,无法正常运行至main()处等待用户继续运行。
现象2:将上述段(还有其他段,此处不一一举出)均分配在MSMCSRAM后,Emulator Debug时,可正常运行至main()处等待用户继续运行。初步确认问题1的原因是DDR3在上述段分配至DDR3前没有初始化。
但再继续运行时,却死在了bios_start()中,console中有时会显示:
,RILC=0x0
,ILC=0x0
,Exception at 0x0
,EFR=0x2 NRP=0x0
Internal exception: IERR=0x1,
,Instruction fetch exception
,ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x00000058.
,To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
,xdc.runtime.Error.raise: terminating execution
有时会显示:
或者无显示。
初步确认是HeapMen在bios_start()运行溢出。
用ti\mcsdk_2_01_02_06\examples\ndk\helloWorld例程来debug也会出现上述2个问题。
请问:
1、 以上2个现象是不是上述推测?
2、 现象2中,扩大systemHeap的大小是否可以解决上述问题?(但MSMCSRAM已经接近全满,很难扩大)?
3、 常见的.text,.const,systemHeap等段中有哪些会在main()对DDR3初始化后才会分配?
4、 工程中,.text,.const,systemHeap等段必须放在DDR3中。Debug时,如何在这些段分配到DDR3前,将DDR3初始化?
麻烦各位大神!
