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.

C6670代码段放在DDR的问题



代码放在DDR上可以正常运行,但是用CCS5.2进行Debug遇到一个问题。启动Debug Session后,CCS自动Load程序,Load完成会自动进行Go Main,PC停在Main入口处,这样是OK的。但是如果自己手动执行Reset和Load,Load完成后程序就会跑飞,无法进入main函数。代码放在L2上是没有这个问题的,放在DDR上就会出现。

使用的平台是: XDS510USB EVM TCI6618 仿真板

cfg设置:

Program.sectMap[".text"] = new Program.SectionSpec();

Program.sectMap[".text"].loadSegment = "DDR3";

Program.sectMap[".text"].loadAlign = 32;

程序的cache设置:

CACHE_setL2Size (CACHE_0KCACHE);

CACHE_setL1DSize (CACHE_L1_0KCACHE);

CACHE_setL1PSize (CACHE_L1_32KCACHE);

CACHE_enableCaching (128);

 

还有个关于cache知识的问题:

Cache User Guide说L1P总是会Cache外存,如果代码放在DDR,并且也开启L2 Cache,那么代码会cache到L1P还是L2?

 

谢谢!

  • Hi

    请在手动执行加载前,先加载下6670的GEL文件以确保对DDR进行了正确的初始化

    会cache到L2,对于read miss时L1P和L2 Cache之间的交互,可以参考cache userguide1.8.4.1节

  • Thomas Yang 您好,

    按照您的方法,我在System Reset之后,重新Load GEL文件,然后Load程序,但是仍然不能进入Main.

    Load GEL文件时,控制台显示:

    C66xx_0: GEL Output: Setup_Memory_Map...

    C66xx_0: GEL Output: Setup_Memory_Map... Done.

    Load程序时,控制台显示:

    C66xx_0: GEL Output: Invalidate All Cache...

    C66xx_0: GEL Output: Invalidate All Cache... Done.

    C66xx_0: GEL Output: DSP Reset CPU...

    C66xx_0: GEL Output:

    DDR3 initialization is complete.

    C66xx_0: GEL Output: DSP Reset CPU... Done.

    Load结束后,没有自动Go Main,而是显示:0x800F47C0 (no symbols are defined for 0x800F47C0)