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.

CCS5.2 XDT generated linker command files for OMAP-L138

Other Parts Discussed in Thread: OMAP-L138

We use CCS5.2 with OMAP-L138

We define in the platform Code and Data.
CODE to a memory section DDR_CODE and
DATA to a memory section DDR_DATA


DSP PROBLEM
===========
The DSP side puts only text to CODE.
But .cinit and .const for example should be CODE and not DATA.
A corresponding ARM9 example does it better and puts these sections to code.



SECTIONS
{
    .text: load >> DDR_TEXT
    .ti.decompress: load > DDR_TEXT
    .stack: load > L3_CBA_RAM
    GROUP: load > DDR_DATA
    {
        .bss:
        .neardata:
        .rodata:
    }
    .cinit: load > DDR_DATA          >>>> BUG ??  DDR_TEXT
    .pinit: load >> DDR_DATA         >>>> BUG ??  DDR_TEXT
    .init_array: load > DDR_DATA     >>>> BUG ??  DDR_TEXT
    .const: load >> DDR_DATA         >>>> BUG ??  DDR_TEXT
    .data: load >> DDR_DATA
    .fardata: load >> DDR_DATA
    .switch: load >> DDR_DATA        >>>> BUG ??  DDR_TEXT
    .sysmem: load > DDR_DATA
    .far: load >> DDR_DATA
    .args: load > DDR_DATA align = 0x4, fill = 0 {_argsize = 0x0; }
    .cio: load >> DDR_DATA
    .ti.handler_table: load > DDR_DATA
    .myShared: load >> SHARED
    .vecs: load >> DDR_TEXT
    xdc.meta: load >> DDR_DATA, type = COPY

}



ARM+DSP SECTION PROBLEM
=======================
If we use IPC, the seems to be also a wrong section.
For me: ti_sdo_ipc_init is a section like .const and should be DDR_TEXT.


SECTIONS
{
    ti.sdo.ipc.SharedRegion_0:  { . += 0x20000;} run > 0xc5000000, type = NOLOAD
    ti_sdo_ipc_init: load > DDR_DATA, type = NOINIT
}

should be:
SECTIONS
{
    ti.sdo.ipc.SharedRegion_0:  { . += 0x20000;} run > 0xc5000000, type = NOLOAD
    ti_sdo_ipc_init: load > DDR_TEXT, type = NOINIT
}


Why does TI use "ti_sdo_ipc_init: load > `Program.platform.dataMemory`, type = NOINIT" in linkcmd.xdt ?



  • Stefan,

    Can you clarify why you’re saying these belong in code sections? 

    .const, .cinit, .pinit, and ti_sdo_ipc_init all hold data values or tables, not executable code.  They are all intentionally placed in data memory.

    Scott

  • I need to ask why you think those sections should be CODE?

    .cinit, .pinit, .const, and ti_sdo_ipc_init sections all contain just data, not code.

    Regards,

    - Rob

     

  • Stefan,

    To clarify… the default placement for these sections is typically a data memory region, but they *can* be placed in code memory if you want.

    For the OMAP-L138 you are specifying different code/data regions in DDR, so if you want to truly sort the sections to code versus data, these sections are really “data”.

    For a device like an MSP430, we place .const, .cinit, and .pinit into FLASH memory (the "code" memory region), because RAM on these devices is precious and shouldn’t be used for data values that won’t change at runtime.

    Scott