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.

Question about the IRAM memory range overlap

Hello:

I want to store 10 16-bit digits into the IRAM of C6713.

The 10 digits are stored in the directive ".mydata".

In my cmd file, I designated the .mydata->MYDATA and the MYDATA is placed at 0x0000202h and the length is 40h.

 

When I complie, the error occurs like below:

 

 

If I change the MYDATA allocation as 0x80000000h and length 0x00000010h. No error would occur.

 

I think the reason may be if I use IRAM, some spaces in IRAM(I refer to 256kb L2 IRAM) are already pre-occupied or reserved by some

important sections, such as stack far etc.

 

If I set my MYDATA length as too long, there must be some overlaps between this section and those other internal sections.  Is my guess right?

 

If it is right, how can I check which part of the IRAM has been preempted by those important sections so that I can find my available space? I need to use .map file or some tools of CCSv5?

 

Thank you

 

 

 

  • The reason you are getting an error is because in your linker command file memory segment "IRAM" has been declared to start at address 0x0 with length 0x100000 so you cannot start another memory segment "MYDATA" at length 0x202 (that address is already declared as part of IRAM). You could change the length of IRAM to 0x200 and start another memory segment MYDATA at 0x200 with length of 0x40.
    On c6713 there is 256K bytes of L2RAM (if all of it is configured as RAM ie no cache) so really the length should be adjusted to reflect 256KB ie 0x40000. You can create as many memory segments as you want in the linker command file but they cannot overlap and they should not exceed this total length of IRAM.

    Rgds
    -Dipa-
  • Yes, Dipa suspicious was correct.

    It was overlapping with IRAM memory.

    Have you tried like below ?

    .mydata > IRAM

    MEMORY
    {
        vecs:          o = 00000000h   l = 00000200h
        boot:          o = 00000200h   l = 00000200h
        IRAM:          o = 00000400h   l = 0000FA00h                           
        CE0:	   o = 80000000h   l = 01000000h 
                                                                  
    }
    
    SECTIONS
    {
        "vectors"   >       vecs
        "bootload"  >       boot
        .cinit      >       IRAM
        .text       >       IRAM
        .stack      >       IRAM
        .bss        >       IRAM
        .const      >       IRAM
        .data       >       IRAM
        .far        >       IRAM
        .switch     >       IRAM
        .sysmem     >       IRAM
        .tables     >       IRAM
        .cio        >       IRAM
        .mydata     >       IRAM
    }