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.

what is the importance of "link using RAM auto initialization model" or "link using ROM auto initialization model" options in ARM Linker-> Advanced options -> Runtime Environment .

Hi,

Please let me know the difference between the below two options

1. Link using RAM auto initialization model

2. Link using ROM auto initialization model

in ARM linker settings. What will be the impact.

Regards,

Satya Sudhir Sure

  • You probably want to use ROM model.

    I presume you do not build with the older COFF ABI.  

    The linker is invoked through the compiler shell utility armcl.  The option for RAM auto-initialization model is --ram_model or -cr.  The option for ROM auto-initialization model is --rom_model or -c.  

    Given an initialization of a global variable like this ...

    int global_variable = 10;

    The value of 10 is assigned to global_variable before main starts execution.  How does that occur?  You get to choose between these two models of auto-initialization of global variables.  

    For a quick overview of the two models, see the slides titled EABI -cr Initialization and EABI –c Compressed ROM Init Model in the presentation on this wiki page.  For more detail see the section titled Automatic Initialization of Variables in the ARM compiler manual.

    For a system that boots itself from power-up, you generally use ROM model.  If your system is more complicated, and some other processor is available to load and start execution, then you can consider using RAM model.

    Thanks and regards,

    -George