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.

Mapping a section of external memory

Hello,

I am using C6424 evm and CCSv4.  I would like to map around 4k of external memory beginning at address 0x8000000 to a separate section. So that some of the constant data that I need in the program can be stored at this address. Since the cmd file is automatically generated while building RTSC configuration, I am not able to figure out how this can be done. Could you please help me.

Thanks,

Smitha Joseph

  • Hello,

    I was able to find from the DSP/BIOS user's guide how to map a portion of external memory  to a specific location. I used the following in .cfg file to allocate memory at 0x8000000.

    var heap1 = HeapMem.create();

    heap1.sectionName = ".Config";

    heap1.size = 0x01000000; /* 16 MB */

    Program.sectMap[".Config"]= {loadAddress: 0x80000000};

    But I am getting exception,  when I try to alloc from this heap in my cpp file using the following code. Could you please point out if I am missing something?

    extern

    "C" {

    HeapMem_Handle heap1;

    };

    IHeap_Handle config_heap = HeapMem_Handle_upCast(heap1);

    pConfigRegion1 = (Int32*)Memory_alloc(config_heap, 160, 4,

    NULL);

    Thanks,Smitha Joseph

  • What exception exactly is getting reported?  Do you mean a compile error?

  • I was getting a run time exception. I was able to figure out the correction, I hadn't added heap1 as part of xdc.program.global hence I was getting invalid pointer when I access this heap from C function. After adding heap1 to xdc.global, it is working fine.

    Regards,

    Smitha Joseph