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: Linker REGION_ALIAS command



Tool/software: TI C/C++ Compiler

Hi,

In some linkers there is the command: REGION_ALIAS and with it i can give the SAME memory region several names (the name defined under the memory region and i can than add alias names to it).

Is there something similar for TI linkers (TDA3XX Cortex M4 arm and DSPs)?

I have seen there is the ALIAS keyword but from what i understand it is used to make the linker know that  DIFFERENT memory regions physically point to the same place.

I tried using this ALIAS command and used the same memory region to both names under the alias. it seemed to be working but i wanted to ask if i am not doing something that should not actually be done and may cause problem which i have not yet encountered?

Thanks

  • The ALIAS feature of the TI linker does not work the way you describe this REGION_ALIAS feature.

    The TI linker does support C preprocessing, including #define.  So you could do something like this ...

    MEMORY
    {
        FLASH : /* origin and length here */
        ...
    }
    
    #define NEW_NAME FLASH   /* Similar to REGION_ALIAS */
    
    SECTIONS
    {
        output_section_name > NEW_NAME /* Actually allocates to FLASH */
        ...
    }

    Because of that #define, every instance of NEW_NAME is replaced with FLASH.

    Thanks and regards,

    -George

  • Thank you for the reply. I will take you advice using #define (even though the TI ALIAS did seem to work also for aliasing the name it probably would not be good practice using it that way).



    Thanks

    Guy