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.

F29H859TU-Q1: Combining non-continuous memory in Linker Command File

Part Number: F29H859TU-Q1

Tool/software:

Hello,

How can I combine memory that is non-continuous within a Linker Command File?

For example, if I define my own section and want it to span SRAM_LPAx and SRAM_CPAx?

Excerpt from the F29H85x RAM .cmd file:

MEMORY
{
    SRAM_LDAx : o=0x200E0000, l=0x20000
    SRAM_LPAx : o=0x20100000, l=0x10000
    SRAM_CPAx : o=0x20110000, l=0x10000
    SRAM_CDAx : o=0x20120000, l=0x30000

    FLASH_RP0 : o=0x10000000, l=0x100000
    FLASH_RP1 : o=0x10100000, l=0x100000
    FLASH_RP2 : o=0x10200000, l=0x100000
    FLASH_RP3 : o=0x10300000, l=0x100000
}



/* Specify the sections allocation into memory */

SECTIONS
{
    codestart     : {} > 0x20100010

    .text         : {} > SRAM_LPAx
    .TI.ramfunc   : {} > SRAM_LPAx
    .cinit        : {} > SRAM_LDAx
    .const        : {} > SRAM_LDAx
    .rodata       : {} > SRAM_LDAx
    .init_array   : {} > SRAM_LDAx

    .data         : {} > SRAM_LDAx
    .bss          : {} > SRAM_LDAx
    .stack        : {} > SRAM_LDAx
    .sysmem       : {} > SRAM_LDAx
    .cio          : {} > SRAM_LDAx

}
Best Regards,
Marlyn
  • Hi Marlyn,

    SRAM_LPAx and SRAM_CPAx are contiguous memory regions. You can combine that to a single memory block as follows

        SRAM_LDAx : o=0x200E0000, l=0x20000
        // SRAM_LPAx : o=0x20100000, l=0x10000
        // SRAM_CPAx : o=0x20110000, l=0x10000
        SRAM_Prog    : o=0x20100000, l=0x20000
        SRAM_CDAx : o=0x20120000, l=0x30000

    You cannot combine 2 non-contiguous memories. Although, you can make linker allocate sections across multiple memory regions (even non-contiguous ones). In that case linker will split the sections and place them across the listed memory regions

    Eg: .

    .data         : {} > SRAM_LDAx | SRAM_CDAx

    Regards,

    Veena