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.

Memory sections and initializing

Good day to you again.

I've followed the instructions and started the simple project "hello world" from   C:\ti\mcsdk_2_01_02_06\examples\ndk\.

But when i'm trying to launch it, this window appears and nothing happens 

I guess i did the wrong memory sections configuration. Here's the list, which i'm using in my programm

Memory.defaultHeapInstance = Program.global.heap0;
Program.sectMap["sharedL2"] = "DDR3";
Program.sectMap["systemHeap"] = "DDR3";
Program.sectMap[".sysmem"] = "DDR3";
Program.sectMap[".args"] = "DDR3";
Program.sectMap[".cio"] = "DDR3";
Program.sectMap[".far"] = "DDR3";
Program.sectMap[".rodata"] = "DDR3";
Program.sectMap[".neardata"] = "DDR3";
Program.sectMap[".cppi"] = "MSMCSRAM";
Program.sectMap[".init_array"] = "MSMCSRAM";
Program.sectMap[".qmss"] = "MSMCSRAM";
Program.sectMap[".cinit"] = "MSMCSRAM";
Program.sectMap[".bss"] = "DDR3";
Program.sectMap[".const"] = "DDR3";
Program.sectMap[".text"] = "MSMCSRAM";
Program.sectMap[".code"] = "MSMCSRAM";
Program.sectMap[".switch"] = "MSMCSRAM";
Program.sectMap[".data"] = "MSMCSRAM";
Program.sectMap[".fardata"] = "DDR3";
Program.sectMap[".args"] = "DDR3";
Program.sectMap[".cio"] = "DDR3";
Program.sectMap[".vecs"] = "DDR3";
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};

  • Hi,
    Try the following.

    Memory.defaultHeapInstance = Program.global.heap0;
    Program.sectMap["sharedL2"] = "DDR3";
    Program.sectMap["systemHeap"] = "DDR3";
    Program.sectMap[".sysmem"] = "DDR3";
    Program.sectMap[".args"] = "DDR3";
    Program.sectMap[".cio"] = "DDR3";
    Program.sectMap[".far"] = "DDR3";
    Program.sectMap[".rodata"] = "DDR3";
    Program.sectMap[".neardata"] = "DDR3";
    Program.sectMap[".cppi"] = "DDR3";
    Program.sectMap[".init_array"] = "DDR3";
    Program.sectMap[".qmss"] = "DDR3";
    Program.sectMap[".cinit"] = "DDR3";
    Program.sectMap[".bss"] = "DDR3";
    Program.sectMap[".const"] = "DDR3";
    Program.sectMap[".text"] = "DDR3";
    Program.sectMap[".code"] = "DDR3";
    Program.sectMap[".switch"] = "DDR3";
    Program.sectMap[".data"] = "DDR3";
    Program.sectMap[".fardata"] = "DDR3";
    Program.sectMap[".args"] = "DDR3";
    Program.sectMap[".cio"] = "DDR3";
    Program.sectMap[".vecs"] = "DDR3";
    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};
  • Hello.

    DDR3 requires initialization first.  I've used this construction:

    void EVM_init()
    
    {
    
    platform_init_flags  init_flags;
    
    platform_init_config init_config;
    
    /* Status of the call to initialize the platform */
    
    int32_t pform_status;
    
           memset(&init_config, 0, sizeof(platform_init_config));
    
           memset(&init_flags, 0x01, sizeof(platform_init_flags));
    
           init_flags.pll = 1;
    
           init_flags.ddr = 1;
    
           init_flags.phy = 1;
    
    }


    And i still have an image i've already shown. 

  • Hi,

    EVM C6670 .gel file initialize the DDR3 memory.

    For Hello world demo, first you need to load the EVM .gel file to initialize the EVM and then run the .out file.

    Thanks,
  • Hello Ganapathi.

    The problem is that i will not be able to use the .gel initialization, because my further device will not have usb-ports. I'm trying to create project, which could be loaded, while using only the ethernet port. Since then i'm trying to initialize the external memory through the ethernet, and i don't know, how to load .gel file trough it.

    Whether there are some possibilities to initialize DDR, without .gel file and usb-connection, or this is not possible?
  • Hi,
    Yes, you can load the ethernet example code with out using gel file.
    We have to enable PLL and DDR initialization in EVM setup function which would run before loading code into DDR so DDR get initialized in earlier stage itself.

    Any problem ?
  • I think i'm doing the wrong initialization. I'm using the EVM_INIT, described above, and there's still the same pic. It's "running", but not responding. Where i can find EVM setup the function of which you speak? Is this EVM init, or this is something else?
  • Yes, that's what "EVM_INIT" I meant.
    Also just enable PLL alone but not DDR.

    sFlags.pll = 1; /* PLLs for clocking */
    sFlags.ddr = 0; /* External memory */

    Let me try and update.
  • Ok, thank you very much. I'll be waiting for your updates