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.

Compiler/TMS320F28075: Using group with different running location

Part Number: TMS320F28075

Tool/software: TI C/C++ Compiler

Hello,

I need to create a software binary file with a specific format : header file, instructions and a end of file section. To force the section order during the link process, I use the GROUP instruction of the linker.

But some initialization functions require to execute source code in RAM (for example : flash parameters initialization. I creates a specific code section to allow code copy in RAM and RAM execution.

The problem is I can't place this section in the group because the other sections are not copied in RAM. A warning is generated on the link :

"../Cmd/FLASH_lnk.cmd", line 67: warning #10082-D: placement ignored for "RamFuncSection":  object is placed as part of "Binary"

    /* Allocate program areas: */
    GROUP(Binary) : LOAD = FLASHABCDE  PAGE = 0, SIZE(BINARY_SIZE), ALIGN(4)
    {
        codestart
        BinaryHeader
        .text
        .cinit
        .pinit
        .econst

        RamFuncSection  : RUN = RAMD0 | RAMD1,
                              LOAD_START(RAM_FUNC_LOAD_START_ADDR),
                              LOAD_SIZE(RAM_FUNC_LOAD_SIZE),
                              LOAD_END(RAM_FUNC_LOAD_END_ADDR),
                              RUN_START(RAM_FUNC_RUN_START_ADDR),
                              RUN_SIZE(RAM_FUNC_RUN_SIZE),
                              RUN_END(RAM_FUNC_RUN_END_ADDR)

        BinaryCrc
    }

How can I place this section (RamFuncSection) in the binary with respect to the structure header-instructions-end of file section?

Thank you in anticipation for your help

Aurélien

  • A GROUP is a set of output sections that are put together in that order, and allocated all together.  No member of a GROUP can have separate instructions regarding the allocation.  Yet this is what you attempt to do with RamFuncSection.

    I don't really understand what you intend to do.  I think you have two choices.  One, have RamFuncSection not be part of the group.  Or, make substantial changes to how RamFuncSection is managed so it can be part of the GROUP.  I lack knowledge of how this C28x device typically starts running to give advice on that.

    For a better understanding of how linker command files work, please see the article Linker Command File Primer.

    Thanks and regards,

    -George

  • Thank you George for your reply.

    I think I'll fix some addresses of sections to maintain the binary structure rather than using a group. It allows to mix sections to copy and execute in RAM, and sections that is executed in FLASH.

    Best regards

    Aurélien