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.

hua_evmc6678l中地址分配问题



在调试hua_evmc6678l例程中,观察.cfg文件,其中,多个段都放在了DDR中。

Program.sectMap[".far"] = "DDR";
Program.sectMap[".cinit"] = "DDR";
Program.sectMap[".const"] = "DDR";
Program.sectMap[".text"] = "DDR";
Program.sectMap[".code"] = "DDR";
Program.sectMap[".data"] = "DDR";

1、将程序固化至flash时,因在程序运行前无法运行gel文件中的DDR初始化等操作,DDR初始化应该如何处理?

2、将程序固化至flash时,EVM_init函数中sFlags.ddr  = 0;    /* External memory */该语句应该如何处理?

  • 将sFlags.ddr 置1,EVM_init中的platform_init中包含对DDR的初始化。
    platform_init() - "\ti\pdk_C6678\packages\ti\platform\evmc6678l\platform_lib\src\platform.c"
    DDR3Init() - "\ti\pdk_C6678\packages\ti\platform\evmc6678l\platform_lib\src\evmc6678.c"
  • 感谢回复。
    不太理解的是Program.sectMap[".text"] = "DDR";,即代码段在DDR中,若在程序中执行DDR初始化的话,不会影响其中的程序运行吗?
    感谢!!!
  • ** Register an EVM Init handler with BIOS. This will initialize the hardware. BIOS calls before it starts.
    **
    ** If yuo are debugging with CCS, then this function will execute as CCS loads it if the option in your
    ** Target Configuraiton file (.ccxml) has the option set to execute all code before Main. That is the
    ** default.
    */
    Startup.lastFxns.$add('&EVM_init');

    上面是cfg中的截取内容,在bios启动前先调用EVM Init。