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.

ROV problem

Other Parts Discussed in Thread: SYSBIOS

Hi,

First my tools versions are:

XDCtools 3.23.4.60
SYS/BIOS 6.33.6.50
IPC 1.24.3.32
CCS 5.1.0.090000
Device C6678

Gnerally the ROV problems are posted in CCS forum, but I think mine is related to the memory configuration I'm using, so I'm posting it here.

I'm getting errors when I try to see some modules in ROV (like GateMP, HeapMemMP, MessageQ). The error messages are like:

"Received exception from ROV server: Target memory read failed at address 0x88zzzzzz, length: 8 This read is at an INVALID address according to the applications section map.  The application is likely either uninitializaed or corrupt."

The address varies with the module, but are always 0x88zzzzzz.

0x88000000 is related to the shared memory defined in the cfg file

/* Shared Memory base address and length */
var SHAREDMEM           = 0x80000000;
var SHAREDMEMSIZE       = 0x08000000;

If I set the size as 0x10000000 the errors address would be like 0x900zzzzz.
The platform was edited and the code memory is MSMCSRAM. Also the default heap is a HeapMem instance allocated in DDR3 memory.
In the .map I found the following entries related to the address 0x88000000:

ti.sdo.ipc.SharedRegion_0
*          0    80000000    08000000     NOLOAD SECTION
                  80000000    08000000     --HOLE--

systemHeap
*          0    88000000    00000000     UNINITIALIZED

LINKER GENERATED COPY TABLES

__TI_cinit_table @ 00832494 records: 5, size/record: 8, table size: 40
    .fardata: load addr=008319ec, load size=00000a77 bytes, run addr=0082fd50, run size=00001b04 bytes, compression=rle
    .neardata: load addr=00832470, load size=00000009 bytes, run addr=008319e0, run size=0000000c bytes, compression=rle
    .bss: load addr=0083247c, load size=00000008 bytes, run addr=008319d4, run size=0000000a bytes, compression=zero_init
    .far: load addr=00832484, load size=00000008 bytes, run addr=00816000, run size=00014390 bytes, compression=zero_init
    systemHeap: load addr=0083248c, load size=00000008 bytes, run addr=88000000, run size=00000000 bytes, compression=zero_init
    

GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name

address    name
--------   ----
88000000   ti_sysbios_heaps_HeapMem_Instance_State_0_buf__A

If I use the MessageQ example the module address is located in L2 and the ROV works fine. Any idea of how I can allocate the queues in DDR3 and still use ROV?

Thanks

  • Where is the "systemHeap" section defined? And where is it being placed?

    It appears to be landing in a memory region not defined in the platform you are building with.

    Alan

  • Alan,

    I forgot to post that before, it's placed in DDR3 and defined as default heap in the config file.

    var Memory = xdc.useModule('xdc.runtime.Memory');

    var SYSTEM_HEAPSIZE = 0x20000000; // Vary based on your requirement

    var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');

    var heapMemParams = new HeapMem.Params();

    heapMemParams.size = SYSTEM_HEAPSIZE; // Set previously

    heapMemParams.sectionName = "systemHeap";

    Program.global.heapM1 = HeapMem.create(heapMemParams);

    Program.sectMap["systemHeap"] = "DDR3"; // This maps it to DDR3

    Memory.defaultHeapInstance = Program.global.heapM1;

    Regards

  • Can you try the following simpler approach to configuring the heap used by Memory and see if it works better:

    Replace all of the code you just posted with this:

    var BIOS = xdc.useModule('ti.sysbios.BIOS');
    BIOS.heapSize = 0x20000000;
    BIOS.heapSection = "systemHeap";
    Program.sectMap["systemHeap"] = new Program.SectionSpec();
    Program.sectMap.["systemHeap"].loadSegment = "DDR3";

    Also, can you show the MEMORY CONFIGURATION and SEGMENT ALLOCATION MAP tables from the top of the generated .map file?

    Alan

  • Hi Alan,

    I made the changes in the cfg but I still got the same error in ROV. Here are the Memory Configuration and Segment Allocation Map you asked, these are generated with the changes in the cfg file.

    MEMORY CONFIGURATION

             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      L2SRAM                00800000   00040000  000324a6  0000db5a  RW X
      MSMCSRAM              0c000000   00400000  0003fce0  003c0320  RW X
      DDR3                  80000000   20000000  08000000  18000000  RW X


    SEGMENT ALLOCATION MAP

    run origin  load origin   length   init length attrs members
    ----------  ----------- ---------- ----------- ----- -------
    00800000    00800000    0002a390   00000000    rw-
      00800000    00800000    00016000   00000000    rw- .stack
      00816000    00816000    00014390   00000000    rw- .far
    0082a390    0082a390    000059aa   000059aa    r--
      0082a390    0082a390    000059aa   000059aa    r-- .const
    0082fd40    0082fd40    00001c24   00001b04    rw-
      0082fd40    0082fd40    00001b04   00001b04    rw- .fardata
      00831844    00831844    00000120   00000000    rw- .cio
    00831964    00831964    00000060   00000060    r--
      00831964    00831964    00000038   00000038    r-- .switch
      0083199c    0083199c    00000028   00000028    r-- .init_array
    008319c4    008319c4    0000000a   00000000    rw-
      008319c4    008319c4    0000000a   00000000    rw- .bss
    008319d0    008319d0    0000000c   0000000c    rw-
      008319d0    008319d0    0000000c   0000000c    rw- .neardata
    008319dc    008319dc    00000ad0   00000ad0    r--
      008319dc    008319dc    00000ad0   00000ad0    r-- .cinit
    0c000000    0c000000    0003fae0   0003fae0    r-x
      0c000000    0c000000    0003fae0   0003fae0    r-x .text
    0c03fc00    0c03fc00    00000200   00000200    r-x
      0c03fc00    0c03fc00    00000200   00000200    r-x .vecs

    Thanks

  • Johannes,
    can you also post the complete linker command script linker.cmd from Debug/configPkg? I suspect there is some code that places "systemHeap" to a hardcoded address, possibly relative to SHAREDMEMSIZE, without checking if the address is within the defined memory map. How is SHAREDMEMSIZE variable used in the config script?

  • 7317.linker.txt

    Sasha,

    SHAREDMEMSIZE is used to define the shared region:

    var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
    SharedRegion.setEntryMeta(0,
        { base: SHAREDMEM,
          len:  SHAREDMEMSIZE,
          ownerProcId: 0,
          isValid: true,
          name: "DDR3 RAM",
        });

    The linker file is attached.

    Thanks

  • We're still looking into this.

    The address range is defined in the .map file so its unclear why ROV is complaining.

    Alan

  • Hi,

    Any news about that?

    Thanks

  • Johannes,

    Sorry its taking so long. I thought someone else was looking into this...

    In order to speed things up a bit, I'd like you to share two files here if you're willing.

    The first file is the application's .out file.

    The second file is located in the same directory as the linker command file you shared before.

    I think it will be called "ConfigFile_pe66.rov.xs". If not, just post the file whose name ends with "rov.xs".

    With these two files, I should be able to reproduce and debug the problem locally.

    Alan

  • Sasha and Alan,

    Thanks for your help. The problem was that I as trying to create a shared region and heap (both big), so I didnt'h have enough memory for the size I was using in the config file. This was corrupting the ROV too. Now those message errors don't appear anymore.

    Regards